Hi;
Then this result value must not be empty. Maybe you could some injections into the it in RestoreView via PhaseListener or
if you use ManagedBean, after creating it using @PostConstrcut annotation prepopulate with your results.
In fact, rendered property is used for rendering component or not. If the component is not rendered then it is actionlistener method is meaningless from the point of view queueing its event. processDecodes method not decodes it since nothing in hand to decode and apply value for it.
* But , you can queue event within your code,after restoring view with phase listener
UIViewRoot root = get view root
UIComponent comp = get command link compoenent
ActionEvent event = new ActionEvent(comp);
root.queueEvent(event);
Then after invoke application phase, your listener will be invoked
----- Original Message ----
From: Roger Keays roger.keays@ninthavenue.com.au
To: users@javaserverfaces.dev.java.net
Sent: Wednesday, October 10, 2007 9:39:49 AM
Subject: commandLink skips action when rendered=false
Hi,
We have a bit of a chicken and egg problem here:
<h:commandLink value="next" rendered="${not empty results}">
<f:actionListener type="example.GetNextResults"/>
</h:commandLink>
Since we're using the request scope for results this value is empty when
the commandLink is decoded and the event and actionListener aren't queued.
Any suggestions?
Cheers,
Roger
--
------------------------------------
Ninth Avenue Software
p: +61 7 3137 1351 (UTC +10)
f: +61 7 3102 9141
w:
http://www.ninthavenue.com.au
e: info@ninthavenue.com.au
------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@javaserverfaces.dev.java.net
For additional commands, e-mail: users-help@javaserverfaces.dev.java.net
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting