No setter with values through a HashMap

UI Components for JSF
Post Reply
tonico
Posts: 51
Joined: 22 Aug 2010, 00:15

25 Jun 2011, 05:40

I can get values from a HashMap through EL such as this:

Code: Select all

<h:inputText  value="#{myController.myHash[cc.attrs.myKey]}" />
The value shows properly but when I change the value, even if I can see the data gets posted, nothing sets it back to the HashMap's key value again. In other words, the HashMap key value does not get updated. Is this known by anyone else ? I can get the value also through a function but that would also not allow me to set it back. Any alternatives ?

Thanks
- Tonico
Primefaces 2.2.1 - Glassfish 3.1 - Mac OS X Lion

robert.m
Posts: 226
Joined: 07 Dec 2010, 22:52
Location: Salzburg/Austria

25 Jun 2011, 14:07

While I can't help you with your question, I don't really understand why you would post this question to the PrimeFaces forum. I guess platforms like stackoverflow would be more appropriate, as this question has nothing to do with PrimeFaces. And there are far more people that can help you.

tonico
Posts: 51
Joined: 22 Aug 2010, 00:15

27 Jun 2011, 14:33

The purpose of this posting here is because the nesting of components ( say the below input field within a primefaces panel ) or the usage of event handlers such as p:ajax, could be influential to cause some of the issues. It was my intention to share and obtain other primefaces community user's experience on this issue, which is the purpose of this community forum as well. All users here are also interested to issues that are related to JSF. The combining aspect is that we are primefaces + JSF2 users and we all combine both technologies together.

Having said that... Back to the issue:

I have created a test case that has proven the issue to be JSF2 specific. I have created non primefaces pages where any field setter ( therefore not only HashMaps ) will never trigger if the property field is nested within a JSF container such as UIPanel ( h:panelGrid ) or other container and such container was generated through the binding attribute ( such as

Code: Select all

 <h:panelGrid binding="#{myBinderBean.myPanelComponent}" /> )
.

A bug report was created with Oracle (former Sun) to trach this issue. The bug report is under review and if screened positive I will post its reference here.
- Tonico
Primefaces 2.2.1 - Glassfish 3.1 - Mac OS X Lion

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 64 guests