You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Aj Gregory <aj...@u.washington.edu> on 2006/03/31 02:30:29 UTC
Informal parameters in component html template
How do you insert the informal parameters in a component's html template?
Thanks!
-Aj
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Informal parameters in component html template
Posted by Mike Snare <mi...@gmail.com>.
All an informal parameter is is a parameter that's not declared as a
component parameter. It's like the class attribute of the input
element. The form element components (TextField, PropertySelection,
etc) don't use a class parameter so you are free to use it on the
component. It will be passed as-is to the rendered html tag:
In the template:
<input type="text" jwcid="textField@TextField" value="ognl:myValue"
class="someCssClass" />
Or, template and spec:
<input type="text" jwcid="textField">
<component id="textField" type="TextField">
<binding name="value" value="myValue" />
<binding name="class" value="literal:someCssClass" />
</component>
Is that what you meant?
-Mike
On 3/30/06, Aj Gregory <aj...@u.washington.edu> wrote:
> How do you insert the informal parameters in a component's html template?
> Thanks!
> -Aj
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Informal parameters in component html template
Posted by an...@di.uoa.gr.
.html is
<div>
<span jwcid="informal">
</span>
</div>
.page has
<component id="informal" type="Any" inherit-informal-parameters="yes"/>
>From Aj Gregory <aj...@u.washington.edu>:
> Sorry if my question was confusing... To clarify I'd like to do
> something like this in my component .html:
>
> <div>
> <span INFORMAL_PARAMS>
> </span>
> </div>
>
> Basically the same thing that would happen if I was rendering in java with:
>
> writer.begin("div");
> writer.begin("span");
> renderInformalParameters(writer, cycle);
> writer.end("span");
> writer.end("div");
>
> thanks,
> -Aj
>
> Jesse Kuhnert wrote:
> > Your component will inherit the informal parameters by default. (Or, you
> may
> > need to set it in your templates jwc spec file )
> >
> > The only other place this might need to be done is if you render your
> > component manually via renderComponent(). In that case you may need to
> call
> > "renderInformalParameters(writer)" .
> >
> > Either way it's pretty simple. Look at almost any of the tapestry
> components
> > for a good example.
> >
> > On 3/30/06, Mark Stang <ms...@pingidentity.com> wrote:
> >
> >> Just put in the attribute. So, if you wanted color, you would put
> >> color="blue". If you need it to be variable, then I usually do something
> >> like:
> >>
> >> .html:
> >> <td jwcid="class1">
> >>
> >> .jwc:
> >> <component id="class1" type="Any">
> >> <binding name="class" expression="classType"/>
> >> </component>
> >>
> >> .java:
> >> public String getClassType()
> >> {
> >> if (lastIndex == -1)
> >> return "plain";
> >>
> >> else
> >> return "disabled";
> >> }
> >>
> >>
> >> HTH,
> >>
> >> Mark
> >>
> >>
> >> -----Original Message-----
> >> From: Aj Gregory [mailto:ajgnet@u.washington.edu]
> >> Sent: Thu 3/30/2006 5:30 PM
> >> To: Tapestry users
> >> Subject: Informal parameters in component html template
> >>
> >> How do you insert the informal parameters in a component's html template?
> >> Thanks!
> >> -Aj
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >>
> >>
> >>
> >
> >
> > --
> > Jesse Kuhnert
> > Tacos/Tapestry, team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://opennotion.com
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Informal parameters in component html template
Posted by Aj Gregory <aj...@u.washington.edu>.
Sorry if my question was confusing... To clarify I'd like to do
something like this in my component .html:
<div>
<span INFORMAL_PARAMS>
</span>
</div>
Basically the same thing that would happen if I was rendering in java with:
writer.begin("div");
writer.begin("span");
renderInformalParameters(writer, cycle);
writer.end("span");
writer.end("div");
thanks,
-Aj
Jesse Kuhnert wrote:
> Your component will inherit the informal parameters by default. (Or, you may
> need to set it in your templates jwc spec file )
>
> The only other place this might need to be done is if you render your
> component manually via renderComponent(). In that case you may need to call
> "renderInformalParameters(writer)" .
>
> Either way it's pretty simple. Look at almost any of the tapestry components
> for a good example.
>
> On 3/30/06, Mark Stang <ms...@pingidentity.com> wrote:
>
>> Just put in the attribute. So, if you wanted color, you would put
>> color="blue". If you need it to be variable, then I usually do something
>> like:
>>
>> .html:
>> <td jwcid="class1">
>>
>> .jwc:
>> <component id="class1" type="Any">
>> <binding name="class" expression="classType"/>
>> </component>
>>
>> .java:
>> public String getClassType()
>> {
>> if (lastIndex == -1)
>> return "plain";
>>
>> else
>> return "disabled";
>> }
>>
>>
>> HTH,
>>
>> Mark
>>
>>
>> -----Original Message-----
>> From: Aj Gregory [mailto:ajgnet@u.washington.edu]
>> Sent: Thu 3/30/2006 5:30 PM
>> To: Tapestry users
>> Subject: Informal parameters in component html template
>>
>> How do you insert the informal parameters in a component's html template?
>> Thanks!
>> -Aj
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://opennotion.com
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Informal parameters in component html template
Posted by Jesse Kuhnert <jk...@gmail.com>.
Your component will inherit the informal parameters by default. (Or, you may
need to set it in your templates jwc spec file )
The only other place this might need to be done is if you render your
component manually via renderComponent(). In that case you may need to call
"renderInformalParameters(writer)" .
Either way it's pretty simple. Look at almost any of the tapestry components
for a good example.
On 3/30/06, Mark Stang <ms...@pingidentity.com> wrote:
>
> Just put in the attribute. So, if you wanted color, you would put
> color="blue". If you need it to be variable, then I usually do something
> like:
>
> .html:
> <td jwcid="class1">
>
> .jwc:
> <component id="class1" type="Any">
> <binding name="class" expression="classType"/>
> </component>
>
> .java:
> public String getClassType()
> {
> if (lastIndex == -1)
> return "plain";
>
> else
> return "disabled";
> }
>
>
> HTH,
>
> Mark
>
>
> -----Original Message-----
> From: Aj Gregory [mailto:ajgnet@u.washington.edu]
> Sent: Thu 3/30/2006 5:30 PM
> To: Tapestry users
> Subject: Informal parameters in component html template
>
> How do you insert the informal parameters in a component's html template?
> Thanks!
> -Aj
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
Jesse Kuhnert
Tacos/Tapestry, team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://opennotion.com
RE: Informal parameters in component html template
Posted by Mark Stang <ms...@pingidentity.com>.
Just put in the attribute. So, if you wanted color, you would put color="blue". If you need it to be variable, then I usually do something like:
.html:
<td jwcid="class1">
.jwc:
<component id="class1" type="Any">
<binding name="class" expression="classType"/>
</component>
.java:
public String getClassType()
{
if (lastIndex == -1)
return "plain";
else
return "disabled";
}
HTH,
Mark
-----Original Message-----
From: Aj Gregory [mailto:ajgnet@u.washington.edu]
Sent: Thu 3/30/2006 5:30 PM
To: Tapestry users
Subject: Informal parameters in component html template
How do you insert the informal parameters in a component's html template?
Thanks!
-Aj
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org