[richfaces-issues] [JBoss JIRA] Resolved: (RF-4345) aj4:commandButton with immeadiate="true" does not rerender properly
Nick Belaevski (JIRA)
jira-events at lists.jboss.org
Sat Aug 30 19:23:38 EDT 2008
[ https://jira.jboss.org/jira/browse/RF-4345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nick Belaevski resolved RF-4345.
--------------------------------
Resolution: Rejected
Assignee: Tsikhon Kuprevich (was: Nick Belaevski)
Not a bug: listShuttle re-submits changed value from the client. Add h:inputText and see the same behavior.
Possible options:
1. Make link ajaxSingle so that listShuttle won't be decoded
2. Bind listShuttle to bean property and setSubmittedValue(null) in reset action:
private EditableValueHolder component;
public void reset()
{
init();
this.component.setSubmittedValue(null);
System.out.println("init");
}
> aj4:commandButton with immeadiate="true" does not rerender properly
> -------------------------------------------------------------------
>
> Key: RF-4345
> URL: https://jira.jboss.org/jira/browse/RF-4345
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.2.1
> Environment: Ubuntu 8.04 64bit, JDK 6 update 6, Jboss App-Server 4.2.2. Firefox 3.0.1
> Reporter: Oliver Freivogel
> Assignee: Tsikhon Kuprevich
>
> Resetting a list shuttle and re rendering the view, with the the immediate attribute of the commandButton set to "true" does not work properly; at least testet with firefox 3.0.1.
> Here the code used:
> the facelets viw:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:rich="http://richfaces.org/rich">
> <head>
> <title></title>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
>
> </head>
> <body>
> <a4j:outputPanel id="wizard">
> <h:form id="propertySelector">
> <rich:listShuttle id="properties" sourceValue="#{attributeSelector2.addable}"
> targetValue="#{attributeSelector2.selected}" var="item"
> sourceCaptionLabel="Source"
> targetCaptionLabel="target"
> showButtonLabels="false"
> listsHeight="150" sourceListWidth="250" targetListWidth="250">
> <h:column>
> <f:facet name="header">
> <h:outputText value="Entity" />
> </f:facet>
> <h:outputText value="#{item}" />
> </h:column>
> <h:column>
> <f:facet name="header">
> <h:outputText value="Property" />
> </f:facet>
> <h:outputText value="#{item}"></h:outputText>
> </h:column>
> </rich:listShuttle>
>
> <a4j:outputPanel layout="block" style="margin-top:5px">
> <h:commandButton value="back"
> action="#{attributeSelector2.back}" />
> <a4j:commandButton value="reset"
> action="#{attributeSelector2.reset}" immediate="true"
> reRender="wizard"/>
> </a4j:outputPanel>
> </h:form>
> </a4j:outputPanel>
> </body>
> </html>
> The backing bean:
> import java.util.ArrayList;
> import java.util.Collections;
> import java.util.List;
> import java.util.Map;
> import javax.annotation.PostConstruct;
> /**
> * Backing Bean for selecting Attributes
> *
> * @author Oliver Freivogel
> * @version 1.0
> */
> public class AttributeSelectorBean
> {
> public AttributeSelectorBean()
> {
> source = Collections.emptyList();
> target = Collections.emptyList();
> }
>
> @PostConstruct
> public void init()
> {
> source = new ArrayList<String>();
> source.add("test");
> source.add("bla");
> source.add("gugus");
> target = new ArrayList<String>();
>
> }
>
> public List<String> getAddable()
> {
> return this.source;
> }
> public void setAddable(List<String> addableProperties)
> {
> this.source = addableProperties;
> }
> public List<String> getSelected()
> {
> return this.target;
> }
> public void setSelected(List<String> selectedProperties)
> {
> this.target = selectedProperties;
> }
>
> public void reset()
> {
> init();
> System.out.println("init");
> }
>
> public String back()
> {
> return "back";
> }
>
> public String done()
> {
>
> return "done";
> }
>
> private List<String> source;
> private List<String> target;
> }
--
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
More information about the richfaces-issues
mailing list