From jira-events at lists.jboss.org Thu Apr 15 05:25:25 2010 Content-Type: multipart/mixed; boundary="===============0083068215358442078==" 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> --===============0083068215358442078== 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 = --===============0083068215358442078==-- From jira-events at lists.jboss.org Thu Apr 15 05:53:25 2010 Content-Type: multipart/mixed; boundary="===============7879509972005020437==" MIME-Version: 1.0 From: Fabrice Lucien (JIRA) To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] Updated: (RF-8594) a4j components don't work well inside a custom component Date: Thu, 15 Apr 2010 05:53:25 -0400 Message-ID: <508731269.1271325205728.JavaMail.jboss@jira01.app.mwc.hst.phx2.redhat.com> In-Reply-To: 1681004664.1271323525648.JavaMail.jboss@jira01.app.mwc.hst.phx2.redhat.com --===============7879509972005020437== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://jira.jboss.org/jira/browse/RF-8594?page=3Dcom.atlassian.jira= .plugin.system.issuetabpanels:all-tabpanel ] Fabrice Lucien updated RF-8594: ------------------------------- Attachment: project.zip Related project to test quickly > 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 > Attachments: project.zip > > > When I use a inside a custom component (with or without fa= celet), the ajax request doesn't work well. > When it's used in a page there're no problem, but the same code copy-past= e 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 = hade the same behavior. > The code generated is nearly the same. > The first problem I saw when filtering requests is the absence of request= s 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 a4= j. > Then when I have the script file, the POST method was done but there were= no 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 wa= s 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}", HeaderSta= te.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} > > <= /body> > {code} > Here is the POST method(not working) generated with my component > {code} > > <= /body> > {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 = --===============7879509972005020437==-- From jira-events at lists.jboss.org Thu Apr 15 08:47:26 2010 Content-Type: multipart/mixed; boundary="===============7642622211916278769==" MIME-Version: 1.0 From: Nick Belaevski (JIRA) To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] Resolved: (RF-8594) a4j components don't work well inside a custom component Date: Thu, 15 Apr 2010 08:47:26 -0400 Message-ID: <1086068238.1271335646459.JavaMail.jboss@jira01.app.mwc.hst.phx2.redhat.com> In-Reply-To: 1681004664.1271323525648.JavaMail.jboss@jira01.app.mwc.hst.phx2.redhat.com --===============7642622211916278769== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://jira.jboss.org/jira/browse/RF-8594?page=3Dcom.atlassian.jira= .plugin.system.issuetabpanels:all-tabpanel ] Nick Belaevski resolved RF-8594. -------------------------------- Resolution: Rejected Assignee: Nick Belaevski Not a bug, the problem is in custom component code. You should add componen= ts to the tree, not just encode them. = > 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 > Assignee: Nick Belaevski > Attachments: project.zip > > > When I use a inside a custom component (with or without fa= celet), the ajax request doesn't work well. > When it's used in a page there're no problem, but the same code copy-past= e 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 = hade the same behavior. > The code generated is nearly the same. > The first problem I saw when filtering requests is the absence of request= s 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 a4= j. > Then when I have the script file, the POST method was done but there were= no 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 wa= s 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}", HeaderSta= te.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} > > <= /body> > {code} > Here is the POST method(not working) generated with my component > {code} > > <= /body> > {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 = --===============7642622211916278769==--