Re: Using readonly textarea inside a Form component
On 12.07.2010 15:43, Christophe Cordenier wrote: > What if you use a plain html textarea with readonly attribute instead of a > div ? This works, thank you! - Stephan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Using readonly textarea inside a Form component
What if you use a plain html textarea with readonly attribute instead of a div ? 2010/7/12 Stephan Windmüller > Am 12.07.2010 15:09, schrieb Christophe Cordenier: > > > Maybe you can create a new component that displays your text in a div and > > use a disable/invisible textfield. > > For this I have to parse the text and convert it to HTML: Special > characters, newlines etc. > > - Stephan > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Regards, Christophe Cordenier. Committer on Apache Tapestry 5 Co-creator of wooki @wookicentral.com
Re: Using readonly textarea inside a Form component
Am 12.07.2010 15:09, schrieb Christophe Cordenier: > Maybe you can create a new component that displays your text in a div and > use a disable/invisible textfield. For this I have to parse the text and convert it to HTML: Special characters, newlines etc. - Stephan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Using readonly textarea inside a Form component
On 12.07.2010 14:54, Benny Law wrote: > Or, if you really want the textarea to be readonly (vs disabled), just add > the readonly="readonly" attribute. This allows the user to set focus to it > and copy content from it but not change the content, and it doesn't get the > disabled appearance. This was my first try but it prevents the form from being submitted. - Stephan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Using readonly textarea inside a Form component
Hi Maybe you can create a new component that displays your text in a div and use a disable/invisible textfield. So your field is secure, and you let the possibility for the user to copy/paste the text. 2010/7/12 Stephan Windmüller > On 12.07.2010 14:46, Christophe Cordenier wrote: > > >> Is it possbible to mark the component itself as read-only? Setting > >> t:disabled="true" works but the textarea is rendered differently. > > AFAIR Tapestry simply append 'disabled' in the generated markup. Using > > CSS to stylize .disabled should to the trick. > > Thanks for your reply. "disable" does more than changing the style: > Users are unable to interact with the text, like copying. I want the > users to be able to do this. > > Regards > Stephan > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Regards, Christophe Cordenier. Committer on Apache Tapestry 5 Co-creator of wooki @wookicentral.com
Re: Using readonly textarea inside a Form component
On 12.07.2010 14:46, Christophe Cordenier wrote: >> Is it possbible to mark the component itself as read-only? Setting >> t:disabled="true" works but the textarea is rendered differently. > AFAIR Tapestry simply append 'disabled' in the generated markup. Using > CSS to stylize .disabled should to the trick. Thanks for your reply. "disable" does more than changing the style: Users are unable to interact with the text, like copying. I want the users to be able to do this. Regards Stephan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Using readonly textarea inside a Form component
Or, if you really want the textarea to be readonly (vs disabled), just add the readonly="readonly" attribute. This allows the user to set focus to it and copy content from it but not change the content, and it doesn't get the disabled appearance. Benny On Mon, Jul 12, 2010 at 8:46 AM, Christophe Cordenier < christophe.corden...@gmail.com> wrote: > Hi > > AFAIR Tapestry simply append 'disabled' in the generated markup. Using CSS > to stylize .disabled should to the trick. > > 2010/7/12 Stephan Windmüller > > > Hello! > > > > I am trying to use a read-only textarea component inside a form > > component. When the form is submitted, I get this error: > > > > org.apache.tapestry5.runtime.ComponentEventException: Failure writing > > parameter 'value' of component xxx.textarea: Binding > > org.apache.tapestry5.internal.services.attributeexpansionbind...@ce988a > > is read-only. > > > > Is it possbible to mark the component itself as read-only? Setting > > t:disabled="true" works but the textarea is rendered differently. > > > > Regards > > Stephan > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > -- > Regards, > Christophe Cordenier. > > Committer on Apache Tapestry 5 > Co-creator of wooki @wookicentral.com >
Re: Using readonly textarea inside a Form component
Hi AFAIR Tapestry simply append 'disabled' in the generated markup. Using CSS to stylize .disabled should to the trick. 2010/7/12 Stephan Windmüller > Hello! > > I am trying to use a read-only textarea component inside a form > component. When the form is submitted, I get this error: > > org.apache.tapestry5.runtime.ComponentEventException: Failure writing > parameter 'value' of component xxx.textarea: Binding > org.apache.tapestry5.internal.services.attributeexpansionbind...@ce988a > is read-only. > > Is it possbible to mark the component itself as read-only? Setting > t:disabled="true" works but the textarea is rendered differently. > > Regards > Stephan > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Regards, Christophe Cordenier. Committer on Apache Tapestry 5 Co-creator of wooki @wookicentral.com
Using readonly textarea inside a Form component
Hello! I am trying to use a read-only textarea component inside a form component. When the form is submitted, I get this error: org.apache.tapestry5.runtime.ComponentEventException: Failure writing parameter 'value' of component xxx.textarea: Binding org.apache.tapestry5.internal.services.attributeexpansionbind...@ce988a is read-only. Is it possbible to mark the component itself as read-only? Setting t:disabled="true" works but the textarea is rendered differently. Regards Stephan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org