You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nazmul Bhuiyan <Na...@nz.fujitsu.com> on 2007/08/20 03:33:50 UTC
T3: Disable TextField
Hi,
I’m trying to disable one field according to the condition (new or update).
But I’m getting the following error.
Can any one please check and tell me what I’m doing wrong?
I’ve been following the component reference in
http://tapestry.apache.org/tapestry3/doc/ComponentReference/TextField.html
and using disabled="ognl:true".
Thanks
Naz
Error:
Template for component UserEdit contains multiple references to embedded
component inputUserLogin.
html:
<tr>
<td width="1%" nowrap>
User Login:
</td>
<td width="99%">
<input type="text"
jwcid="inputUserLogin"
size="20"
maxlength="20"/>
</td>
</tr>
<tr>
<td width="1%" nowrap>
User Login:
</td>
<td width="99%">
<input type="text"
jwcid="inputUserLogin"
disabled="ognl:true"
size="20"
maxlength="20"/>
</td>
</tr>
.pgae
<component id="inputUserLogin" type="ValidField">
<static-binding name="displayName" value="User Login" />
<binding name="validator" expression="beans.required"/>
<binding name="value" expression="user.usrLogin"/>
</component>
--
View this message in context: http://www.nabble.com/T3%3A-Disable-TextField-tf4296203.html#a12228918
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: T3: Disable TextField
Posted by Nazmul Bhuiyan <Na...@nz.fujitsu.com>.
Thanks a lot.
Allen Guo wrote:
>
> there are one more inputUserLogin in .html file. It's not be allowed
> For this case, you have to define two components with different name in
> .page file.
>
> 2007/8/20, Nazmul Bhuiyan < Nazmul.Bhuiyan@nz.fujitsu.com>:
>>
>>
>> Hi,
>> I'm trying to disable one field according to the condition (new or
>> update).
>> But I'm getting the following error.
>> Can any one please check and tell me what I'm doing wrong?
>> I've been following the component reference in
>> http://tapestry.apache.org/tapestry3/doc/ComponentReference/TextField.html
>> and using disabled="ognl:true".
>>
>> Thanks
>>
>> Naz
>>
>> Error:
>> Template for component UserEdit contains multiple references to embedded
>> component inputUserLogin.
>>
>>
>> html:
>>
>>
>>
>> <tr>
>> <td width="1%" nowrap>
>>
>> User Login:
>>
>> </td>
>> <td width="99%">
>> <input type="text"
>> jwcid="inputUserLogin"
>> size="20"
>> maxlength="20"/>
>> </td>
>> </tr>
>>
>>
>> <tr>
>> <td width="1%" nowrap>
>>
>> User Login:
>>
>> </td>
>> <td width="99%">
>> <input type="text"
>> jwcid="inputUserLogin"
>> disabled="ognl:true"
>> size="20"
>> maxlength="20"/>
>> </td>
>> </tr>
>>
>>
>>
>> .pgae
>> <component id="inputUserLogin" type="ValidField">
>> <static-binding name="displayName" value="User Login" />
>> <binding name="validator" expression="beans.required"/>
>> <binding name="value" expression="user.usrLogin"/>
>> </component>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/T3%3A-Disable-TextField-tf4296203.html#a12228918
>> 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
>>
>>
>
>
--
View this message in context: http://www.nabble.com/T3%3A-Disable-TextField-tf4296203.html#a12229309
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: T3: Disable TextField
Posted by 蝈蝈龙 <el...@gmail.com>.
there are one more inputUserLogin in .html file. It's not be allowed
For this case, you have to define two components with different name in
.page file.
2007/8/20, Nazmul Bhuiyan < Nazmul.Bhuiyan@nz.fujitsu.com>:
>
>
> Hi,
> I'm trying to disable one field according to the condition (new or
> update).
> But I'm getting the following error.
> Can any one please check and tell me what I'm doing wrong?
> I've been following the component reference in
> http://tapestry.apache.org/tapestry3/doc/ComponentReference/TextField.html
> and using disabled="ognl:true".
>
> Thanks
>
> Naz
>
> Error:
> Template for component UserEdit contains multiple references to embedded
> component inputUserLogin.
>
>
> html:
>
>
>
> <tr>
> <td width="1%" nowrap>
>
> User Login:
>
> </td>
> <td width="99%">
> <input type="text"
> jwcid="inputUserLogin"
> size="20"
> maxlength="20"/>
> </td>
> </tr>
>
>
> <tr>
> <td width="1%" nowrap>
>
> User Login:
>
> </td>
> <td width="99%">
> <input type="text"
> jwcid="inputUserLogin"
> disabled="ognl:true"
> size="20"
> maxlength="20"/>
> </td>
> </tr>
>
>
>
> .pgae
> <component id="inputUserLogin" type="ValidField">
> <static-binding name="displayName" value="User Login" />
> <binding name="validator" expression="beans.required"/>
> <binding name="value" expression="user.usrLogin"/>
> </component>
>
> --
> View this message in context:
> http://www.nabble.com/T3%3A-Disable-TextField-tf4296203.html#a12228918
> 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: T3: Disable TextField
Posted by Nazmul Bhuiyan <Na...@nz.fujitsu.com>.
Disable works but it is failing when I put the condition.
span jwcid="@Conditional" condition="ognl:newUser">
disabled="ognl:false"
span jwcid="@Conditional" condition="ognl:newUser">
disabled="ognl:true"
Nazmul Bhuiyan wrote:
>
> Hi,
> I’m trying to disable one field according to the condition (new or
> update). But I’m getting the following error.
> Can any one please check and tell me what I’m doing wrong?
> I’ve been following the component reference in
> http://tapestry.apache.org/tapestry3/doc/ComponentReference/TextField.html
> and using disabled="ognl:true".
>
> Thanks
>
> Naz
>
> Error:
> Template for component UserEdit contains multiple references to embedded
> component inputUserLogin.
>
>
> html:
>
>
>
> <tr>
> <td width="1%" nowrap>
>
> User Login:
>
> </td>
> <td width="99%">
> <input type="text"
> jwcid="inputUserLogin"
> size="20"
> maxlength="20"/>
> </td>
> </tr>
>
>
> <tr>
> <td width="1%" nowrap>
>
> User Login:
>
> </td>
> <td width="99%">
> <input type="text"
> jwcid="inputUserLogin"
> disabled="ognl:true"
> size="20"
> maxlength="20"/>
> </td>
> </tr>
>
>
>
> .pgae
> <component id="inputUserLogin" type="ValidField">
> <static-binding name="displayName" value="User Login" />
> <binding name="validator" expression="beans.required"/>
> <binding name="value" expression="user.usrLogin"/>
> </component>
>
>
--
View this message in context: http://www.nabble.com/T3%3A-Disable-TextField-tf4296203.html#a12229106
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: T3: Disable TextField
Posted by Nick Westgate <ni...@key-planning.co.jp>.
The error says exactly what is wrong with your template.
Each component must have a unique name (or be anonymous.)
Cheers,
Nick.
Nazmul Bhuiyan wrote:
> Template for component UserEdit contains multiple references to embedded
> component inputUserLogin.
...
> <input type="text"
> jwcid="inputUserLogin"
...
> <input type="text"
> jwcid="inputUserLogin"
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org