oh, and when I debug the page and check the ComponentResources the file is
there! But somehow it doesn't get read in rendering the page.
Michael
Michael Gerzabek wrote:
>
> Howard,
>
> I have the setup that the maven archetype prepares. So the anwser is yes.
> The .properties file is on the classpath. I double checked and put a copy
> right in the package where the java sources are. I put the ${site-label}
> into the .tml and got:
>
> Could not convert 'site-label' into a component parameter binding: Class
> com.michaelgerzabek.web.pages.prm.Contact does not contain a property
> named 'site-label' (within property expression 'site-label'). Available
> properties: class, componentResources, model, person.
>
> What's interesting to me is that for other pages the resources get read.
> Like I have a login page where I take the formatted messages from a
> .properties file and insert in the page code variables like
>
> ...
> _login.recordError(
> _userNameField,
> _messages.format( "name-already-taken", getUserName()
> )
> );
> ...
>
> and that works.
>
> So what am I missing? Thanks for the advice.
>
>
>
> Howard Lewis Ship wrote:
>>
>> Is your Contact.properties file in the correct place? It should be on
>> he classpath, with the .class file (not with the .tml file). Verify
>> this by putting ${site-label} into your template somewhere to see what
>> you get.
>>
>> On Jan 29, 2008 10:54 PM, Michael Gerzabek <[EMAIL PROTECTED]>
>> wrote:
>>> -- Contact.tml --
>>> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>>> <head>
>>> <meta http-equiv="Content-Type" content="text/html;
>>> charset=ISO-8859-1"/>
>>> <title>Person</title>
>>> </head>
>>> <body>
>>> <h1>${person.firstName} ${person.lastName}</h1>
>>> <t:beaneditform id="person" object="person" model="model"
>>> submitLabel="Änderungen speichern"
>>> reorder="title, firstName, lastName, birthDay, EMail, phone,
>>> fax, mobile, site"/>
>>> <p><t:pagelink page="prm/people">back to people</t:pagelink></p>
>>>
>>> </body>
>>> </html>
>>>
>>> -- Contact.java --
>>> ...
>>> void pageLoaded() {
>>>
>>> _model = _beanModelSource.create( Person.class, true, _resources
>>> );
>>> _model.remove( "id" );
>>> _model.remove( "added" );
>>> _model.remove( "updated" );
>>> _model.remove( "dayOfBirth" );
>>> _model.remove( "monthOfBirth" );
>>> _model.remove( "affiliate" );
>>> _model.remove( "owner" );
>>> }
>>> ...
>>>
>>> -- Contact.properties --
>>> title-label=Titel/Anrede
>>> firstName-label=Vorname
>>> lastName-label=Familienname
>>> middleName-label=Weitere Vornamen
>>> eMail-label=E-Mail-Adresse
>>> birthDay-label=Geburtstag
>>> mobile-label=Mobiltelefon
>>> phone-label=Telefon
>>> fax-label=FAX
>>> site-label=Website
>>> pictureURL-label=Link zu Bild
>>>
>>> Howard Lewis Ship schrieb:
>>>
>>> > Hard to see from this, can we see your .properties files?
>>> >
>>> > On Jan 29, 2008 1:59 AM, Michael Gerzabek <[EMAIL PROTECTED]>
>>> wrote:
>>> >
>>> >> hi guys
>>> >>
>>> >> I'm using T5.0.9.
>>> >>
>>> >> <t:beaneditform t:id="person" object="person" model="model"
>>> >> submitLabel="Änderungen speichern" reorder="title, firstName,
>>> lastName,
>>> >> birthDay, EMail, phone, fax, mobile, site"/>
>>> >>
>>> >> I provide the BeanModel like pinpointed in [1] and [2]. I provide a
>>> >> .properties file where the name of the page [Contact] = name of
>>> >> file[Contact]. I use the grid to browse through a dataset and invoke
>>> the
>>> >> page [Contact] with the beaneditform in REST style.
>>> >>
>>> >> The Bean is provided in edit mode. But no labels are there. This
>>> worked
>>> >> in 5.0.6.
>>> >>
>>> >> What am I missing?
>>> >> Michael
>>> >>
>>> >> [1]
>>> >>
>>> http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/BeanModelSource.html
>>> >> [2]
>>> >>
>>> http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/beaneditor/BeanModel.html
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> >
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator Apache Tapestry and Apache HiveMind
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/T5%3A-BeanEditForm-doesn%27t-pick-up-.properties-tp15156088p15224404.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]