Hello,
I tried to save the state and played around with x:saveState but it's
not working as expected...
<h:column id="columnBrowsTab1" rendered="#{foo.secondBoolean}">
<x:saveState id="listenerObid" value="#{listener.obid}"/>
<x:saveState id="fooObid" value="#{foo.obid}"/>
<h:commandLink id="TMIL" action="#{listener.sort}"
value="#{foo.obid == 'obid'}" rendered="#{foo.obid == 'obid'}" />
<h:outputText value="#{foo.secondColumn}"
rendered="#{foo.obid != 'obid' and !(foo.obid == listener.obid)}"/>
<h:outputText value="#{foo.secondColumn}"
rendered="#{(foo.obid == listener.obid)}"
styleClass="treeNodeSelected"/>
</h:column>
This causes that listener.setObid() is called, but not
the action method :-(
Any ideas?
Best regards,
Christian
> Von: Rick Reumann <[EMAIL PROTECTED]>
> An: MyFaces Discussion <[email protected]>
> Betreff: Re: commandLink with action inside Table
> Datum: Thu, 15 Sep 2005 13:57:15 -0400
>
> Mike Kienenberger wrote the following on 9/15/2005 12:18 PM:
> > Take a look at this thread for both a discussion on the situation and
> > solutions. Note that the earlier part of the thread didn't address
> > the real issue, so I started you somewhere in the middle.
> >
> >
>
http://mail-archives.apache.org/mod_mbox/myfaces-users/200509.mbox/[EMAIL
PROTECTED]
> >
> > Rick was going to write a wiki entry on the situation, but I don't
> > think he's done so yet.
> >
> > Basically, you need to preserve the value of rendered to the next
> request.
> > Using the t:saveState component is one way to do this.
>
> Yes, I am going to make a wiki entry this. The reason I didn't reply
> immediately is that he mentioned he was using session scope for his
> backing bean. I'm guessing now that both the "foo" bean and "listener"
> bean both aren't in session scope.
>
> Christian, I'm guessing that "listener" is not being preserved so if you
> preserve listener or listener you should be all set:
>
> <t:saveState id="listener" value="#{listener}"/>
>
> (just perserving obid of listener should work also:
> <t:saveState id="obid" value="#{listener.obid}"/>)
>
> If "foo" isn't being preserved (I think you said it was in Session
> scope), you'll need to save that state also. I haven't looked into using
> t:saveState for more than one object though.
>
> --
> Rick
>
--
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++