Re: Override BeanEditForm Submit Button

Kalle Korhonen <[email protected]>
Newsgroups gmane.comp.java.tapestry.user
Message-ID <CA+=EWnA1s+O37Ox0J5Vt95NVVjNGp+jSq3hgqoca14TWUGrY0A@mail.gmail.com>
You want to use the underlying BeanEditor component that does most of the
work and build your own form around it, could start by copying the
BeanEditForm source:
https://github.com/apache/tapestry-5/blob/master/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanEditForm.tml

Kalle

On Fri, Dec 15, 2017 at 3:31 PM, Christopher Dodunski <
[email protected]> wrote:

> Hi,
>
> I would simply like to override Tapestry's BeanEditForm default submit
> button.  I've searched the internet but not found example code to achieve
> this.  Below is my template code, which is for a BeanEditForm component
> with two added fields.  The submit tag is not having the desired effect.
> Of course, in addition to having my button appear, the default submit
> button must not appear (I don't want two buttons).
>
> Your help would be much appreciated.
>
> Regards,
>
> Chris.
>
> [CODE]
>     <form t:type="beaneditform" t:id="updateForm" object="user"
> include="userName,firstName,lastName,phone,email,status"
> add="passwordField,profileImage"
> reorder="profileImage,userName,passwordField,firstName,lastName,phone,
> email,status"
> t:submitLabel="message:title.updateUser">
>         <p:passwordField>
>             <label t:type="label" t:for="passwordField">Password</label>
>             <t:passwordfield t:id="passwordField" value="password"
> placeholder="*******"/>
>         </p:passwordField>
>         <p:profileImage>
>             <label t:type="label" t:for="profileImage"/>
>             <input t:type="upload" t:id="profileImage"
> t:value="profileImage" placeholder="select profile image"/>
>         </p:profileImage>
>         <div>
>             <input t:type="submit" value="${message:title.updateUser}"
> class="button-user buttonGreen" />
>         </div>
>     </form>
> [/CODE]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.