From jira-events at lists.jboss.org Thu Apr 15 05:25:25 2010 Content-Type: multipart/mixed; boundary="===============4107077608793488542==" MIME-Version: 1.0 From: Fabrice Lucien (JIRA) To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] Created: (RF-8594) a4j components don't work well inside a custom component Date: Thu, 15 Apr 2010 05:25:25 -0400 Message-ID: <1681004664.1271323525648.JavaMail.jboss@jira01.app.mwc.hst.phx2.redhat.com> --===============4107077608793488542== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable a4j components don't work well inside a custom component -------------------------------------------------------- Key: RF-8594 URL: https://jira.jboss.org/jira/browse/RF-8594 Project: RichFaces Issue Type: Bug Security Level: Public (Everyone can see) Components: component-a4j-core Affects Versions: 3.3.3.Final Environment: Windows XP, Firefox 3.6 and IE6 Tomcat 6 Reporter: Fabrice Lucien When I use a inside a custom component (with or without face= let), the ajax request doesn't work well. When it's used in a page there're no problem, but the same code copy-paste = inside a facelet template for a component for example doesn't work. Then I tried to create a component without facelet with java code, and I ha= de the same behavior. The code generated is nearly the same. The first problem I saw when filtering requests is the absence of requests = for the javascript files. These 3 GET requests are not done: http://xx/a4j/g/3_3_0.GAorg.ajax4jsf.javascript.AjaxScript http://xx/a4j/g/3_3_0.GAorg/ajax4jsf/javascript/scripts/form.js http://xx/a4j/g/3_3_0.GAorg/richfaces/renderkit/html/scripts/skinning.js To have a woraround I put my custom component on a page using directly a4j. Then when I have the script file, the POST method was done but there were n= o server side effect. My scenario was the update of an attribute of a backing bean with: -a4j function and a param -an input test and a a4j commandButton I both case when I was able to do the POST for the ajax request, there was = no server side effect. Here is the content of my web page: {code} = {code} Here is the code of the encoding method of the component {code} AjaxForm a4jForm =3D new AjaxForm(); = HtmlInputText headerId=3Dnew HtmlInputText(); ValueExpression veHeaderId =3D context.getApplication() .getExpressionFactory().createValueExpression( context.getELContext(), "#{headerState.activatedHeaderId}", HeaderState= .class); headerId.setValueExpression(UIHeader.FAMILY_NAME, veHeaderId); = HtmlAjaxCommandButton headerIdCommand=3Dnew HtmlAjaxCommandButton(); headerIdCommand.setValue("update"); a4jForm.getChildren().add(headerId); a4jForm.getChildren().add(headerIdCommand); a4jForm.encodeAll(context); {code} Here is the code generated when using directly a4j {code}
{code} Here is the code generated when using my component {code}
{code} Here is the POST method(working) generated with the direct USE of a4j {code} {code} Here is the POST method(not working) generated with my component {code} {code} -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= ps://jira.jboss.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira = --===============4107077608793488542==--