BeanEditForm does NOT support informal parameters?
Hi, i am using a BeanEditForm and added a class attribute to it, i.e.: t:beaneditform t:id=entity ... class=form-horizontal ... /t:beaneditform but the class attribute does not appear in the actual html code: form enctype=application/x-www-form-urlencoded onsubmit=javascript:return Tapestry.waitForPage(event); action=... method=post id=form BeanEditForm has the @SupportsInformalParameters annotation, so am i missing something or is this a bug? Tapestry version is 5.3.3 Thanks a lot! Felix Scheffer
Re: BeanEditForm does NOT support informal parameters?
Try adding the following attribute: t:mixins=renderInformals If it works, there's a bug ;) On Wednesday, 25 April 2012, Felix Scheffer fschef...@netzgut.net wrote: Hi, i am using a BeanEditForm and added a class attribute to it, i.e.: t:beaneditform t:id=entity ... class=form-horizontal ... /t:beaneditform but the class attribute does not appear in the actual html code: form enctype=application/x-www-form-urlencoded onsubmit=javascript:return Tapestry.waitForPage(event); action=... method=post id=form BeanEditForm has the @SupportsInformalParameters annotation, so am i missing something or is this a bug? Tapestry version is 5.3.3 Thanks a lot! Felix Scheffer
Re: BeanEditForm does NOT support informal parameters?
fyi, it doesn't add the class normally. It works when adding t:mixins=renderInformals I'm on 5.3.2 On 25/04/2012, at 11:22 PM, Lance Java wrote: Try adding the following attribute: t:mixins=renderInformals If it works, there's a bug ;) On Wednesday, 25 April 2012, Felix Scheffer fschef...@netzgut.net wrote: Hi, i am using a BeanEditForm and added a class attribute to it, i.e.: t:beaneditform t:id=entity ... class=form-horizontal ... /t:beaneditform but the class attribute does not appear in the actual html code: form enctype=application/x-www-form-urlencoded onsubmit=javascript:return Tapestry.waitForPage(event); action=... method=post id=form BeanEditForm has the @SupportsInformalParameters annotation, so am i missing something or is this a bug? Tapestry version is 5.3.3 Thanks a lot! Felix Scheffer - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: BeanEditForm does NOT support informal parameters?
was the sarcasm meter on that Lance? :) - hard to tell at nearly midnight On 25/04/2012, at 11:22 PM, Lance Java wrote: Try adding the following attribute: t:mixins=renderInformals If it works, there's a bug ;) On Wednesday, 25 April 2012, Felix Scheffer fschef...@netzgut.net wrote: Hi, i am using a BeanEditForm and added a class attribute to it, i.e.: t:beaneditform t:id=entity ... class=form-horizontal ... /t:beaneditform but the class attribute does not appear in the actual html code: form enctype=application/x-www-form-urlencoded onsubmit=javascript:return Tapestry.waitForPage(event); action=... method=post id=form BeanEditForm has the @SupportsInformalParameters annotation, so am i missing something or is this a bug? Tapestry version is 5.3.3 Thanks a lot! Felix Scheffer - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: BeanEditForm does NOT support informal parameters?
No sarcasm intended It seems that the beanEditForm needs a one-liner added to it ComponentResources.renderInformals(writer) On Wednesday, 25 April 2012, Chris Mylonas ch...@opencsta.org wrote: was the sarcasm meter on that Lance? :) - hard to tell at nearly midnight On 25/04/2012, at 11:22 PM, Lance Java wrote: Try adding the following attribute: t:mixins=renderInformals If it works, there's a bug ;) On Wednesday, 25 April 2012, Felix Scheffer fschef...@netzgut.net wrote: Hi, i am using a BeanEditForm and added a class attribute to it, i.e.: t:beaneditform t:id=entity ... class=form-horizontal ... /t:beaneditform but the class attribute does not appear in the actual html code: form enctype=application/x-www-form-urlencoded onsubmit=javascript:return Tapestry.waitForPage(event); action=... method=post id=form BeanEditForm has the @SupportsInformalParameters annotation, so am i missing something or is this a bug? Tapestry version is 5.3.3 Thanks a lot! Felix Scheffer - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: BeanEditForm does NOT support informal parameters?
On Wed, 25 Apr 2012 10:37:49 -0300, Chris Mylonas ch...@opencsta.org wrote: was the sarcasm meter on that Lance? :) - hard to tell at nearly midnight I'd say that I can't think of any reason BeanEditForm shouldn't render attributes which aren't parameters. JIRA please? :) -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: BeanEditForm does NOT support informal parameters?
It seems that BeanEditor has the same bug. Pls put that in the Jira too Might be an idea to search all components with @SupportsInformalParameters that don't call renderInformalParameters to find any others
Re: BeanEditForm does NOT support informal parameters?
https://issues.apache.org/jira/browse/TAP5-1917 Done. re: sarcasm earlier - there seems to be an increase in is this a bug? tacked onto each problem. I thought you were just having a little fun on the list :) So far today, The List 1 : Tapestry-5.3.x 0 Nice one Felix. Cheers Chris On 25/04/2012, at 11:49 PM, Lance Java wrote: It seems that BeanEditor has the same bug. Pls put that in the Jira too Might be an idea to search all components with @SupportsInformalParameters that don't call renderInformalParameters to find any others
Re: BeanEditForm does NOT support informal parameters?
I'm happy to call a bug a bug but I shall valiantly defend my baby (tapestry) from FUD
Re: BeanEditForm does NOT support informal parameters?
Thanks! That was fast :-) I tried using RenderInformals div t:beaneditform t:id=entity ... t:mixins=RenderInformals class=form-horizontal /div and the result is: div class=form-horizontal form ... /form /div now the class attribute is present, but on the wrong tag (should be on the form tag). Looks like the form tag has not been rendered when RenderInformals.beginRender() method is called. I would expected that BeanEditForm would call resources.renderInformalParameters(writer); but it doesnt. Very confusing... I also tried 5.3.2 and it's exactly the same. Felix Scheffer 2012/4/25 Chris Mylonas ch...@opencsta.org was the sarcasm meter on that Lance? :) - hard to tell at nearly midnight On 25/04/2012, at 11:22 PM, Lance Java wrote: Try adding the following attribute: t:mixins=renderInformals If it works, there's a bug ;) On Wednesday, 25 April 2012, Felix Scheffer fschef...@netzgut.net wrote: Hi, i am using a BeanEditForm and added a class attribute to it, i.e.: t:beaneditform t:id=entity ... class=form-horizontal ... /t:beaneditform but the class attribute does not appear in the actual html code: form enctype=application/x-www-form-urlencoded onsubmit=javascript:return Tapestry.waitForPage(event); action=... method=post id=form BeanEditForm has the @SupportsInformalParameters annotation, so am i missing something or is this a bug? Tapestry version is 5.3.3 Thanks a lot! Felix Scheffer - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: BeanEditForm does NOT support informal parameters?
Thanks guys for the quick response. Much appreciated! 2012/4/25 Chris Mylonas ch...@opencsta.org https://issues.apache.org/jira/browse/TAP5-1917 Done. re: sarcasm earlier - there seems to be an increase in is this a bug? tacked onto each problem. I thought you were just having a little fun on the list :) So far today, The List 1 : Tapestry-5.3.x 0 Nice one Felix. Cheers Chris On 25/04/2012, at 11:49 PM, Lance Java wrote: It seems that BeanEditor has the same bug. Pls put that in the Jira too Might be an idea to search all components with @SupportsInformalParameters that don't call renderInformalParameters to find any others
Re: BeanEditForm does NOT support informal parameters?
GridColoum suffers from the same thing having a look at the code. There is no sign of resources.renderInformalParameters() Same for Grid. hehe what I've learned this week from the list, you'll have to contribute the NoFUD service to the registry with @EagerLoad to get in before the rest of it starts up. Hopefully yuicompressor won't give you schtick in tomcat 7 for multi zoned AJAX with IE6* *please don't mind the embellishment. On 26/04/2012, at 12:06 AM, Lance Java wrote: I'm happy to call a bug a bug but I shall valiantly defend my baby (tapestry) from FUD - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: BeanEditForm does NOT support informal parameters?
Grid works fine. It's using inheritInformalParameters @Component(parameters = class=tableClass, inheritInformalParameters = true) private Any table; 2012/4/25 Chris Mylonas ch...@opencsta.org GridColoum suffers from the same thing having a look at the code. There is no sign of resources.renderInformalParameters() Same for Grid. hehe what I've learned this week from the list, you'll have to contribute the NoFUD service to the registry with @EagerLoad to get in before the rest of it starts up. Hopefully yuicompressor won't give you schtick in tomcat 7 for multi zoned AJAX with IE6* *please don't mind the embellishment. On 26/04/2012, at 12:06 AM, Lance Java wrote: I'm happy to call a bug a bug but I shall valiantly defend my baby (tapestry) from FUD - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: BeanEditForm does NOT support informal parameters?
Cool, good to know for future - My n00bness is still cool too! I've added it to the rosetta stone jira (https://issues.apache.org/jira/browse/TAP5-1894) for the more-than-one-way-to-skin-a-cat approach of getting stuff done in Tapestry. On 26/04/2012, at 12:28 AM, Felix Scheffer wrote: Grid works fine. It's using inheritInformalParameters @Component(parameters = class=tableClass, inheritInformalParameters = true) private Any table; 2012/4/25 Chris Mylonas ch...@opencsta.org GridColoum suffers from the same thing having a look at the code. There is no sign of resources.renderInformalParameters() Same for Grid. hehe what I've learned this week from the list, you'll have to contribute the NoFUD service to the registry with @EagerLoad to get in before the rest of it starts up. Hopefully yuicompressor won't give you schtick in tomcat 7 for multi zoned AJAX with IE6* *please don't mind the embellishment. On 26/04/2012, at 12:06 AM, Lance Java wrote: I'm happy to call a bug a bug but I shall valiantly defend my baby (tapestry) from FUD - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: BeanEditForm does NOT support informal parameters?
Hmm... that's a tricky one... I assumed that RenderInformals always added informals to the currently rendering element but I can see that this won't happen if an element has not been added to the MarkupWriter at beginRender() which happens with the bean edit form. In fact, RenderInformals won't work as expected on most components which use a template. You could write your own mixin to render informal parameters on the last child of the current element (not tested) @MixinAfter @SupportsInformalParameters public class RenderInformalsOnLastChild { @Inject private ComponentResources resources; void beginRender(MarkupWriter writer) { ListNode children = writer.getElement().getChildren(); Element lastChild = (Element) children.get(children.size() - 1); renderInformals(lastChild); } protected void renderInformals(Element element) { for (String name : resources.getInformalParameterNames()) { element.attribute(name, resources.getInformalParameter(name, String.class)); } } } On Wednesday, 25 April 2012, Felix Scheffer fschef...@netzgut.net wrote: Thanks! That was fast :-) I tried using RenderInformals div t:beaneditform t:id=entity ... t:mixins=RenderInformals class=form-horizontal /div and the result is: div class=form-horizontal form ... /form /div now the class attribute is present, but on the wrong tag (should be on the form tag). Looks like the form tag has not been rendered when RenderInformals.beginRender() method is called. I would expected that BeanEditForm would call resources.renderInformalParameters(writer); but it doesnt. Very confusing... I also tried 5.3.2 and it's exactly the same. Felix Scheffer 2012/4/25 Chris Mylonas ch...@opencsta.org was the sarcasm meter on that Lance? :) - hard to tell at nearly midnight On 25/04/2012, at 11:22 PM, Lance Java wrote: Try adding the following attribute: t:mixins=renderInformals If it works, there's a bug ;) On Wednesday, 25 April 2012, Felix Scheffer fschef...@netzgut.net wrote: Hi, i am using a BeanEditForm and added a class attribute to it, i.e.: t:beaneditform t:id=entity ... class=form-horizontal ... /t:beaneditform but the class attribute does not appear in the actual html code: form enctype=application/x-www-form-urlencoded onsubmit=javascript:return Tapestry.waitForPage(event); action=... method=post id=form BeanEditForm has the @SupportsInformalParameters annotation, so am i missing something or is this a bug? Tapestry version is 5.3.3 Thanks a lot! Felix Scheffer - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org