You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Claus Nielsen (BM Data)" <cl...@bmd.bonnier.dk> on 2005/10/18 14:38:57 UTC

Output-only form fields

Hi.

I am just getting started with Tapestry, and currently I am struggling
with a Form for updating a database record.

I would like to have the form display the database records key, but not
allow it to be changed.

Currently I am storing the key as hidden field in the Form (using the
"Hidden" component. I am displaying the key value using the Insert
component and I have entered the field-label as a constant in the html
template.

Is there an easier way to do this?

It seems very awkward, when what I really want is something much more
like the TextField / FieldLabel combination I am using for all the input
fields in the Form. Except it should be output only, of course.

Kind Regards
Claus Nielsen


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


Re: Output-only form fields

Posted by Robert Zeigler <ro...@scazdl.org>.
How about using textfield with the "disabled" parameter set to true?

Robert

Claus Nielsen (BM Data) wrote:
> Hi.
> 
> I am just getting started with Tapestry, and currently I am struggling
> with a Form for updating a database record.
> 
> I would like to have the form display the database records key, but not
> allow it to be changed.
> 
> Currently I am storing the key as hidden field in the Form (using the
> "Hidden" component. I am displaying the key value using the Insert
> component and I have entered the field-label as a constant in the html
> template.
> 
> Is there an easier way to do this?
> 
> It seems very awkward, when what I really want is something much more
> like the TextField / FieldLabel combination I am using for all the input
> fields in the Form. Except it should be output only, of course.
> 
> Kind Regards
> Claus Nielsen
> 
> 
> ---------------------------------------------------------------------
> 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: Output-only form fields

Posted by Andreas Andreou <an...@di.uoa.gr>.

Claus Nielsen (BM Data) wrote:

>It seems very awkward, when what I really want is something much more
>like the TextField / FieldLabel combination I am using for all the input
>fields in the Form. Except it should be output only, of course.
>  
>
Well, you're describing the solution. Use TextField
( 
http://jakarta.apache.org/tapestry/tapestry/ComponentReference/TextField.html 
)
and set the disabled property to true

>Kind Regards
>Claus Nielsen
>
>
>---------------------------------------------------------------------
>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