You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Marcelo lotif <ml...@gmail.com> on 2007/07/25 19:10:32 UTC

[T5] Set the text field size in BeanEditForm

Hi all,
anyone knows how set the size of a text field in BeanEditForm,
preferentially using the .properties file?

-- 
Atenciosamente,
Marcelo Lotif

Re: [T5] Set the text field size in BeanEditForm

Posted by Marcelo lotif <ml...@gmail.com>.
thank you howard, this feature will help a lot :)

2007/7/27, Howard Lewis Ship <hl...@gmail.com>:
>
> Yes, what's needed is another annotation to cover this situtation, perhaps
> @Width.  I think I added a JIRA issue for this already.
>
> On 7/27/07, Marcelo lotif <ml...@gmail.com> wrote:
> >
> > Good solution John, but has the same problem of the other...
> >
> > for example: i have 40 fields. 25 of them i want to set the size="80",
> > then
> > i have to repeat this code 25 times on the beaneditform body. I was
> > thinking
> > in a way to set the size as we set the label, just adding
> > registration-size=80 on the .properties file, for example, but it seems
> > that
> > it  doesn't have this feature...
> >
> > a question for the commiters: there is any chance of adding it?
> >
> > 2007/7/27, Jan Laníček <jl...@legend.cz>:
> > >
> > >
> > > Hi,
> > >
> > >     You can use this way :)
> > >
> > >     JAVA:
> > >
> > >     @Inject
> > >     private Messages _messages;
> > >
> > >    public Messages getMessages()
> > >     {
> > >         return _messages;
> > >     }
> > >
> > > HTML:
> > >
> > >         <form t:type="beaneditform" object="registration"
> > > >             submitLabel="Gravar">
> > > >
> > > >             <t:parameter name="firstName">
> > > >                 <label t:type="Label" for="firstName"/>
> > > >                 <input t:type="TextField" t:id="firstName"
> > > >                     t:value="registration.firstName"
> > > > size="${messages:registration.field.size}"/>
> > > >                     (Informe o nome)
> > > >             </t:parameter>
> > > >
> > > >         </form>
> > >
> > > PROPERTIES file:
> > > registration.field.size=40
> > >
> > > John
> > >
> > >
> > > Marcelo lotif wrote:
> > > >
> > > > this is easy, but when you have a dozen fields to set, this becomes
> a
> > > > little
> > > > verbose...
> > > > isn't a way to set it via .properties file?
> > > >
> > > > Em 25/07/07, Marcus <mv...@gmail.com> escreveu:
> > > >>
> > > >> Olá Marcelo,
> > > >>
> > > >>
> > > >>         <form t:type="beaneditform" object="registration"
> > > >>             submitLabel="Gravar">
> > > >>
> > > >>             <t:parameter name="firstName">
> > > >>                 <label t:type="Label" for="firstName"/>
> > > >>                 <input t:type="TextField" t:id="firstName"
> > > >>                     t:value="registration.firstName" size="40"/>
> > > >>                     (Informe o nome)
> > > >>             </t:parameter>
> > > >>
> > > >>         </form>
> > > >>
> > > >>
> > > >> Marcus
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > Atenciosamente,
> > > > Marcelo Lotif
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://www.nabble.com/-T5--Set-the-text-field-size-in-BeanEditForm-tf4144626.html#a11825431
> > > Sent from the Tapestry - User mailing list archive at Nabble.com.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Atenciosamente,
> > Marcelo Lotif
> >
>
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>



-- 
Atenciosamente,
Marcelo Lotif

Re: [T5] Set the text field size in BeanEditForm

Posted by Howard Lewis Ship <hl...@gmail.com>.
Yes, what's needed is another annotation to cover this situtation, perhaps
@Width.  I think I added a JIRA issue for this already.

On 7/27/07, Marcelo lotif <ml...@gmail.com> wrote:
>
> Good solution John, but has the same problem of the other...
>
> for example: i have 40 fields. 25 of them i want to set the size="80",
> then
> i have to repeat this code 25 times on the beaneditform body. I was
> thinking
> in a way to set the size as we set the label, just adding
> registration-size=80 on the .properties file, for example, but it seems
> that
> it  doesn't have this feature...
>
> a question for the commiters: there is any chance of adding it?
>
> 2007/7/27, Jan Laníček <jl...@legend.cz>:
> >
> >
> > Hi,
> >
> >     You can use this way :)
> >
> >     JAVA:
> >
> >     @Inject
> >     private Messages _messages;
> >
> >    public Messages getMessages()
> >     {
> >         return _messages;
> >     }
> >
> > HTML:
> >
> >         <form t:type="beaneditform" object="registration"
> > >             submitLabel="Gravar">
> > >
> > >             <t:parameter name="firstName">
> > >                 <label t:type="Label" for="firstName"/>
> > >                 <input t:type="TextField" t:id="firstName"
> > >                     t:value="registration.firstName"
> > > size="${messages:registration.field.size}"/>
> > >                     (Informe o nome)
> > >             </t:parameter>
> > >
> > >         </form>
> >
> > PROPERTIES file:
> > registration.field.size=40
> >
> > John
> >
> >
> > Marcelo lotif wrote:
> > >
> > > this is easy, but when you have a dozen fields to set, this becomes a
> > > little
> > > verbose...
> > > isn't a way to set it via .properties file?
> > >
> > > Em 25/07/07, Marcus <mv...@gmail.com> escreveu:
> > >>
> > >> Olá Marcelo,
> > >>
> > >>
> > >>         <form t:type="beaneditform" object="registration"
> > >>             submitLabel="Gravar">
> > >>
> > >>             <t:parameter name="firstName">
> > >>                 <label t:type="Label" for="firstName"/>
> > >>                 <input t:type="TextField" t:id="firstName"
> > >>                     t:value="registration.firstName" size="40"/>
> > >>                     (Informe o nome)
> > >>             </t:parameter>
> > >>
> > >>         </form>
> > >>
> > >>
> > >> Marcus
> > >>
> > >
> > >
> > >
> > > --
> > > Atenciosamente,
> > > Marcelo Lotif
> > >
> > >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/-T5--Set-the-text-field-size-in-BeanEditForm-tf4144626.html#a11825431
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Atenciosamente,
> Marcelo Lotif
>



-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Re: [T5] Set the text field size in BeanEditForm

Posted by Marcelo lotif <ml...@gmail.com>.
Good solution John, but has the same problem of the other...

for example: i have 40 fields. 25 of them i want to set the size="80", then
i have to repeat this code 25 times on the beaneditform body. I was thinking
in a way to set the size as we set the label, just adding
registration-size=80 on the .properties file, for example, but it seems that
it  doesn't have this feature...

a question for the commiters: there is any chance of adding it?

2007/7/27, Jan Laníček <jl...@legend.cz>:
>
>
> Hi,
>
>     You can use this way :)
>
>     JAVA:
>
>     @Inject
>     private Messages _messages;
>
>    public Messages getMessages()
>     {
>         return _messages;
>     }
>
> HTML:
>
>         <form t:type="beaneditform" object="registration"
> >             submitLabel="Gravar">
> >
> >             <t:parameter name="firstName">
> >                 <label t:type="Label" for="firstName"/>
> >                 <input t:type="TextField" t:id="firstName"
> >                     t:value="registration.firstName"
> > size="${messages:registration.field.size}"/>
> >                     (Informe o nome)
> >             </t:parameter>
> >
> >         </form>
>
> PROPERTIES file:
> registration.field.size=40
>
> John
>
>
> Marcelo lotif wrote:
> >
> > this is easy, but when you have a dozen fields to set, this becomes a
> > little
> > verbose...
> > isn't a way to set it via .properties file?
> >
> > Em 25/07/07, Marcus <mv...@gmail.com> escreveu:
> >>
> >> Olá Marcelo,
> >>
> >>
> >>         <form t:type="beaneditform" object="registration"
> >>             submitLabel="Gravar">
> >>
> >>             <t:parameter name="firstName">
> >>                 <label t:type="Label" for="firstName"/>
> >>                 <input t:type="TextField" t:id="firstName"
> >>                     t:value="registration.firstName" size="40"/>
> >>                     (Informe o nome)
> >>             </t:parameter>
> >>
> >>         </form>
> >>
> >>
> >> Marcus
> >>
> >
> >
> >
> > --
> > Atenciosamente,
> > Marcelo Lotif
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/-T5--Set-the-text-field-size-in-BeanEditForm-tf4144626.html#a11825431
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Atenciosamente,
Marcelo Lotif

Re: [T5] Set the text field size in BeanEditForm

Posted by Jan Laníček <jl...@legend.cz>.
Hi,

    You can use this way :)     

    JAVA:

    @Inject
    private Messages _messages;
 
   public Messages getMessages()
    {
	return _messages;
    }

HTML:

        <form t:type="beaneditform" object="registration"
>             submitLabel="Gravar">
>
>             <t:parameter name="firstName">
>                 <label t:type="Label" for="firstName"/>
>                 <input t:type="TextField" t:id="firstName"
>                     t:value="registration.firstName"
> size="${messages:registration.field.size}"/>
>                     (Informe o nome)
>             </t:parameter>
>
>         </form>

PROPERTIES file:
registration.field.size=40

John


Marcelo lotif wrote:
> 
> this is easy, but when you have a dozen fields to set, this becomes a
> little
> verbose...
> isn't a way to set it via .properties file?
> 
> Em 25/07/07, Marcus <mv...@gmail.com> escreveu:
>>
>> Olá Marcelo,
>>
>>
>>         <form t:type="beaneditform" object="registration"
>>             submitLabel="Gravar">
>>
>>             <t:parameter name="firstName">
>>                 <label t:type="Label" for="firstName"/>
>>                 <input t:type="TextField" t:id="firstName"
>>                     t:value="registration.firstName" size="40"/>
>>                     (Informe o nome)
>>             </t:parameter>
>>
>>         </form>
>>
>>
>> Marcus
>>
> 
> 
> 
> -- 
> Atenciosamente,
> Marcelo Lotif
> 
> 

-- 
View this message in context: http://www.nabble.com/-T5--Set-the-text-field-size-in-BeanEditForm-tf4144626.html#a11825431
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5] Set the text field size in BeanEditForm

Posted by Marcelo lotif <ml...@gmail.com>.
this is easy, but when you have a dozen fields to set, this becomes a little
verbose...
isn't a way to set it via .properties file?

Em 25/07/07, Marcus <mv...@gmail.com> escreveu:
>
> Olá Marcelo,
>
>
>         <form t:type="beaneditform" object="registration"
>             submitLabel="Gravar">
>
>             <t:parameter name="firstName">
>                 <label t:type="Label" for="firstName"/>
>                 <input t:type="TextField" t:id="firstName"
>                     t:value="registration.firstName" size="40"/>
>                     (Informe o nome)
>             </t:parameter>
>
>         </form>
>
>
> Marcus
>



-- 
Atenciosamente,
Marcelo Lotif

Re: [T5] Set the text field size in BeanEditForm

Posted by Marcus <mv...@gmail.com>.
Olá Marcelo,


        <form t:type="beaneditform" object="registration"
            submitLabel="Gravar">

            <t:parameter name="firstName">
                <label t:type="Label" for="firstName"/>
                <input t:type="TextField" t:id="firstName"
                    t:value="registration.firstName" size="40"/>
                    (Informe o nome)
            </t:parameter>

        </form>


Marcus