You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Programozás <pr...@hotmail.com> on 2004/01/29 13:55:35 UTC

ID of Hidden component

Hi,

I define the ID attribute of a Hidden component:

    <input id="something" jwcid="@Hidden" value="ognl:value" />

When this component is rendered the id attribute is not rendered. Why?

Thanks,
Norbi

Re: ID of Hidden component

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Sorry, a little hasty there. In this situation the name would suffice.

-Harish

Harish Krishnaswamy wrote:

> Actually its not quite the same; the jwcid specified is rendered as 
> the name of the widget. The "id" attribute is never used by Tapestry. 
> The "id" is certainly helpful/easier when you want to access the 
> widget via DOM interfaces.
>
> -Harish
>
> Paul Ferraro wrote:
>
>> Rather than using Any, you can still use Hidden by naming your inline 
>> component:
>> e.g.
>>
>> <input jwcid="HiddenName@Hidden" value="ognl:value" />
>>
>> This should address both of your concerns.
>>
>> Paul Ferraro
>>
>> Programozás wrote:
>>
>>> Thanks!
>>>
>>> I have two usage types:
>>> - hidden fields store client-side only information (initialized at 
>>> server
>>> side), in this case the Any component is OK
>>> - hidden fields store info which must be submitted back to the 
>>> server. In
>>> this case I identify a hidden field by its name and I access it using
>>> document.forms[0]["HiddenName"]
>>>
>>> Norbi
>>>
>>> ----- Original Message ----- From: "Erik Hatcher" 
>>> <er...@ehatchersolutions.com>
>>> To: "Tapestry users" <ta...@jakarta.apache.org>
>>> Sent: Thursday, January 29, 2004 2:46 PM
>>> Subject: Re: ID of Hidden component
>>>
>>>
>>> On Jan 29, 2004, at 7:55 AM, Programozás wrote:
>>>  
>>>
>>>> I define the ID attribute of a Hidden component:
>>>>
>>>>    <input id="something" jwcid="@Hidden" value="ognl:value" />
>>>>
>>>> When this component is rendered the id attribute is not rendered. Why?
>>>>   
>>>
>>>
>>>
>>> Look at Hidden.jwc.... informal parameters are not allowed.
>>>
>>> Maybe you want to use the @Any component instead?
>>>
>>> <input jwcid="@Any" type="hidden" id="something" value="ognl:value"
>>> name="something"/>
>>>
>>> although I suspect to get this value back you'll need more than just
>>> this.  Perhaps others will reply with more details.
>>>
>>> Erik
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>>
>>>  
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>

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


Re: ID of Hidden component

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Actually its not quite the same; the jwcid specified is rendered as the 
name of the widget. The "id" attribute is never used by Tapestry. The 
"id" is certainly helpful/easier when you want to access the widget via 
DOM interfaces.

-Harish

Paul Ferraro wrote:

> Rather than using Any, you can still use Hidden by naming your inline 
> component:
> e.g.
>
> <input jwcid="HiddenName@Hidden" value="ognl:value" />
>
> This should address both of your concerns.
>
> Paul Ferraro
>
> Programozás wrote:
>
>> Thanks!
>>
>> I have two usage types:
>> - hidden fields store client-side only information (initialized at 
>> server
>> side), in this case the Any component is OK
>> - hidden fields store info which must be submitted back to the 
>> server. In
>> this case I identify a hidden field by its name and I access it using
>> document.forms[0]["HiddenName"]
>>
>> Norbi
>>
>> ----- Original Message ----- From: "Erik Hatcher" 
>> <er...@ehatchersolutions.com>
>> To: "Tapestry users" <ta...@jakarta.apache.org>
>> Sent: Thursday, January 29, 2004 2:46 PM
>> Subject: Re: ID of Hidden component
>>
>>
>> On Jan 29, 2004, at 7:55 AM, Programozás wrote:
>>  
>>
>>> I define the ID attribute of a Hidden component:
>>>
>>>    <input id="something" jwcid="@Hidden" value="ognl:value" />
>>>
>>> When this component is rendered the id attribute is not rendered. Why?
>>>   
>>
>>
>> Look at Hidden.jwc.... informal parameters are not allowed.
>>
>> Maybe you want to use the @Any component instead?
>>
>> <input jwcid="@Any" type="hidden" id="something" value="ognl:value"
>> name="something"/>
>>
>> although I suspect to get this value back you'll need more than just
>> this.  Perhaps others will reply with more details.
>>
>> Erik
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>  
>>
>
>
> ---------------------------------------------------------------------
> 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: ID of Hidden component

