Re: Tap-5.3-beta-16 tapestry-core v. tapestry-hibernate
...So that was the cause for my random problems in the other post: http://tapestry-users.832.n2.nabble.com/SetupRender-not-called-td6854976.html I had this error for Palette, too! Haven't seen the exception for a few days now, so I guess your change made it into my branch :-) Am 04.10.2011 um 15:58 schrieb Emmanuel DEMEY: Hi Tony I just have a look to your issue, and I think it should work now (with the last version available on Github). I have forgotten to suppress a comment in my FormResourcesInclusionWorker.java in Tapestry5-jQuery. This worker has to be used just for the Form Component, but was used for all components. BUT ... I have a question about this issue. In fact, in my worker, I add an advice to a SetupRender method : PlasticMethod setupRender = plasticClass.introduceMethod(TransformConstants.SETUP_RENDER_DESCRIPTION); setupRender.addAdvice(new MethodAdvice() { public void advise(MethodInvocation invocation) { javaScriptSupport.importStack(FormSupportStack.STACK_ID); invocation.proceed(); } }); model.addRenderPhase(SetupRender.class); With my previous mistake, this worker was executed also for the TextField component. The Texfield Class extends AbstractTextField, and this one extends AbstractField. I found just one SetupRender method in the AbstractField class. When Tony tested his page, the SetupRender method of the AbstractField was never called, so the ClientId and ControlName were never initialized. So, in the generated HTML, both attributes are missing. Is it normal ? Or am I missing something ? Thanks Emmanuel 2011/10/3 Tony Nelson tnel...@starpoint.com I have found with the latest Tap5.3 beta that the html generated from a simple textfield differs significantly if you are using tapestry-core or tapestry-hibernate. In my .tml file I have the following simple input: t:label for=usernameUsername: /t:label t:textfield t:id=username value=username class=username / When this is run with tapestry-core I get the following html: label for=usernameUsername: /label input class=username value=f...@bar.com id=username name=username type=text When I run the same template with tapestry-hibernate I get the following html: labelUsername: /label input class=username value=f...@bar.com type=text Notice the tapestry-hibernate version is missing the id attribute which is causing my javascript to fail (and I think when the form is submitted, tap can't seem to decode the values). I've put together a small sample app that you can clone from github that demonstrates the problem: https://github.com/hhubris/broken Simply change the tapestry dependency from tapestry-core to tapestry-hibernate and restart jetty with mvn clean jetty:run to see the problem. Any help would be greatly appreciated. Thanks Tony Nelson Starpoint Solutions - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tap-5.3-beta-16 tapestry-core v. tapestry-hibernate
Could this be a normal Java method overriding thing? i.e. if you override setupRender() in a child class you need to call super.setupRender() to get execute the parent's method...? Steve. On 4 October 2011 21:58, Emmanuel DEMEY emmanuel.de...@atos.net wrote: Hi Tony I just have a look to your issue, and I think it should work now (with the last version available on Github). I have forgotten to suppress a comment in my FormResourcesInclusionWorker.java in Tapestry5-jQuery. This worker has to be used just for the Form Component, but was used for all components. BUT ... I have a question about this issue. In fact, in my worker, I add an advice to a SetupRender method : PlasticMethod setupRender = plasticClass.introduceMethod(TransformConstants.SETUP_RENDER_DESCRIPTION); setupRender.addAdvice(new MethodAdvice() { public void advise(MethodInvocation invocation) { javaScriptSupport.importStack(FormSupportStack.STACK_ID); invocation.proceed(); } }); model.addRenderPhase(SetupRender.class); With my previous mistake, this worker was executed also for the TextField component. The Texfield Class extends AbstractTextField, and this one extends AbstractField. I found just one SetupRender method in the AbstractField class. When Tony tested his page, the SetupRender method of the AbstractField was never called, so the ClientId and ControlName were never initialized. So, in the generated HTML, both attributes are missing. Is it normal ? Or am I missing something ? Thanks Emmanuel 2011/10/3 Tony Nelson tnel...@starpoint.com I have found with the latest Tap5.3 beta that the html generated from a simple textfield differs significantly if you are using tapestry-core or tapestry-hibernate. In my .tml file I have the following simple input: t:label for=usernameUsername: /t:label t:textfield t:id=username value=username class=username / When this is run with tapestry-core I get the following html: label for=usernameUsername: /label input class=username value=f...@bar.com id=username name=username type=text When I run the same template with tapestry-hibernate I get the following html: labelUsername: /label input class=username value=f...@bar.com type=text Notice the tapestry-hibernate version is missing the id attribute which is causing my javascript to fail (and I think when the form is submitted, tap can't seem to decode the values). I've put together a small sample app that you can clone from github that demonstrates the problem: https://github.com/hhubris/broken Simply change the tapestry dependency from tapestry-core to tapestry-hibernate and restart jetty with mvn clean jetty:run to see the problem. Any help would be greatly appreciated. Thanks Tony Nelson Starpoint Solutions - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tap-5.3-beta-16 tapestry-core v. tapestry-hibernate
Hi Tony I just have a look to your issue, and I think it should work now (with the last version available on Github). I have forgotten to suppress a comment in my FormResourcesInclusionWorker.java in Tapestry5-jQuery. This worker has to be used just for the Form Component, but was used for all components. BUT ... I have a question about this issue. In fact, in my worker, I add an advice to a SetupRender method : PlasticMethod setupRender = plasticClass.introduceMethod(TransformConstants.SETUP_RENDER_DESCRIPTION); setupRender.addAdvice(new MethodAdvice() { public void advise(MethodInvocation invocation) { javaScriptSupport.importStack(FormSupportStack.STACK_ID); invocation.proceed(); } }); model.addRenderPhase(SetupRender.class); With my previous mistake, this worker was executed also for the TextField component. The Texfield Class extends AbstractTextField, and this one extends AbstractField. I found just one SetupRender method in the AbstractField class. When Tony tested his page, the SetupRender method of the AbstractField was never called, so the ClientId and ControlName were never initialized. So, in the generated HTML, both attributes are missing. Is it normal ? Or am I missing something ? Thanks Emmanuel 2011/10/3 Tony Nelson tnel...@starpoint.com I have found with the latest Tap5.3 beta that the html generated from a simple textfield differs significantly if you are using tapestry-core or tapestry-hibernate. In my .tml file I have the following simple input: t:label for=usernameUsername: /t:label t:textfield t:id=username value=username class=username / When this is run with tapestry-core I get the following html: label for=usernameUsername: /label input class=username value=f...@bar.com id=username name=username type=text When I run the same template with tapestry-hibernate I get the following html: labelUsername: /label input class=username value=f...@bar.com type=text Notice the tapestry-hibernate version is missing the id attribute which is causing my javascript to fail (and I think when the form is submitted, tap can't seem to decode the values). I've put together a small sample app that you can clone from github that demonstrates the problem: https://github.com/hhubris/broken Simply change the tapestry dependency from tapestry-core to tapestry-hibernate and restart jetty with mvn clean jetty:run to see the problem. Any help would be greatly appreciated. Thanks Tony Nelson Starpoint Solutions
Tap-5.3-beta-16 tapestry-core v. tapestry-hibernate
I have found with the latest Tap5.3 beta that the html generated from a simple textfield differs significantly if you are using tapestry-core or tapestry-hibernate. In my .tml file I have the following simple input: t:label for=usernameUsername: /t:label t:textfield t:id=username value=username class=username / When this is run with tapestry-core I get the following html: label for=usernameUsername: /label input class=username value=f...@bar.com id=username name=username type=text When I run the same template with tapestry-hibernate I get the following html: labelUsername: /label input class=username value=f...@bar.com type=text Notice the tapestry-hibernate version is missing the id attribute which is causing my javascript to fail (and I think when the form is submitted, tap can't seem to decode the values). I've put together a small sample app that you can clone from github that demonstrates the problem: https://github.com/hhubris/broken Simply change the tapestry dependency from tapestry-core to tapestry-hibernate and restart jetty with mvn clean jetty:run to see the problem. Any help would be greatly appreciated. Thanks Tony Nelson Starpoint Solutions