You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michael Gerzabek <mi...@gmx.net> on 2008/01/29 10:59:20 UTC

T5: BeanEditForm doesn't pick up .properties

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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Massimo Lusetti <ml...@gmail.com>.
On Jan 31, 2008 12:55 AM, Howard Lewis Ship <hl...@gmail.com> wrote:

> I see you point, and it just highlights the fact that .tml files are
> allowed at the webapp root level which, itself, is an exception to the
> rule.  For components, the .tml and .properties file must be bundled
> in the same package folder as the .class file.
>
> For pages, and only pages, we allow the .tml to live in the webapp
> root as a convienience for previewing. However, even that is
> questionable, as a page that has an activation context will have a
> different base URL than one that doesn't, meaning that relative URLs
> to images and &etc. will always be somewhat tenuous (and Assets should
> be used).

Indeed.
I was one of the guy who 'spoke against' that changes (put template
files into webroot), but since they are there i don't see why
.properties files shouldn't be there too.

Speaking about previewability i tend to use src/html for that pourpose
since, as you said, it's obvious the needs for Assets.

Regards
-- 
Massimo
http://meridio.blogspot.com

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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Howard Lewis Ship <hl...@gmail.com>.
I see you point, and it just highlights the fact that .tml files are
allowed at the webapp root level which, itself, is an exception to the
rule.  For components, the .tml and .properties file must be bundled
in the same package folder as the .class file.

For pages, and only pages, we allow the .tml to live in the webapp
root as a convienience for previewing. However, even that is
questionable, as a page that has an activation context will have a
different base URL than one that doesn't, meaning that relative URLs
to images and &etc. will always be somewhat tenuous (and Assets should
be used).

On Jan 30, 2008 2:01 PM, Massimo Lusetti <ml...@gmail.com> wrote:
> On Jan 30, 2008 8:02 PM, Howard Lewis Ship <hl...@gmail.com> 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.
>
> May i piggy back this thread to ask if it sound resonable to have
> .properties files live side by side with .tml one?
> Since that files are usually manger by the same persons who manage the
> .tml, isnt't this the usual case?
>
> --
> Massimo
> http://meridio.blogspot.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Massimo Lusetti <ml...@gmail.com>.
On Jan 30, 2008 8:02 PM, Howard Lewis Ship <hl...@gmail.com> 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.

May i piggy back this thread to ask if it sound resonable to have
.properties files live side by side with .tml one?
Since that files are usually manger by the same persons who manage the
.tml, isnt't this the usual case?

-- 
Massimo
http://meridio.blogspot.com

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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Michael Gerzabek <mi...@gmx.net>.
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 <mi...@gmx.net>
>> 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 <mi...@gmx.net>
>>> 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: users-unsubscribe@tapestry.apache.org
>>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> >
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>> 
>> 
>> 
>> -- 
>> Howard M. Lewis Ship
>> 
>> Creator Apache Tapestry and Apache HiveMind
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 
>> 
> 
> 

-- 
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Howard Lewis Ship <hl...@gmail.com>.
OK, I'm glad you're back in operation.

