Hi Werner,
Yes, you are right. But I still cannot get the values in my backing
bean.
Jsp code:
<t:commandLink value="Add Reminders" styleClass="linkClass"
action="#{reminderController.showAddReminderScreen}"
actionListener="#{breadCrumbNavigatorBean.updateBreadCrumb}"
rendered="#{!physicianHomeController.showRemindersMoreLink}">
<t:updateActionListener
property="#{breadCrumbNavigatorBean.participant.displayText}"
value="#{msg['nav.msg.remiders']}"/>
</t:commandLink>
BreadCrumbNavigator.java (managed bean named as per config file is
breadCrumbNavitatorBean)
private BreadCrumbParticipant participant = null;
public BreadCrumbParticipant getParticipant() {
if (null == participant) {
participant = new BreadCrumbParticipant();
}
return participant;
}
And there are setter method as well.
Now when I access participant in the action listener method
-updateBreadCrumb, then the participant itself is not null but the
displayText property set using t:updateActionListener is null.
Any ideas what is going wrong here?
Regards,
Madhav
> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Werner Punz
> Sent: Tuesday, March 06, 2007 3:16 PM
> To: [email protected]
> Subject: Re: how do you pass/set parameters upon ActionListener
execution?
>
>
> This is not quite true, the updateActionListener
> sets the parameters bevore the invocation of the action
> this is due to jfs lifecycle where the apply request values
> is before the action, which phase depends on your immediate value:
>
> I quote the original docs here:
>
> >Both the fetching of "value" and the updating of "property" occur in
> >the invoke-application phase unless "immediate" is set on the
> >ActionSource component in which case they both occur in the
> >apply-request-values phase. The update is guaranteed to occur before
> >the invocation of the method specified by attribute "action" on the
> >ActionSource (because all actionListeners are executed before the
> >action attribute).
>
> so you basically already have the params available before you go into
> the action.
>
> so you do not have params per se in an action but you can push params
> into your bean bevore invoking the action.
>
>
>
> Madhav Bhargava schrieb:
> > Hi All,
> >
> >
> >
> > I have a requirement wherein I have to pass some values when an
> > ActionListener is invoked.
> >
> > I am aware of 2 ways:
> >
> >
> >
> > 1. f:param
> > 2. t:updateActionListener
> >
> >
> >
> > The only problem is that both of the above only do what they do when
an
> > action method is invoked. Since I want the values inside my
> > ActionListener method none of the above will work for me.
> >
> > The only way left for me as of now is having a hidden field and
writing
> > an onclick javascript which will then populate the hidden field with
the
> > value that I want.
> >
> > I am not sure whether having hidden fields to hold values is a good
> > solution.
> >
> >
> >
> > Is there any other more elegant way to pass in values which can then
be
> > accessed from inside the ActionListener method?
> >
> >
> >
> > Rgds,
> >
> > Madhav
> >
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are
not to copy, disclose, or distribute this e-mail or its contents to any other
person and any such actions are unlawful. This e-mail may contain viruses.
Infosys has taken every reasonable precaution to minimize this risk, but is not
liable for any damage you may sustain as a result of any virus in this e-mail.
You should carry out your own virus checks before opening the e-mail or
attachment. Infosys reserves the right to monitor and review the content of all
messages sent to or from this e-mail address. Messages sent to or from this
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***