-
15. Re: Problem with expanding rich:tree after ajax rerender
pietruha Nov 25, 2008 5:05 PM (in response to pietruha)Thanks! And maybe new bug:
Not only expanding does not work after rerendering. Change switchType into "client" and assign treeNode with a4j:commandLink connected to any bean method by "action" parameter. Then, after the tree appears none of links works, they do not couse method to be run on server. -
16. Re: Problem with expanding rich:tree after ajax rerender
tromanovich Nov 26, 2008 12:49 PM (in response to pietruha)I can't reproduce last case
See my example:
component on the page:
<rich:tree value="#{mainBean.tree}" nodeFace="one" var="treeValue" ..... switchType="client">
<rich:treeNode type="one" />
<h:outputText value="#{treeValue.value}"/>
<a4j:commandLink action="#{mainBean.test}" value="Click here!"/>
</rich:treeNode>
</rich:tree>
bean:
public void test() {
System.out.println("Test passed");
}
Could you correct me? -
17. Re: Problem with expanding rich:tree after ajax rerender
pietruha Nov 26, 2008 2:35 PM (in response to pietruha)Code is similar as in project which I provide:
<h:outputText value="Tree enabled:" /> <h:selectBooleanCheckbox value="#{ctrl}"> <a4j:support event="onclick" reRender="treePanel" ajaxSingle="true"/> </h:selectBooleanCheckbox> <a4j:outputPanel id="treePanel"> <h:panelGroup rendered="#{ctrl}"> <rich:tree switchType="client"> <rich:recursiveTreeNodesAdaptor roots="#{treeRoot}" nodes="#{bean.children}" var="bean"> <rich:treeNode> <a4j:commandLink value="#{bean}" action="#{manager.setValue(bean.value)}" reRender="destPanel"/> </rich:treeNode> </rich:recursiveTreeNodesAdaptor> </rich:tree> </h:panelGroup> </a4j:outputPanel> <a4j:outputPanel id="destPanel"> <h:outputText value="#{beanValue}" /> </a4j:outputPanel>
And in session bean:@Out(required = false) private String beanValue; public void setValue(String value) { log.info("Setting value to '#0'", value); beanValue = value; }
If the tree is visible when a page is rendered everything works fine.
Here is a project ready to deploy: http://pietruha.serveftp.net/down/test2/testproject.ear -
18. Re: Problem with expanding rich:tree after ajax rerender
tromanovich Nov 27, 2008 6:31 AM (in response to pietruha)Thank You very much for example.
It's new critical bug (https://jira.jboss.org/jira/browse/RF-5103) -
19. Re: Problem with expanding rich:tree after ajax rerender
tromanovich Nov 27, 2008 9:20 AM (in response to pietruha)and here (http://www.sendspace.com/file/r78ax5) you can see screen with applied skin for my example[/url]
-
20. Re: Problem with expanding rich:tree after ajax rerender
tromanovich Nov 27, 2008 9:23 AM (in response to pietruha)"tromanovich" wrote:
and here (http://www.sendspace.com/file/r78ax5) you can see screen with applied skin for my example[/url]
I'm sorry it was message for another topic, unfortunately I can't remove it -
21. Re: Problem with expanding rich:tree after ajax rerender
tromanovich Dec 1, 2008 11:28 AM (in response to pietruha)Verify, please, bean scope. My bean has 'request' scope, so there were that situation. When I set session scope, command elements will work fine:
<managed-bean>
<managed-bean-name>mainBean</managed-bean-name>
<managed-bean-class>Main</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean> -
22. Re: Problem with expanding rich:tree after ajax rerender
nbelaevski Dec 1, 2008 12:45 PM (in response to pietruha)Pietruha,
I've added this to your EAR file:package pietruha.testproject; import org.jboss.seam.ScopeType; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.Scope; @Name("ctrl") @Scope(ScopeType.SESSION) public class Ctrl { private boolean rendered; public boolean isRendered() { return rendered; } public void setRendered(boolean rendered) { this.rendered = rendered; } }
and:
1. Ajax tree expands/collapses
2. Links are working