Announcement Announcement Module
Collapse
No announcement yet.
How do I bind managed-properties to parameters when using annotations for JSF beans? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I bind managed-properties to parameters when using annotations for JSF beans?

    I've recently switched from using XML in faces-config.xml to using Spring's annotations to define my JSF managed beans. I learned how to do this based on the following article:

    http://weblogs.java.net/blog/caroljm...pplicat_5.html

    However, I can't seem to figure out how to bind properties to parameters when using Spring's annotations. When using a managed-bean definition, I was able to do the following:

    Code:
    <managed-property>
        <property-name>id</property-name>
        <value>#{param.id}</value>
    </managed-property>
    Is it possible to do something similar with annotations (or by configuring additional XML)?

    My current workaround is to get the request parameter using JSF's somewhat painful syntax:

    Code:
    FacesContext.getCurrentInstance().getExternalContext().getRequest().getParameter("id");
    Thanks,

    Matt
Working...
X