On Feb 2, 2008 9:39 AM, Michael Gerzabek <mi...@gmx.net> wrote:
> Ok, finally I found it: Months ago I was playing around with the Label
> component. I found [1] and did a little rewrite to be able to put labels
> directly in my .tml files. Now 3 months later restarting the project I
> forgot about that.
>
> So sorry for the noise!
> Michael
>
> [1] http://www.nabble.com/-T5--Label-tf4618003.html
>
> Michael Gerzabek schrieb:
>
> > Ok. I packed the sources. But before I sent them I wanted to try it
> > one more time on my own. I generated new .project and .classpath files
> > with maven (2.0.8), created a new project in eclipse (3.2) imported
> > the project built it and ...
> >
> > ... all the labels where there! So actually now I have what I think 2
> > projects that should be the same. But they aren't. Is it possible that
> > moving from T5.0.4 where I started the application some months ago to
> > T5.0.9 within the same codebase is not free of side effects?
> >
> > I'm switching now to the 'new' codebase and continue my work there.
> > But ...???
> >
> > Howard Lewis Ship schrieb:
> >> Something odd is going on, because there are specific tests for this
> >> stuff so I know it works in the code.  Without seeing all the code and
> >> the full layout, there's no much more I can do.  If you can provide a
> >> zipped up Maven project to demonstate the problem, I'm sure I can whip
> >> up a fix.
> >>
> >> On Feb 1, 2008 2:26 PM, Michael Gerzabek <mi...@gmx.net>
> >> wrote:
> >>
> >>> Howard Lewis Ship schrieb:
> >>>
> >>>> Havning trouble following you ... what is the name, location and
> >>>> contents of your .properties file?
> >>>>
> >>>> Does the expansion work or not work?
> >>>>
> >>>>
> >>> No!
> >>>
> >>> the layout like in maven archetype (both get packaged):
> >>>   |
> >>>   +- JAVA/.../pages/prm/Contact.java
> >>>   +- RESOURCES/.../pages/prm/Contact.properties
> >>>   :
> >>>   /src/main/webapp/prm/Contact.tml
> >>>
> >>> the contents:
> >>> -- 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 --
> >>> ...
> >>> METHOD-BREAKPOINT HERE:
> >>>   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
> >>>
> >>> As I said, when I debug the resources get picked up. But in the page
> >>> they are not expanded.
> >>>
> >>> Michael
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Michael Gerzabek <mi...@gmx.net>.
Ok, finally I found it: Months ago I was playing around with the Label 
component. I found [1] and did a little rewrite to be able to put labels 
directly in my .tml files. Now 3 months later restarting the project I 
forgot about that.

So sorry for the noise!
Michael

[1] http://www.nabble.com/-T5--Label-tf4618003.html

Michael Gerzabek schrieb:
> Ok. I packed the sources. But before I sent them I wanted to try it 
> one more time on my own. I generated new .project and .classpath files 
> with maven (2.0.8), created a new project in eclipse (3.2) imported 
> the project built it and ...
>
> ... all the labels where there! So actually now I have what I think 2 
> projects that should be the same. But they aren't. Is it possible that 
> moving from T5.0.4 where I started the application some months ago to 
> T5.0.9 within the same codebase is not free of side effects?
>
> I'm switching now to the 'new' codebase and continue my work there. 
> But ...???
>
> Howard Lewis Ship schrieb:
>> Something odd is going on, because there are specific tests for this
>> stuff so I know it works in the code.  Without seeing all the code and
>> the full layout, there's no much more I can do.  If you can provide a
>> zipped up Maven project to demonstate the problem, I'm sure I can whip
>> up a fix.
>>
>> On Feb 1, 2008 2:26 PM, Michael Gerzabek <mi...@gmx.net> 
>> wrote:
>>  
>>> Howard Lewis Ship schrieb:
>>>    
>>>> Havning trouble following you ... what is the name, location and
>>>> contents of your .properties file?
>>>>
>>>> Does the expansion work or not work?
>>>>
>>>>       
>>> No!
>>>
>>> the layout like in maven archetype (both get packaged):
>>>   |
>>>   +- JAVA/.../pages/prm/Contact.java
>>>   +- RESOURCES/.../pages/prm/Contact.properties
>>>   :
>>>   /src/main/webapp/prm/Contact.tml
>>>
>>> the contents:
>>> -- 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 --
>>> ...
>>> METHOD-BREAKPOINT HERE:
>>>   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
>>>
>>> As I said, when I debug the resources get picked up. But in the page
>>> they are not expanded.
>>>
>>> Michael
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>     
>>
>>
>>
>>   
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Michael Gerzabek <mi...@gmx.net>.
Ok. I packed the sources. But before I sent them I wanted to try it one 
more time on my own. I generated new .project and .classpath files with 
maven (2.0.8), created a new project in eclipse (3.2) imported the 
project built it and ...

