Hi All,

It is easy to set the action for a ActionSource component when the action
name is a valueReference pointing to a method. Following code will do it:

if (UIComponentTag.isValueReference(action)) {

           ((ActionSource) component).setAction(FacesContext


.getCurrentInstance().getApplication().createMethodBinding(

                                   action, new Class[] {}));

}

The problem that I am facing is that I have a HtmlCommandNavigationItem
which extends org.apache.myfaces.component.html.ext.HtmlCommandLink

I need to do something like:

<t:commandNavigation2 id="id5_1" action="changepassword">

           <h:outputText value="#{msg['nav.changepassword']}" />

</t:commandNavigation2>

Here the action attribute is set to a string which is not a method name.
This string is defined as an outcome in faces-config.xml. I need to set this
action attribute programmatically but the only method available is
setAction(MethodBinding mb)

Since this string is not a method I cannot use this method. I could not
find any other way to handle this.

Does anyone know how to set the action attribute to a string which is not a
method programmatically?

Rgds,

Madhav


--
When I tell the truth, it is not for the sake of convincing those who do not
know it, but for the sake of defending those that do

Reply via email to