Re: beaneditform not hiding id
BeanEditForm is just a thin layer over BeanEditor (basically, a Form with a BeanEditor and a submit button and almost nothing else), so I almost never use BeanEditForm myself, just BeanEditor. Also, I cannot see where in the BeanEditForm documentation it says @Id is automatically excluded. In the example in http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/corelib/components/BeanEditForm.html, getId() is annotated with @NonVisual. Regarding hiding properties, you use the exclude parameter in both BeanEditForm and BeanEditor. What's shown and not are controlled by the model parameter, which is of type BeanModel, which can be easily created with the BeanModelSource service, and then you can manipulate the BeanModel directly and do whatever you want from it. On Thu, 29 Oct 2015 00:02:31 -0200, Paul Stantonwrote: Just further to this, I've decided not to use BeanEditForm because: a) I can't set the context - I'd like to use the Id as context so that I can load the edited bean during 'prepare' b) The 'async' parameter is not exposed meaning I have to specify a zone which is not suitable I suggest these upgrades are considered On 29/10/2015 12:47 PM, Paul Stanton wrote: According to jumpstart (no mention in tapestry doc) beaneditform auto-hides the id field: http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/edit1/1 *But where is Person's |id| property?* BeanEditForm automatically hides properties annotated with |@Id|. From the 'view source' of the jumpstart page, I'm guessing BeanEditForm is creating a hidden field for the id, not just hiding it as per @NonVisual This is not working for me. Can someone point me to the rules for this feature? Thanks, Paul. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: beaneditform not hiding id
Thiago, Jumpstart says it is automatically excluded and it's published source code suggests this, however I couldn't get it to work like that. That part of it is a question for jumpstart (is it Geoff?) I agree, beanEditor is satisfactory, however for me, beanEditForm would be better if it supported "context" and "async" and passed them on to the embedded form. Regards, Paul. On 29/10/2015 10:47 PM, Thiago H de Paula Figueiredo wrote: BeanEditForm is just a thin layer over BeanEditor (basically, a Form with a BeanEditor and a submit button and almost nothing else), so I almost never use BeanEditForm myself, just BeanEditor. Also, I cannot see where in the BeanEditForm documentation it says @Id is automatically excluded. In the example in http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/corelib/components/BeanEditForm.html, getId() is annotated with @NonVisual. Regarding hiding properties, you use the exclude parameter in both BeanEditForm and BeanEditor. What's shown and not are controlled by the model parameter, which is of type BeanModel, which can be easily created with the BeanModelSource service, and then you can manipulate the BeanModel directly and do whatever you want from it. On Thu, 29 Oct 2015 00:02:31 -0200, Paul Stantonwrote: Just further to this, I've decided not to use BeanEditForm because: a) I can't set the context - I'd like to use the Id as context so that I can load the edited bean during 'prepare' b) The 'async' parameter is not exposed meaning I have to specify a zone which is not suitable I suggest these upgrades are considered On 29/10/2015 12:47 PM, Paul Stanton wrote: According to jumpstart (no mention in tapestry doc) beaneditform auto-hides the id field: http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/edit1/1 *But where is Person's |id| property?* BeanEditForm automatically hides properties annotated with |@Id|. From the 'view source' of the jumpstart page, I'm guessing BeanEditForm is creating a hidden field for the id, not just hiding it as per @NonVisual This is not working for me. Can someone point me to the rules for this feature? Thanks, Paul. - 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 not hiding id
You can see in the example that it’s true - the id field isn’t rendered. If you’re seeing something different then I guess I’m about to learn something new! I haven’t looked behind the scenes of this since, perhaps, T5.0, so things may have changed. On submit, this example is getting the id from the request’s activation context, ie. from the page’s URL; but with a web inspector I can see that the Form has a line that I didn’t expect: I suspect this feature has been added since T5.0, so it could be used like this... void onPrepareForSubmit(Integer personId) {…} …which might be better than relying on the activation context. I agree that it makes sense for BeanEditForm to have “context” and “async” parameters. Without them we find ourselves questioning, quite unnecessarily, whether we’ve understood BeanEditForm correctly. Geoff > On 30 Oct 2015, at 9:49 am, Paul Stantonwrote: > > Thiago, > > Jumpstart says it is automatically excluded and it's published source code > suggests this, however I couldn't get it to work like that. That part of it > is a question for jumpstart (is it Geoff?) > > I agree, beanEditor is satisfactory, however for me, beanEditForm would be > better if it supported "context" and "async" and passed them on to the > embedded form. > > Regards, Paul. > > On 29/10/2015 10:47 PM, Thiago H de Paula Figueiredo wrote: >> BeanEditForm is just a thin layer over BeanEditor (basically, a Form with a >> BeanEditor and a submit button and almost nothing else), so I almost never >> use BeanEditForm myself, just BeanEditor. >> >> Also, I cannot see where in the BeanEditForm documentation it says @Id is >> automatically excluded. In the example in >> http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/corelib/components/BeanEditForm.html, >> getId() is annotated with @NonVisual. >> >> Regarding hiding properties, you use the exclude parameter in both >> BeanEditForm and BeanEditor. What's shown and not are controlled by the >> model parameter, which is of type BeanModel, which can be easily created >> with the BeanModelSource service, and then you can manipulate the BeanModel >> directly and do whatever you want from it. >> >> On Thu, 29 Oct 2015 00:02:31 -0200, Paul Stanton >> wrote: >> >>> Just further to this, I've decided not to use BeanEditForm because: >>> >>> a) I can't set the context - I'd like to use the Id as context so that I >>> can load the edited bean during 'prepare' >>> b) The 'async' parameter is not exposed meaning I have to specify a zone >>> which is not suitable >>> >>> I suggest these upgrades are considered >>> >>> On 29/10/2015 12:47 PM, Paul Stanton wrote: According to jumpstart (no mention in tapestry doc) beaneditform auto-hides the id field: http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/edit1/1 *But where is Person's |id| property?* BeanEditForm automatically hides properties annotated with |@Id|. From the 'view source' of the jumpstart page, I'm guessing BeanEditForm is creating a hidden field for the id, not just hiding it as per @NonVisual This is not working for me. Can someone point me to the rules for this feature? Thanks, Paul. >>> >>> >>> - >>> 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 > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
beaneditform not hiding id
According to jumpstart (no mention in tapestry doc) beaneditform auto-hides the id field: http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/edit1/1 *But where is Person's |id| property?* BeanEditForm automatically hides properties annotated with |@Id|. From the 'view source' of the jumpstart page, I'm guessing BeanEditForm is creating a hidden field for the id, not just hiding it as per @NonVisual This is not working for me. Can someone point me to the rules for this feature? Thanks, Paul.
Re: beaneditform not hiding id
Just further to this, I've decided not to use BeanEditForm because: a) I can't set the context - I'd like to use the Id as context so that I can load the edited bean during 'prepare' b) The 'async' parameter is not exposed meaning I have to specify a zone which is not suitable I suggest these upgrades are considered On 29/10/2015 12:47 PM, Paul Stanton wrote: According to jumpstart (no mention in tapestry doc) beaneditform auto-hides the id field: http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/edit1/1 *But where is Person's |id| property?* BeanEditForm automatically hides properties annotated with |@Id|. From the 'view source' of the jumpstart page, I'm guessing BeanEditForm is creating a hidden field for the id, not just hiding it as per @NonVisual This is not working for me. Can someone point me to the rules for this feature? Thanks, Paul. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org