... all the labels where there! So actually now I have what I think 2 
projects that should be the same. But they aren't. Is it possible that 
moving from T5.0.4 where I started the application some months ago to 
T5.0.9 within the same codebase is not free of side effects?

I'm switching now to the 'new' codebase and continue my work there. But 
...???

Howard Lewis Ship schrieb:
> Something odd is going on, because there are specific tests for this
> stuff so I know it works in the code.  Without seeing all the code and
> the full layout, there's no much more I can do.  If you can provide a
> zipped up Maven project to demonstate the problem, I'm sure I can whip
> up a fix.
>
> On Feb 1, 2008 2:26 PM, Michael Gerzabek <mi...@gmx.net> wrote:
>   
>> Howard Lewis Ship schrieb:
>>     
>>> Havning trouble following you ... what is the name, location and
>>> contents of your .properties file?
>>>
>>> Does the expansion work or not work?
>>>
>>>       
>> No!
>>
>> the layout like in maven archetype (both get packaged):
>>   |
>>   +- JAVA/.../pages/prm/Contact.java
>>   +- RESOURCES/.../pages/prm/Contact.properties
>>   :
>>   /src/main/webapp/prm/Contact.tml
>>
>> the contents:
>> -- 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 --
>> ...
>> METHOD-BREAKPOINT HERE:
>>   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
>>
>> As I said, when I debug the resources get picked up. But in the page
>> they are not expanded.
>>
>> Michael
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>     
>
>
>
>   


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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Howard Lewis Ship <hl...@gmail.com>.
Something odd is going on, because there are specific tests for this
stuff so I know it works in the code.  Without seeing all the code and
the full layout, there's no much more I can do.  If you can provide a
zipped up Maven project to demonstate the problem, I'm sure I can whip
up a fix.

On Feb 1, 2008 2:26 PM, Michael Gerzabek <mi...@gmx.net> wrote:
> Howard Lewis Ship schrieb:
> > Havning trouble following you ... what is the name, location and
> > contents of your .properties file?
> >
> > Does the expansion work or not work?
> >
> No!
>
> the layout like in maven archetype (both get packaged):
>   |
>   +- JAVA/.../pages/prm/Contact.java
>   +- RESOURCES/.../pages/prm/Contact.properties
>   :
>   /src/main/webapp/prm/Contact.tml
>
> the contents:
> -- 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 --
> ...
> METHOD-BREAKPOINT HERE:
>   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
>
> As I said, when I debug the resources get picked up. But in the page
> they are not expanded.
>
> Michael
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Michael Gerzabek <mi...@gmx.net>.
Howard Lewis Ship schrieb:
> Havning trouble following you ... what is the name, location and
> contents of your .properties file?
>
> Does the expansion work or not work?
>   
No!

the layout like in maven archetype (both get packaged):
  |
  +- JAVA/.../pages/prm/Contact.java
  +- RESOURCES/.../pages/prm/Contact.properties
  :
  /src/main/webapp/prm/Contact.tml

the contents:
-- 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 --
...
METHOD-BREAKPOINT HERE:
  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

As I said, when I debug the resources get picked up. But in the page 
they are not expanded.

Michael

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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Howard Lewis Ship <hl...@gmail.com>.
Havning trouble following you ... what is the name, location and
contents of your .properties file?

Does the expansion work or not work?

