Thanks Chris Lewis, that is work. fine!
(about first question : if you don't set label for an input, tapestry use its id as a label with some changes, for example : it your input id is : firstName , tapestry set its default label as : First Name) On 10/17/07, Chris Lewis <[EMAIL PROTECTED]> wrote: > > Hi Mohammad, > > I don't quite understand your first question, but the second is easy as > long as you use a "message" for the label value. > For example, I have a text field on a multi-lingual page for a user's > first name: > > <t:textfield t:id="firstName" label="message:firstName-label"/> > > Notice the "message:" binding prefix in the value parameter. This tells > tapestry to provide this component with a string (firstName-label) from > the component/page (Page.properties) or application (App.properties) > catalogues, in that order. So if you have this in your App.properties: > > firstName-label=Name > > Then you can use the label component for another component and it will > contain that components label as its text. So we have: > > <t:label for="firstName"/> > <t:textfield t:id="firstName" label="message:firstName-label"/> > > This will provide us with a label tag with the text "Name" for the text > box. For other languages, add message catalogues for them and provide > the same strings. In my example I could provide an Italian version by > providing an Italian message catalogue, named App_it.properties: > > firstName-label=Nome > > When users who prefer Italian visit the page, they will see the text > "Nome" instead of "Name". See the page on internationalization for full > details: > > http://tapestry.apache.org/tapestry5/tapestry-core/guide/localization.html > > chris > > Mohammad Shamsi wrote: > > hi, > > > > Label component in T5, just have a parameter named "for". > > Tapestry use this value with some changes as a label text. > > this value also used for validation messages. > > > > but : > > > > 1 - for example my textfield component id is "item.firstName". then > it's > > label is : item.first Name :( not good label > > 2 - in multi language pages, labels most change to selected language. > > > > if Label component have an optional parameter for its value, > > then developers has no problem in these cases. > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- sincerely yours M. H. Shamsi
