Author: F.antonov
Date: 2007-05-02 09:25:52 -0400 (Wed, 02 May 2007)
New Revision: 605
Modified:
trunk/richfaces/togglePanel/src/main/java/org/richfaces/renderkit/html/TogglePanelRenderer.java
Log:
Fix for bug
http://jira.jboss.com/jira/browse/RF-124.
Modified:
trunk/richfaces/togglePanel/src/main/java/org/richfaces/renderkit/html/TogglePanelRenderer.java
===================================================================
---
trunk/richfaces/togglePanel/src/main/java/org/richfaces/renderkit/html/TogglePanelRenderer.java 2007-05-02
12:53:26 UTC (rev 604)
+++
trunk/richfaces/togglePanel/src/main/java/org/richfaces/renderkit/html/TogglePanelRenderer.java 2007-05-02
13:25:52 UTC (rev 605)
@@ -167,4 +167,14 @@
public boolean getRendersChildren() {
return true;
}
+
+ public void setValue(FacesContext context, UIComponent component) {
+ UITogglePanel panel = (UITogglePanel) component;
+ Object value = panel.getValue();
+ if (value == null) {
+ value = panel.getStateOrderList().size() > 0
+ ? panel.getStateOrderList().get(0) : "";
+ panel.setValue(value);
+ }
+ }
}
\ No newline at end of file