On Feb 1, 2008 11:49 AM, Michael Gerzabek <mi...@gmx.net> wrote:
> I'm sorry Howard. The .properties file seems to get read. When I debug
> the application the InternalComponentResourcesImpl holds the right file
> in the attribute _properties. I can see all the mappings there. But the
> page doesn't display the content of the property if requested.
>
> Is there maybe a switch to display/ not display? I mean the bean
> properties get displayed. ?
>
> Howard Lewis Ship schrieb:
>
> > Sorry, should be ${message:site-label}, to verify that your
> > .properties file is in the fight place and readable.
> >
> >
> > On Feb 1, 2008 2:54 AM, Michael Gerzabek <mi...@gmx.net> 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 <mi...@gmx.net>
> >>> 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 <mi...@gmx.net>
> >>>>>
> >>>> 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: users-unsubscribe@tapestry.apache.org
> >>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>
> >>>>
> >>>>
> >>>
> >>> --
> >>> Howard M. Lewis Ship
> >>>
> >>> Creator Apache Tapestry and Apache HiveMind
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>
> >>>
> >>>
> >>>
> >> --
> >> View this message in context: http://www.nabble.com/T5%3A-BeanEditForm-doesn%27t-pick-up-.properties-tp15156088p15224401.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
> >>
> >>
> >>
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Michael Gerzabek <mi...@gmx.net>.
I'm sorry Howard. The .properties file seems to get read. When I debug 
the application the InternalComponentResourcesImpl holds the right file 
in the attribute _properties. I can see all the mappings there. But the 
page doesn't display the content of the property if requested.

Is there maybe a switch to display/ not display? I mean the bean 
properties get displayed. ?

Howard Lewis Ship schrieb:
> Sorry, should be ${message:site-label}, to verify that your
> .properties file is in the fight place and readable.
>
>
> On Feb 1, 2008 2:54 AM, Michael Gerzabek <mi...@gmx.net> 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 <mi...@gmx.net>
>>> 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 <mi...@gmx.net>
>>>>>           
>>>> 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: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>>
>>>>>
>>>>>           
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>         
>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator Apache Tapestry and Apache HiveMind
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>>       
>> --
>> View this message in context: http://www.nabble.com/T5%3A-BeanEditForm-doesn%27t-pick-up-.properties-tp15156088p15224401.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
>>
>>
>>     
>
>
>
>   


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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Howard Lewis Ship <hl...@gmail.com>.
Sorry, should be ${message:site-label}, to verify that your
.properties file is in the fight place and readable.


On Feb 1, 2008 2:54 AM, Michael Gerzabek <mi...@gmx.net> 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 <mi...@gmx.net>
> > 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 <mi...@gmx.net>
> >> 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: users-unsubscribe@tapestry.apache.org
> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> >
> > --
> > Howard M. Lewis Ship
> >
> > Creator Apache Tapestry and Apache HiveMind
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/T5%3A-BeanEditForm-doesn%27t-pick-up-.properties-tp15156088p15224401.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
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Michael Gerzabek <mi...@gmx.net>.
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 <mi...@gmx.net>
> 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 <mi...@gmx.net>
>> 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: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator Apache Tapestry and Apache HiveMind
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-BeanEditForm-doesn%27t-pick-up-.properties-tp15156088p15224401.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: T5: BeanEditForm doesn't pick up .properties

Posted by Howard Lewis Ship <hl...@gmail.com>.
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 <mi...@gmx.net> 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 <mi...@gmx.net> 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: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >>
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Michael Gerzabek <mi...@gmx.net>.
-- 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 <mi...@gmx.net> 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: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>     
>
>
>
>   


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


Re: T5: BeanEditForm doesn't pick up .properties

Posted by Howard Lewis Ship <hl...@gmail.com>.
Hard to see from this, can we see your .properties files?

On Jan 29, 2008 1:59 AM, Michael Gerzabek <mi...@gmx.net> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


T5 BeanEditForm prints no labels was: [ T5: BeanEditForm doesn't pick up .properties]

Posted by Michael Gerzabek <mi...@gmx.net>.
Actually I was wrong. The property file get's read but the labels on the 
page are alsways empty. Any clues?

Michael

 Michael Gerzabek schrieb:
> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


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