Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Passing action parameters from JSF to backing beans

843844Aug 25 2009 — edited Aug 25 2009
I am trying to pass a parameter through a command link from JSF to backing beans. But when I am trying to get that parameter in my bean it is returning a null value. Please refer the code below.

JSF Coding:
<h:commandLink value="#{searchResults.netid}" action="#{managebean.DeleteConfirmation}">
        <f:param name="netid" value="#{searchResults.netid}" />
  </h:commandLink>
Coding in my bean:
String userid=(String) FacesContext.getCurrentInstance().getExternalContext()
        .getSessionMap().get("netid");
faces-config.xml
<managed-bean>
    <managed-bean-name>managebean</managed-bean-name>
   <managed-bean-class>com.worker.Manager</managed-bean-class>
   <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
When i print the string userid it is showing as null.
Please help me with this issue,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 22 2009
Added on Aug 25 2009
4 comments
270 views