myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lisa <apache_supp...@purpleblade.net>
Subject Confusion with <f:setProperty>
Date Tue, 06 Feb 2007 00:40:05 GMT

Confusion with <f:setProperty>

I have inherited some code that does not work and it makes heavy use of 
<f:setProperty>.  I can find little documentation on this that tells me at a
very
low level what is going on (exactly when setters/getters are called)

If I have an <f:setProperty inside a command link, what does it actually do?
Does it call a getter when the page is rendered (and when), and does it call
a setter when submitted (and when)?:

When would I actually use this, and are there other ways to set/get
properties?
What circumstances would you need to use this (when other options will not
work)?

Have tried to experiment but am having a hard time trying to dig through the
code.  Any help would be greatly appreciated.  Here is the typical code
below
with <f:setProperty> inside a <t:commandLink>

thanks


    <t:commandLink
            rendered="#{address.showSaveBtn}"
            actionListener="#{address.saveOrUpdateListener}"
            action="#{address.mainViewAction}"
            id="btnSave"
            onmouseover="BtnSaveImg.src='../../images/Save-Button-Blue.gif';
return true;"
           
onmouseout="BtnSaveImg.src='../../images/Save-Button-Silver.gif'; return
true;"
            >
         ../../images/Save-Button-Silver.gif 

        <f:setPropertyActionListener
                target="#{address.mode}"
                value="#{address.mode}" />

        <f:setPropertyActionListener
                target="#{address.autoMode}"
                value="#{address.autoMode}" />

    </t:commandLink>
-- 
View this message in context: http://www.nabble.com/Confusion-with-%3Cf%3AsetProperty%3E-tf3177940.html#a8818381
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message