Hi,
Let me explain the problem briefly; Enable Edit link (id="link2") is always rendered on the page, when user clicks this link the Edit link's (id="link1")' rendered attribute converted false to true, now at that time two links rendered on the page. If i don't use savestate (another solution is put the backer bean to the session scope, but i think it is not very clever solution), the Edit link's (id="link1") actionListener isn't invoked(actionListener="#{ backer.edit}"). (but you can see the code to invoke the method in the source of the generated html page, this was confused my mind).
 
As i told in the question problem solution is very easy but it is a little confusing.

Regards

On 3/22/06, Dean Hiller <[EMAIL PROTECTED]> wrote:
I am confused by the response.  if back.enabled was false, he would not
be able to click the commanLink, would he?

It sounds like he was saying backer.edit was not working.  Maybe my
question is a stupid question from a newb(me), but could you explain
that response more so I can understand.
thanks,
dean

Mike Kienenberger wrote:

>My guess is that you are not persisting the value of #{back.enabled}
>between requests.
>
>In order for a UICommand to work, it must remain enabled
>(rendered=true) from the first request renderResponse phase to the
>next request's invokeApplication phase.
>
>Maybe all you need to do is use t:saveState on #{back.enabled}.
>
>On 3/21/06, Murat Hazer < [EMAIL PROTECTED]> wrote:
>
>
>>A simple page has two links
>>
>><t:commandLink id="link1" actionListener="#{backer.edit }" value="Edit"
>>rendered="#{back.enabled}" />
>> <t:commandLink id="link2" actionListener="#{backer.enableEdit}"
>>value="Enable Edit" />
>>
>>When the enable edit link is cliked 'enabled' property of the backing bean
>>is changed to true so that the Edit link is rendered. The problem is that
>>once the Edit link is rendered, it's method binding doesn't work. The edit
>>method is never called when I click the link (or button). Why does this
>>happen?
>>--
>>Murat HAZER
>>Elektrik-Elektronik Mühendisi - Electrical-Electronics Engineer
>>Tel - Phone: +90 222 335 05 80 - 1395
>>Cep Tel - Mobile Phone: +90 532 472 00 63
>>Blog URL: http://www.projedunyasi.org
>>Yahoo Group:
>> http://groups.yahoo.com/group/malatyafenlisesi/
>>
>>
>
>
>




--
Murat HAZER
Elektrik-Elektronik Mühendisi - Electrical-Electronics Engineer
Tel - Phone: +90 222 335 05 80 - 1395
Cep Tel - Mobile Phone: +90 532 472 00 63
Blog URL: http://www.projedunyasi.org
Yahoo Group: http://groups.yahoo.com/group/malatyafenlisesi/

Reply via email to