You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jaypax Ginete <ki...@gmail.com> on 2013/03/04 06:30:30 UTC

tapestry5.3 and Twitter-bootstrap disabled inputs

I have been able to use twitter-bootstrap for my layout. But I have 
encountered a problem when I'm trying to use "single" attributes. Doing 
something like:

<input type="text" placeholder="${name}" disabled/>

The "disabled" attribute causes a "Failure parsing template: Attribute 
name "disabled" associated with an element type.." exception.

Is there a workaround for this?


Re: tapestry5.3 and Twitter-bootstrap disabled inputs

Posted by Ivan Khalopik <ik...@gmail.com>.
<t:textfield value="someValue" placeholder="prop:name" disabled="true"/>

In this case "disabled" is T5 parameter, not html attribute.

http://tapestry.apache.org/component-parameters.html

This component will be rendered as:

<input ... disabled="disabled">


On Tue, Mar 5, 2013 at 4:59 PM, Tony Nelson <tn...@starpoint.com> wrote:
>
>
>> -----Original Message-----
>> From: Ivan Khalopik [mailto:ikhalopik@gmail.com]
>> Sent: Tuesday, March 05, 2013 3:34 AM
>> To: Tapestry users
>> Subject: Re: tapestry5.3 and Twitter-bootstrap disabled inputs
>>
>> You can use span element with .uneditable-input if you have some field that
>> should not be modified at all.
>>
>> <span class="input-xlarge uneditable-input">Some value here</span>
>>
>> If you need some client-side behaviour of enable/disable component use
>> disabled attribute as mentioned earlier.
>>
>> <input type="text" placeholder="${name}" disabled="disabled"/>
>>
>> Or:
>>
>> <t:textfield value="someValue" placeholder="prop:name"
>> disabled="true"/>
>>
>
> According to this
>
> http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#boolean-attribute
>
> disabled="true"
>
> is actually invalid markup.
>
> Since 1982, Starpoint Solutions has been a trusted source of human capital and solutions. We are committed to our clients, employees, environment, community and social concerns.  We foster an inclusive culture based on trust, respect, honesty and solid performance. Learn more about Starpoint and our social responsibility at http://www.starpoint.com/social_responsibility
>
> This email message from Starpoint Solutions LLC is for the sole use of  the intended recipient(s) and may contain confidential and privileged  information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.  Opinions, conclusions and other information in this message that do not relate to the official business of Starpoint Solutions shall be understood as neither given nor endorsed by it.



-- 
BR
Ivan

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


RE: tapestry5.3 and Twitter-bootstrap disabled inputs

Posted by Tony Nelson <tn...@starpoint.com>.

> -----Original Message-----
> From: Ivan Khalopik [mailto:ikhalopik@gmail.com]
> Sent: Tuesday, March 05, 2013 3:34 AM
> To: Tapestry users
> Subject: Re: tapestry5.3 and Twitter-bootstrap disabled inputs
>
> You can use span element with .uneditable-input if you have some field that
> should not be modified at all.
>
> <span class="input-xlarge uneditable-input">Some value here</span>
>
> If you need some client-side behaviour of enable/disable component use
> disabled attribute as mentioned earlier.
>
> <input type="text" placeholder="${name}" disabled="disabled"/>
>
> Or:
>
> <t:textfield value="someValue" placeholder="prop:name"
> disabled="true"/>
>

According to this

http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#boolean-attribute

disabled="true"

is actually invalid markup.

Since 1982, Starpoint Solutions has been a trusted source of human capital and solutions. We are committed to our clients, employees, environment, community and social concerns.  We foster an inclusive culture based on trust, respect, honesty and solid performance. Learn more about Starpoint and our social responsibility at http://www.starpoint.com/social_responsibility

This email message from Starpoint Solutions LLC is for the sole use of  the intended recipient(s) and may contain confidential and privileged  information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.  Opinions, conclusions and other information in this message that do not relate to the official business of Starpoint Solutions shall be understood as neither given nor endorsed by it.

Re: tapestry5.3 and Twitter-bootstrap disabled inputs

Posted by Ivan Khalopik <ik...@gmail.com>.
You can use span element with .uneditable-input if you have some field
that should not be modified at all.

<span class="input-xlarge uneditable-input">Some value here</span>

If you need some client-side behaviour of enable/disable component use
disabled attribute as mentioned earlier.

<input type="text" placeholder="${name}" disabled="disabled"/>

Or:

<t:textfield value="someValue" placeholder="prop:name" disabled="true"/>


On Mon, Mar 4, 2013 at 3:33 PM, Lance Java <la...@googlemail.com> wrote:
>
> You can add and remove classes in javascript.
>
> For example, in jquery:
> http://api.jquery.com/addClass/
> http://api.jquery.com/removeClass/
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry5-3-and-Twitter-bootstrap-disabled-inputs-tp5720319p5720326.html
> 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
>



--
BR
Ivan

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


Re: tapestry5.3 and Twitter-bootstrap disabled inputs

Posted by Lance Java <la...@googlemail.com>.
You can add and remove classes in javascript.

For example, in jquery:
http://api.jquery.com/addClass/
http://api.jquery.com/removeClass/



--
View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry5-3-and-Twitter-bootstrap-disabled-inputs-tp5720319p5720326.html
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: tapestry5.3 and Twitter-bootstrap disabled inputs

Posted by Jay Ginete <ki...@gmail.com>.
Thanks Peter but I have found a solution for presenting uneditable data. It
was right in the bootstrap forms page (
http://twitter.github.com/bootstrap/base-css.html#forms).

<span class="input-xlarge uneditable-input">Some value here</span>

There's a small problem with this though, I can't disable or enable the
textfield with javascript on the fly. I have to do a whole page reload or
some form zone magic. But right now, it should suffice.



On Mon, Mar 4, 2013 at 4:12 PM, Peter Wendorff <we...@uni-paderborn.de>wrote:

> Hi.
>
> probably disabled="disabled" is a solution that works?
>
> The standalone, unvalued attributes are a html5 (and old html) syntax
> element. Tapestry templates are well formed XHTML and therefore XML
> documents.
> In XML every attribute has a value, which produces that parsing error, I
> think.
>
> The Xhtml conform variant defined for HTML5 is to use the attribute name
> as it's value again, so disabled becomes disabled="disabled".
>
> See [1] for reference.
>
> regards
> Peter
>
> [1] http://www.whatwg.org/specs/**web-apps/current-work/**
> multipage/common-**microsyntaxes.html#boolean-**attribute<http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#boolean-attribute>
>
> Am 04.03.2013 06:30, schrieb Jaypax Ginete:
>
>  I have been able to use twitter-bootstrap for my layout. But I have
>> encountered a problem when I'm trying to use "single" attributes. Doing
>> something like:
>>
>> <input type="text" placeholder="${name}" disabled/>
>>
>> The "disabled" attribute causes a "Failure parsing template: Attribute
>> name "disabled" associated with an element type.." exception.
>>
>> Is there a workaround for this?
>>
>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: tapestry5.3 and Twitter-bootstrap disabled inputs

Posted by Peter Wendorff <we...@uni-paderborn.de>.
Hi.

probably disabled="disabled" is a solution that works?

The standalone, unvalued attributes are a html5 (and old html) syntax 
element. Tapestry templates are well formed XHTML and therefore XML 
documents.
In XML every attribute has a value, which produces that parsing error, I 
think.

The Xhtml conform variant defined for HTML5 is to use the attribute name 
as it's value again, so disabled becomes disabled="disabled".

See [1] for reference.

regards
Peter

[1] 
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#boolean-attribute

Am 04.03.2013 06:30, schrieb Jaypax Ginete:
> I have been able to use twitter-bootstrap for my layout. But I have 
> encountered a problem when I'm trying to use "single" attributes. 
> Doing something like:
>
> <input type="text" placeholder="${name}" disabled/>
>
> The "disabled" attribute causes a "Failure parsing template: Attribute 
> name "disabled" associated with an element type.." exception.
>
> Is there a workaround for this?
>
>


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