jsf - Custom getEntityNameSelectList() fails -


Writing an ordinary JSF application I have done something in the following problem: My organizations Controller One method in the Antitenom Manager class is getEntityNameSelectList () which I can use to populate the combo box. It works and shows all the institutions, because the method of retrieving the institution does not have a section where the section was automatically created.

Now I have to put a similar method, which filters options based on a variable in sessions. To do this, I copied the original method, named it anonymity for the name, the user name (user theUser) and changed the method that changed the database to the query that actually filters by UserId.

However, when trying to load the page, the browser receives an error saying that the "EntityNameSelectListByUser" property does not contain the property in the controller class, because I believe that because of my new method It is believed that this one parameter can not be found. Is there any way I can convey the parameter or session-scanner user-id?

Help in the parameter is prepared for the next maintenance release of the EL (announcement, implementation).


Let's say you do not want to wait for JEE 6, there are several ways to overcome this limit. These contacts are defined as Pigeon Management Beans, so make them aware of your EJB as appropriate.

1.

Call session lookup and function in the backing beam:

  public string getFoo () {FacesContext reference = FacesContext .getCurrentInstance (); ExternalContext ext = context.getExternalContext (); String bar = (string) ext.getSessionMap (). Get ("bar"); Return getFoo (bar); }  

Example Binding:

  # {paramBean.foo}  

2.

.getFoo (bar); }

Example binding:

  # {baz: getFoo (paramBean, bar)}  

3. < / P>

Ignore the map class to call the function (one bit of a hat and limited to one parameter):

  public map & lt; String, string & gt; GetFooMap () {new Hashman & lt; String, string & gt; () {@ Override public string received (of object) {getFoo return (string) key); }}; }    

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -