You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Scott Morgan <mo...@gmail.com> on 2005/05/10 19:28:17 UTC

how to assign component HTML id?

Is there a simple way to have the HTML id for a form component be the
same as the jwcid?

I know I can bind an ID to a value, but how can I get the jwcid in the
page specification so I don't have to worry if the jwcid changes? 
Something like <binding name="id" expression="root.id"/>?

thanks
scott

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


Re: how to assign component HTML id?

Posted by Howard Lewis Ship <hl...@gmail.com>.
You can simplify that immediate as:

<input jwcid="datefield" type="text"
id="ognl:components.datefield.name" class="date"/>

On 5/10/05, mike jones <mi...@gmail.com> wrote:
> I  found it a awkward that Tapestry uses only name in form components
> especially as I am trying to make everything I do standards compliant.
> For the html id  (in input elements) I mirror the value of the name
> parameter, as xhtml is leaning towards replacing names with ids.
> To do this in tapestry rather than use the jwcid (as its differnt from
> the name) I do this something like...
> 
> <input jwcid="datefield" type="text"
> id="ognl:components.datefield.getProperty('name')" class="date" />
> 
> 
> On 5/10/05, Scott Morgan <mo...@gmail.com> wrote:
> > Is there a simple way to have the HTML id for a form component be the
> > same as the jwcid?
> >
> > I know I can bind an ID to a value, but how can I get the jwcid in the
> > page specification so I don't have to worry if the jwcid changes?
> > Something like <binding name="id" expression="root.id"/>?
> >
> > thanks
> > scott
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> 
> --
> "If we can hit that bull's-eye, the rest of the dominos will fall like
> a house of cards - Checkmate."
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

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

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


Re: how to assign component HTML id?

Posted by mike jones <mi...@gmail.com>.
I  found it a awkward that Tapestry uses only name in form components
especially as I am trying to make everything I do standards compliant.
For the html id  (in input elements) I mirror the value of the name
parameter, as xhtml is leaning towards replacing names with ids.
To do this in tapestry rather than use the jwcid (as its differnt from
the name) I do this something like...

<input jwcid="datefield" type="text"
id="ognl:components.datefield.getProperty('name')" class="date" />



On 5/10/05, Scott Morgan <mo...@gmail.com> wrote:
> Is there a simple way to have the HTML id for a form component be the
> same as the jwcid?
> 
> I know I can bind an ID to a value, but how can I get the jwcid in the
> page specification so I don't have to worry if the jwcid changes?
> Something like <binding name="id" expression="root.id"/>?
> 
> thanks
> scott
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
"If we can hit that bull's-eye, the rest of the dominos will fall like
a house of cards - Checkmate."

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