Re: [T5]: label not being picked up
that is the right (coded) behavior but i dont agree with that too https://issues.apache.org/jira/browse/TAPESTRY-2277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588658#action_12588658 2008/7/29 <[EMAIL PROTECTED]> > Sorry for another newbie question :-) but why does: > > >the name of the user > > >t:type="TextField" t:value="userName"/> > > > print "the name of the user" rather than "User Name" like it does in the > Kolesnikov book? > > thanks, > p. > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- with regards Sven Homburg http://tapestry5-components.googlecode.com http://chenillekit.googlecode.com
[T5]: label not being picked up
Sorry for another newbie question :-) but why does: the name of the user print "the name of the user" rather than "User Name" like it does in the Kolesnikov book? thanks, p. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5]: label in properties file
Thank you so much for your help, Petros, Filip, Josh. This did the trick! My new directory structure is src main java com companyname pages coops FindCoops.java resources com companyname pages coops FindCoops.tml FindCoops.properties Andy On Thu, 2008-04-03 at 14:25 +0200, Filip S. Adamsen wrote: > Hi, > > Try putting it in src/main/resources/com/companyname/pages/coops. > > -Filip > > On 2008-04-03 14:23, Andy Huhn wrote: > > Thanks for your reply, Petros. I tried that, and I have the same issue. > > > > Here is my directory structure: > > > > src > > main > > java > > com > > companyname > > pages > > coops > > FindCoops.java > > webapp > > coops > > FindCoops.tml > > FindCoops.properties > > > > I have not had any issues to date with the directory structure; Tapestry > > finds all the pages just fine, it finds the hibernate.cfg.xml, it finds > > my assets, etc. But for some reason, I can't get this properties file > > to work. Am I missing something obvious? > > > > Thanks, > > Andy > > > > On Thu, 2008-04-03 at 02:14 -0700, Petros Petrou wrote: > >> I think you need to move your FindCoops.properties file to be next to your > >> .tml file and not the .java file. > >> > >> Petros > >> > >> > >> Andy Huhn-2 wrote: > >>> OK, this is driving me crazy. > >>> > >>> I have a .tml named FindCoops.tml that contains the following fragment: > >>> > >>> > >>> >>> t:value="userPstlCode" /> > >>> > >>> In the same directory as the corresponding .java page file, I have a > >>> file named FindCoops.properties that contains the following: > >>> > >>> userPstlCodeField-label=ZIP > >>> > >>> Yet when the input is rendered, it is rendered with a label of "User > >>> Pstl Code Field". Shouldn't it be rendered as ZIP? > >>> > >>> I'm on T5.0.11. > >>> > >>> Thanks! > >>> Andy > >>> > >>> > >>> - > >>> 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] > > > > - > 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]
Re: [T5]: label in properties file
As I understand it putting your template files in webapps is an exception for some people who can't get away from that folder structure. I believe everything else needs to be found on the classpath. Your properties file should be in a folder that gets put in the WEB-INF/classes folder, or into your application jar. On Thu, Apr 3, 2008 at 5:23 AM, Andy Huhn <[EMAIL PROTECTED]> wrote: > Thanks for your reply, Petros. I tried that, and I have the same issue. > > Here is my directory structure: > > src > main >java > com >companyname > pages >coops > FindCoops.java >webapp > coops >FindCoops.tml >FindCoops.properties > > I have not had any issues to date with the directory structure; Tapestry > finds all the pages just fine, it finds the hibernate.cfg.xml, it finds > my assets, etc. But for some reason, I can't get this properties file > to work. Am I missing something obvious? > > Thanks, > Andy > > > On Thu, 2008-04-03 at 02:14 -0700, Petros Petrou wrote: > > I think you need to move your FindCoops.properties file to be next to your > > .tml file and not the .java file. > > > > Petros > > > > > > Andy Huhn-2 wrote: > > > > > > OK, this is driving me crazy. > > > > > > I have a .tml named FindCoops.tml that contains the following fragment: > > > > > > > > > > > t:value="userPstlCode" /> > > > > > > In the same directory as the corresponding .java page file, I have a > > > file named FindCoops.properties that contains the following: > > > > > > userPstlCodeField-label=ZIP > > > > > > Yet when the input is rendered, it is rendered with a label of "User > > > Pstl Code Field". Shouldn't it be rendered as ZIP? > > > > > > I'm on T5.0.11. > > > > > > Thanks! > > > Andy > > > > > > > > > - > > > 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] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5]: label in properties file
Hi, Try putting it in src/main/resources/com/companyname/pages/coops. -Filip On 2008-04-03 14:23, Andy Huhn wrote: Thanks for your reply, Petros. I tried that, and I have the same issue. Here is my directory structure: src main java com companyname pages coops FindCoops.java webapp coops FindCoops.tml FindCoops.properties I have not had any issues to date with the directory structure; Tapestry finds all the pages just fine, it finds the hibernate.cfg.xml, it finds my assets, etc. But for some reason, I can't get this properties file to work. Am I missing something obvious? Thanks, Andy On Thu, 2008-04-03 at 02:14 -0700, Petros Petrou wrote: I think you need to move your FindCoops.properties file to be next to your .tml file and not the .java file. Petros Andy Huhn-2 wrote: OK, this is driving me crazy. I have a .tml named FindCoops.tml that contains the following fragment: In the same directory as the corresponding .java page file, I have a file named FindCoops.properties that contains the following: userPstlCodeField-label=ZIP Yet when the input is rendered, it is rendered with a label of "User Pstl Code Field". Shouldn't it be rendered as ZIP? I'm on T5.0.11. Thanks! Andy - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5]: label in properties file
Thanks for your reply, Petros. I tried that, and I have the same issue. Here is my directory structure: src main java com companyname pages coops FindCoops.java webapp coops FindCoops.tml FindCoops.properties I have not had any issues to date with the directory structure; Tapestry finds all the pages just fine, it finds the hibernate.cfg.xml, it finds my assets, etc. But for some reason, I can't get this properties file to work. Am I missing something obvious? Thanks, Andy On Thu, 2008-04-03 at 02:14 -0700, Petros Petrou wrote: > I think you need to move your FindCoops.properties file to be next to your > .tml file and not the .java file. > > Petros > > > Andy Huhn-2 wrote: > > > > OK, this is driving me crazy. > > > > I have a .tml named FindCoops.tml that contains the following fragment: > > > > > > > t:value="userPstlCode" /> > > > > In the same directory as the corresponding .java page file, I have a > > file named FindCoops.properties that contains the following: > > > > userPstlCodeField-label=ZIP > > > > Yet when the input is rendered, it is rendered with a label of "User > > Pstl Code Field". Shouldn't it be rendered as ZIP? > > > > I'm on T5.0.11. > > > > Thanks! > > Andy > > > > > > - > > 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]
Re: [T5]: label in properties file
I thought the properties file needs to end up next to the class file in the classpath when the project is built - regardless of where it comes from. (src/main/java/... or src/main/resources/... or wherever) Petros Petrou wrote: > > I think you need to move your FindCoops.properties file to be next to > your .tml file and not the .java file. > > Petros > > > Andy Huhn-2 wrote: >> >> OK, this is driving me crazy. >> >> I have a .tml named FindCoops.tml that contains the following fragment: >> >> >> > t:value="userPstlCode" /> >> >> In the same directory as the corresponding .java page file, I have a >> file named FindCoops.properties that contains the following: >> >> userPstlCodeField-label=ZIP >> >> Yet when the input is rendered, it is rendered with a label of "User >> Pstl Code Field". Shouldn't it be rendered as ZIP? >> >> I'm on T5.0.11. >> >> Thanks! >> Andy >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- View this message in context: http://www.nabble.com/-T5-%3A-label-in-properties-file-tp16467115p16467350.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]
Re: [T5]: label in properties file
I think you need to move your FindCoops.properties file to be next to your .tml file and not the .java file. Petros Andy Huhn-2 wrote: > > OK, this is driving me crazy. > > I have a .tml named FindCoops.tml that contains the following fragment: > > > t:value="userPstlCode" /> > > In the same directory as the corresponding .java page file, I have a > file named FindCoops.properties that contains the following: > > userPstlCodeField-label=ZIP > > Yet when the input is rendered, it is rendered with a label of "User > Pstl Code Field". Shouldn't it be rendered as ZIP? > > I'm on T5.0.11. > > Thanks! > Andy > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-T5-%3A-label-in-properties-file-tp16467115p16467339.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]
[T5]: label in properties file
OK, this is driving me crazy. I have a .tml named FindCoops.tml that contains the following fragment: In the same directory as the corresponding .java page file, I have a file named FindCoops.properties that contains the following: userPstlCodeField-label=ZIP Yet when the input is rendered, it is rendered with a label of "User Pstl Code Field". Shouldn't it be rendered as ZIP? I'm on T5.0.11. Thanks! Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Label
Hi Nick, That was REALLY easy! Wow, 5 minutes and a new component is born. It's hard to believe. The more I work with T5 the more I like it. So let's have a look at RadioGroup... Cheers, Michael Nick Westgate schrieb: > Hi Michael. > > In the future it should be easy to do this with a Mixin, but there are > a couple of problems that might (or might not) get in the way currently. > > Anyway, it's very easy to write components. Just take the Radio.java > source eg from http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/ > tapestry-core/src/main/java/org/apache/tapestry/corelib/components > > and hack away till it does what you want. In this case, change: > @BeforeRenderBody > boolean renderBody() > { > // Don't render the body of the component even if there is one. > > return false; > } > > to return true based on the criteria you want, and the opposite here: > @AfterRender > void after(MarkupWriter writer) > { > writer.write(_field.getLabel()); > > writer.end(); // label > } > > To see how to write your own components and where to put things see: > http://wiki.apache.org/tapestry/Tapestry5HowTos > > Note that if you are using T5.0.6 then a few things have changed like > templates are now named *.tml. Search the list for other changes. > > Cheers, > Nick. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Label
Hi Michael. In the future it should be easy to do this with a Mixin, but there are a couple of problems that might (or might not) get in the way currently. Anyway, it's very easy to write components. Just take the Radio.java source eg from http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/ tapestry-core/src/main/java/org/apache/tapestry/corelib/components and hack away till it does what you want. In this case, change: @BeforeRenderBody boolean renderBody() { // Don't render the body of the component even if there is one. return false; } to return true based on the criteria you want, and the opposite here: @AfterRender void after(MarkupWriter writer) { writer.write(_field.getLabel()); writer.end(); // label } To see how to write your own components and where to put things see: http://wiki.apache.org/tapestry/Tapestry5HowTos Note that if you are using T5.0.6 then a few things have changed like templates are now named *.tml. Search the list for other changes. Cheers, Nick. Michael Gerzabek wrote: > Hi, > > Another question from a newbie. What would it take to read the text > surrounded by A pretty label > text: and use this if no .properties are provided? > > Michael > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5] Label
Hi, Another question from a newbie. What would it take to read the text surrounded by A pretty label text: and use this if no .properties are provided? Michael -- "Path is created through walking" [winged words] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]