-
15. Re: seam 2.0 - problem upgrading to richfaces 3.2.0 GA from
bpons Apr 2, 2008 11:33 AM (in response to powerhouse_b)"SergeySmirnov" wrote:
<h:form> <h:inputText value="#{2==2}" /> </h:form>
Well sure this works... just like<h:inputText value="${2==2}" />
I must be missing something...
what's the point? -
16. Re: seam 2.0 - problem upgrading to richfaces 3.2.0 GA from
opr Apr 2, 2008 11:35 AM (in response to powerhouse_b)@Sergej
I understand this issue, but if I use an expression to write into - a session scoped value - it does not maintain the expanded value -
17. Re: seam 2.0 - problem upgrading to richfaces 3.2.0 GA from
opr Apr 2, 2008 11:39 AM (in response to powerhouse_b)and btw
expanded = "true"
works. Only if I use EL expression something goes wrong. -
18. Re: seam 2.0 - problem upgrading to richfaces 3.2.0 GA from
sergeysmirnov Apr 2, 2008 12:43 PM (in response to powerhouse_b)"sintaxeror" wrote:
Well sure this works... just like<h:inputText value="${2==2}" />
I must be missing something...
what's the point?
This was exactly the point; To check how the standard component with read/write attribute works with EL.
Result.
The deferral EL like "#{2==2}" are failed.
The immediate EL like "${2==2}" works
So, reopen the issue with note that it should work with immediate EL. Refer to this forum post. -
19. Re: seam 2.0 - problem upgrading to richfaces 3.2.0 GA from
bpons Apr 2, 2008 1:52 PM (in response to powerhouse_b)"SergeySmirnov" wrote:
"sintaxeror" wrote:
Well sure this works... just like<h:inputText value="${2==2}" />
I must be missing something...
what's the point?
This was exactly the point; To check how the standard component with read/write attribute works with EL.
Result.
The deferral EL like "#{2==2}" are failed.
The immediate EL like "${2==2}" works
So, reopen the issue with note that it should work with immediate EL. Refer to this forum post.
Sergey,
I'm not quite sure i understand, since both fails for me with the expanded attribute of the panelMenuGroup, and both works for me with <h:inputText>,
anyway, i'll reopen the issue as you said... -
20. Re: seam 2.0 - problem upgrading to richfaces 3.2.0 GA from
bpons Apr 2, 2008 2:00 PM (in response to powerhouse_b)BTW,
I wonder if all would not be simpler if you just assume that when selectedChild attribute of the panelMenu is set, then the developper certainly wish that the corresponding panelMenuGroup (and his possible parents) is/are expanded.... -
21. Re: seam 2.0 - problem upgrading to richfaces 3.2.0 GA from
opr Apr 3, 2008 5:47 AM (in response to powerhouse_b)Finally I created the following workarround:
1) Store the expand/collapse information for every PanelMenuGroup in a session scoped bean
2) Patch org.richfaces.component.UIPanelMenuGroup.java by reimplementing the setter and getter for the "expanded"-Attribute in the following way:public boolean isExpanded(){ SessionBean sb = (SessionBean)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("sessionBean"); return sb.getExpansionMap().get(this.getId()).booleanValue(); } public void setExpanded(boolean expanded){ SessionBean sb = (SessionBean)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("sessionBean"); setValue(sb.getExpansionMap().get(this.getId()).booleanValue()); }
My Session Bean containsprivate HashMap<String, Boolean> expansionMap = new HashMap<String, Boolean>(); public SessionBean() { expansionMap.put("pg1", new Boolean(false)); expansionMap.put("pg2", new Boolean(false)); expansionMap.put("pg3", new Boolean(false)); expansionMap.put("pg4", new Boolean(false)); expansionMap.put("pg5", new Boolean(false)); expansionMap.put("pg6", new Boolean(false)); expansionMap.put("pg7", new Boolean(false)); expansionMap.put("pg8", new Boolean(false)); expansionMap.put("pg9", new Boolean(false)); expansionMap.put("pg10", new Boolean(false)); expansionMap.put("pg11", new Boolean(false)); }
In the action method the boolean values are toggled in the following way:
public void menuAction(ActionEvent ae) { if (ae.getComponent().getId().equals("pg1")) expansionMap.put("pg1", new Boolean(!expansionMap.get("pg1").booleanValue())); if (ae.getComponent().getId().equals("pg2")) expansionMap.put("pg2", new Boolean(!expansionMap.get("pg2").booleanValue())); if (ae.getComponent().getId().equals("pg3")) expansionMap.put("pg3", new Boolean(!expansionMap.get("pg3").booleanValue())); if (ae.getComponent().getId().equals("pg4")) expansionMap.put("pg4", new Boolean(!expansionMap.get("pg4").booleanValue())); if (ae.getComponent().getId().equals("pg5")) expansionMap.put("pg5", new Boolean(!expansionMap.get("pg5").booleanValue())); if (ae.getComponent().getId().equals("pg6")) expansionMap.put("pg6", new Boolean(!expansionMap.get("pg6").booleanValue())); if (ae.getComponent().getId().equals("pg7")) expansionMap.put("pg7", new Boolean(!expansionMap.get("pg7").booleanValue())); if (ae.getComponent().getId().equals("pg8")) expansionMap.put("pg8", new Boolean(!expansionMap.get("pg8").booleanValue())); if (ae.getComponent().getId().equals("pg9")) expansionMap.put("pg9", new Boolean(!expansionMap.get("pg9").booleanValue())); if (ae.getComponent().getId().equals("pg10")) expansionMap.put("pg10", new Boolean(!expansionMap.get("pg10").booleanValue())); if (ae.getComponent().getId().equals("pg11")) expansionMap.put("pg11", new Boolean(!expansionMap.get("pg11").booleanValue())); }
Dirty, but works.... -
22. Re: seam 2.0 - problem upgrading to richfaces 3.2.0 GA from
nbelaevski Apr 3, 2008 10:20 AM (in response to powerhouse_b)Hello,
I've created RFC: http://jira.jboss.com/jira/browse/RF-2957 for autoexpansion attribute.
BTW, I've tried<h:inputText value="${2 == 2}" />
and got:03.04.2008 17:04:38 javax.faces.component.UIInput updateModel SEVERE: /pages/test1.xhtml @14,36 value="${2 == 2}": Illegal Syntax for Set Operation 03.04.2008 17:04:38 com.sun.faces.lifecycle.RenderResponsePhase execute INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed. sourceId=j_id0:j_id1[severity=(ERROR 2), summary=(/pages/test1.xhtml @14,36 value="${2 == 2}": Illegal Syntax for Set Operation), detail=(/pages/test1.xhtml @14,36 value="${2 == 2}": Illegal Syntax for Set Operation)]
so that still doesn't work well. Submit form to see the messages -
23. Re: seam 2.0 - problem upgrading to richfaces 3.2.0 GA from
bpons Apr 3, 2008 4:22 PM (in response to powerhouse_b)Thx about the feature request, that's pretty cool.
-
24. Re: seam 2.0 - problem upgrading to richfaces 3.2.0 GA from 3.1.
zsom Jun 9, 2010 4:46 AM (in response to powerhouse_b)Hi!
Can anyone confirm that this issue is now working properly? I ran into it using version 3.3.3.FINAL, but the issue on jira has been closed.
-
26. Re: seam 2.0 - problem upgrading to richfaces 3.2.0 GA from 3.1.
zsom Jun 9, 2010 6:59 AM (in response to ilya_shaikovsky)Oh sorry that's not what I meant. I'm still having problems with EL expressions in the expanded property of the menugroup. The error message is the same as the one in the OP.