Posted by Paul Ferraro <pm...@columbia.edu>.
Rather than using Any, you can still use Hidden by naming your inline 
component:
e.g.

<input jwcid="HiddenName@Hidden" value="ognl:value" />

This should address both of your concerns.

Paul Ferraro

Programozás wrote:

>Thanks!
>
>I have two usage types:
>- hidden fields store client-side only information (initialized at server
>side), in this case the Any component is OK
>- hidden fields store info which must be submitted back to the server. In
>this case I identify a hidden field by its name and I access it using
>document.forms[0]["HiddenName"]
>
>Norbi
>
>----- Original Message ----- 
>From: "Erik Hatcher" <er...@ehatchersolutions.com>
>To: "Tapestry users" <ta...@jakarta.apache.org>
>Sent: Thursday, January 29, 2004 2:46 PM
>Subject: Re: ID of Hidden component
>
>
>On Jan 29, 2004, at 7:55 AM, Programozás wrote:
>  
>
>>I define the ID attribute of a Hidden component:
>>
>>    <input id="something" jwcid="@Hidden" value="ognl:value" />
>>
>>When this component is rendered the id attribute is not rendered. Why?
>>    
>>
>
>Look at Hidden.jwc.... informal parameters are not allowed.
>
>Maybe you want to use the @Any component instead?
>
><input jwcid="@Any" type="hidden" id="something" value="ognl:value"
>name="something"/>
>
>although I suspect to get this value back you'll need more than just
>this.  Perhaps others will reply with more details.
>
>Erik
>
>
>
>
>
>---------------------------------------------------------------------
>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
>
>  
>


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


Re: ID of Hidden component

Posted by Programozás <pr...@hotmail.com>.
Thanks!

I have two usage types:
- hidden fields store client-side only information (initialized at server
side), in this case the Any component is OK
- hidden fields store info which must be submitted back to the server. In
this case I identify a hidden field by its name and I access it using
document.forms[0]["HiddenName"]

Norbi

----- Original Message ----- 
From: "Erik Hatcher" <er...@ehatchersolutions.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, January 29, 2004 2:46 PM
Subject: Re: ID of Hidden component


On Jan 29, 2004, at 7:55 AM, Programozás wrote:
> I define the ID attribute of a Hidden component:
>
>     <input id="something" jwcid="@Hidden" value="ognl:value" />
>
> When this component is rendered the id attribute is not rendered. Why?

Look at Hidden.jwc.... informal parameters are not allowed.

Maybe you want to use the @Any component instead?

<input jwcid="@Any" type="hidden" id="something" value="ognl:value"
name="something"/>

although I suspect to get this value back you'll need more than just
this.  Perhaps others will reply with more details.

Erik





---------------------------------------------------------------------
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: ID of Hidden component

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jan 29, 2004, at 7:55 AM, Programozás wrote:
> I define the ID attribute of a Hidden component:
>
>     <input id="something" jwcid="@Hidden" value="ognl:value" />
>
> When this component is rendered the id attribute is not rendered. Why?

Look at Hidden.jwc.... informal parameters are not allowed.

Maybe you want to use the @Any component instead?

<input jwcid="@Any" type="hidden" id="something" value="ognl:value" 
name="something"/>

although I suspect to get this value back you'll need more than just 
this.  Perhaps others will reply with more details.

	Erik





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