The confusion is probably caused by the fact that a UICommand
component needs to have a rendered attribute that is page-scoped
rather than request-scoped.

The rendered attribute value needs to remain constant from the first
request's RenderResponse phase until the next request's
InvokeApplication phase.

This is because each phase checks to insure that a component is
rendered=true before executing for a particular component.

If the rendered value is only true during the first request (for
generating html representation), then during the second request, the
component will not "exist" to generate action events.


On 3/21/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/
> >>
> >>
> >
> >
> >
>
>

Reply via email to