[
https://jira.jboss.org/jira/browse/RF-8527?page=com.atlassian.jira.plugin...
]
janssk1 commented on RF-8527:
-----------------------------
FYI: I created a subclass of togglepanel to workaround this problem, as well as another
problem (active panel was never 'pushed' to the associated variable binding)
/**
* Richfaces Togglepanel extension that only decodes the 'active' panel..
*/
public class HtmlTogglePanelFix extends HtmlTogglePanel {
/**
* This method is override by {@link org.richfaces.component.UISwitchablePanel} for
unknown reasons.
* Since the override causes issues (local values never updated..), i'm undoing
the override by overriding again :-)
* @param context
*/
@Override
public void updateModel(FacesContext context) {
if (!isValid())
{
return;
}
if (!isLocalValueSet())
{
return;
}
ValueExpression expression = getValueExpression("value");
if (expression == null)
{
return;
}
try
{
expression.setValue(context.getELContext(), getLocalValue());
setValue(null);
setLocalValueSet(false);
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
@Override
protected Iterator<UIComponent> getSwitchedFacetsAndChildren() {
final Object renderedValue = getValue();
if (CLIENT_METHOD.equals(getSwitchType())) {
return getFacets().values().iterator();
} else {
List<UIComponent> facets = new LinkedList<UIComponent>();
for (Map.Entry<String, UIComponent> entry : getFacets().entrySet()) {
if (renderedValue != null && renderedValue.equals(entry.getKey()))
{
facets.add(entry.getValue());
}
}
return facets.iterator();
}
}
}
TogglePanel decodes all facets instead of only the active one
-------------------------------------------------------------
Key: RF-8527
URL:
https://jira.jboss.org/jira/browse/RF-8527
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-panels-layout-themes
Affects Versions: 3.3.3.CR1
Reporter: Nick Belaevski
Assignee: Nick Belaevski
Fix For: Future
See linked forum thread
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira