Annotations and translators
Hi, I wan to to declare a DatePicker component with annotations. I just passed the component from .page, to java the corresponding java class, but I got a parse exception, because of the translators bindings... Here is the code on .page: component id=date type=DatePicker binding name=value value=date/ binding name=displayName value=literal:Data/ binding name=validators value=validators:required[É necessário uma data!]/ binding name=translator value=translator:date,pattern=dd/MM/,message=Data Inválida!/ /component And with annotation: @Component(id=date, type=DatePicker, bindings= {value=date, displayName=literal:Data, validators={validators:required[É necessário uma data!]}, translator={translator:date,pattern=dd/MM/,message=Data Inválida!}}) public abstract DatePicker getDateComponent(); Does anybody know a way to declare the component with annotation, and make some complex bindings like these, without error? Thank you!
Re: Annotations and translators
SORRY Such a dumb I'm! The binding declaration was wrong... ;) Mael On 10/4/06, Mael Caldas [EMAIL PROTECTED] wrote: Hi, I wan to to declare a DatePicker component with annotations. I just passed the component from .page, to java the corresponding java class, but I got a parse exception, because of the translators bindings... Here is the code on .page: component id=date type=DatePicker binding name=value value=date/ binding name=displayName value=literal:Data/ binding name=validators value=validators:required[É necessário uma data!]/ binding name=translator value=translator:date,pattern=dd/MM/,message=Data Inválida!/ /component And with annotation: @Component(id=date, type=DatePicker, bindings= {value=date, displayName=literal:Data, validators={validators:required[É necessário uma data!]}, translator={translator:date,pattern=dd/MM/,message=Data Inválida!}}) public abstract DatePicker getDateComponent(); Does anybody know a way to declare the component with annotation, and make some complex bindings like these, without error? Thank you!
Re: Annotations and translators
hehehehe thanks! :) On 10/4/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Not dumb, that's what this list is for. :) On 10/4/06, Mael Caldas [EMAIL PROTECTED] wrote: SORRY Such a dumb I'm! The binding declaration was wrong... ;) Mael On 10/4/06, Mael Caldas [EMAIL PROTECTED] wrote: Hi, I wan to to declare a DatePicker component with annotations. I just passed the component from .page, to java the corresponding java class, but I got a parse exception, because of the translators bindings... Here is the code on .page: component id=date type=DatePicker binding name=value value=date/ binding name=displayName value=literal:Data/ binding name=validators value=validators:required[É necessário uma data!]/ binding name=translator value=translator:date,pattern=dd/MM/,message=Data Inválida!/ /component And with annotation: @Component(id=date, type=DatePicker, bindings= {value=date, displayName=literal:Data, validators={validators:required[É necessário uma data!]}, translator={translator:date,pattern=dd/MM/,message=Data Inválida!}}) public abstract DatePicker getDateComponent(); Does anybody know a way to declare the component with annotation, and make some complex bindings like these, without error? Thank you! -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Tapestry and OSGI
Hi everybody! Has anybody experienced using Tapestry with OSGI? We tried, but had some problem with hivemind... Thanks!!!
Re: Components containing dynamic number of component
Hi Jacob, I don't have any didactic example to explain this well, but you can do this like this: For each component, you create a model, or a object that each component receives and interact with him. So, you create a component that receives a List of Objects, iterating over then, and, depending on the type, call the respective component to render. Use If component around each component and the instanceof to evaluate the condition. So, you use the component that receives the List inside your column component, and pass the List of objects to them... If you can't do, I will try to find some code that you can understand... :) Mael On 9/27/06, jake123 [EMAIL PROTECTED] wrote: Hi Mael, thank you for your answer. Have you done this your self? In that case can you share some example codes? It is much easier to understand how it should work if I can follow the code. thanks again, Jacob Mael Caldas-2 wrote: Hi Jacob, I Think you have to work on a model that represents better your column... With the the For Component, and a little of polymorphism applied to components and its models you can do It easily. I don't think you have to work with AbstractComponent, RenderBody, or that kind of thing... A tip... always try to work with components hierarchy... When you work with Tapestry, think on Tapestry approach... the things almost are simpler than you think... ;) Mael On 9/26/06, jake123 [EMAIL PROTECTED] wrote: Hi, I am pritty new to tapestry and I am working with tapestry 4.0.2. I have a question about custom components. I have a side column in my application that has a few lines of html and then it should contain one or many components depending on where in the application I use it. my question is: How do I do this? My html file for left column look like this : html body jwcid=$content$ link href=/default/css/leftcolumn.css rel=stylesheet type=text/css / div id=leftColumn div id=innerLeftColumn !-- Login Component -- !-- Article list component -- /div /div /body /html Do I use a abstractComponent and use the renderComponent(IMarkupWriter writer, IRequestCycle cycle) and can the renderBody(writer, cycle) render only one or many components? Thank you for your patience with trivial questions and for any suggestions on how to solve my problems Jacob -- View this message in context: http://www.nabble.com/Components-containing-dynamic-number-of-component-tf2340643.html#a6514321 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Components-containing-dynamic-number-of-component-tf2340643.html#a6526232 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: Components containing dynamic number of component
Hi Jacob, I Think you have to work on a model that represents better your column... With the the For Component, and a little of polymorphism applied to components and its models you can do It easily. I don't think you have to work with AbstractComponent, RenderBody, or that kind of thing... A tip... always try to work with components hierarchy... When you work with Tapestry, think on Tapestry approach... the things almost are simpler than you think... ;) Mael On 9/26/06, jake123 [EMAIL PROTECTED] wrote: Hi, I am pritty new to tapestry and I am working with tapestry 4.0.2. I have a question about custom components. I have a side column in my application that has a few lines of html and then it should contain one or many components depending on where in the application I use it. my question is: How do I do this? My html file for left column look like this : html body jwcid=$content$ link href=/default/css/leftcolumn.css rel=stylesheet type=text/css / div id=leftColumn div id=innerLeftColumn !-- Login Component -- !-- Article list component -- /div /div /body /html Do I use a abstractComponent and use the renderComponent(IMarkupWriter writer, IRequestCycle cycle) and can the renderBody(writer, cycle) render only one or many components? Thank you for your patience with trivial questions and for any suggestions on how to solve my problems Jacob -- View this message in context: http://www.nabble.com/Components-containing-dynamic-number-of-component-tf2340643.html#a6514321 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: Contrib Table Summarize
SumDecorator, decorator pattern? I didn't see anything about that in any documentation... Can you give-me some example or a link? Thank you, Mael Caldas On 9/1/06, andyhot [EMAIL PROTECTED] wrote: cotrib:Table can't do anything by itself but I'd use the decorator pattern... public Collection getData() { return new SumDecorator( getRealData() ); } Mael Caldas wrote: Hi, I'm using the contrib Table component, iterating over a Collection of Row Objects, and setting the collumns values with a String parameter. I want to get the last row of the table with a sum of all data on each column. Does anybody know how to do this in a simple way? Thank's! Mael Caldas -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic Link
Hi Nielsh, You can use a special renderer on DirectLink, PageLink, ExternalLink and so on..: bean name=popupRenderer class=org.apache.tapestry.contrib.link.PopupLinkRenderer set name=windowName value='disclaimer'/ set name=features value='width=300, height=500, scrollbars=yes, resizable=no'/ /bean On template: a href=# jwcid=@DirectLink page=ognl:page renderer=ognl:beans.popupRendererspan jwcid=@Insert value=ognl:linkTitleLink/span/a Don't forget to use the @Body component, becouse of the generated javascript See the documentation for more details about features and so on... Mael Caldas On 9/6/06, Nilesh [EMAIL PROTECTED] wrote: hi, I need to add dynamic link to Tapestry Page, which should open in a pop-up window. can any one please let me know how can i do this? Thanks A lot -- View this message in context: http://www.nabble.com/Dynamic- Link-tf2226663.html#a6170388 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Contrib Table Summarize
Hi, I'm using the contrib Table component, iterating over a Collection of Row Objects, and setting the collumns values with a String parameter. I want to get the last row of the table with a sum of all data on each column. Does anybody know how to do this in a simple way? Thank's! Mael Caldas
Re: [ANN] Tacos 4.0.0 released
The Masks, from Core Components doesn't work on Firefox 1.5.0.4 On 8/25/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: I think that's the flash player issue someone talked about in another thread. Since the other demos (http://opencomponentry.com:8080/workbench ) work fine in opera 9 I'm guessing if it is a bug it was fixed some time ago. (as the tapestry dojo version is still pretty old in comparison to what is coming out in dojo 0.4 ) On 8/25/06, Henri Dupre [EMAIL PROTECTED] wrote: This is fantastic! But nothings shows up with Opera 9... Is this a bug in dojo? On 8/24/06, andyhot [EMAIL PROTECTED] wrote: The latest tacos release is out! Several new components have been added, lots of bug fixes made and dojo updated to 0.3.1 Check it out at http://tacos.sourceforge.net/ Live demo http://opencomponentry.com:8080/tacos/app -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Henri Dupre Actualis Center -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: How to handle components and filesystem wysiwyg design?
Hi Malin, Instead of keep a static copy of border on each page, you can do the opposite. I usually keep a Dumb copy of my border, without jwcid's, in a resource directory, out of the app context, but under version control, and left the space where the body is rendered blank (better if you put comments on start and end of render body space). When I want to style some page, I copy-and-paste the page to the dumb border RenderBody space, and add the css link that I want to edit. Then I can see the entire page, with the border and edit in a WYSIWYG editor. So, after the designer finishes, I copy-and-paste back to the page template. If you trust your designers, you can do this with the truth border, without a dumb copy, but keep then out of jwcid's! I already made the error of keeping a static copy of border in each page, but as your app grows, this become impossible to maintain! Mael On 8/21/06, Malin Ljungh [EMAIL PROTECTED] wrote: Hmm, OK, I guess there is no good solution to this. I have menu and locale selection in my border and some other stuff and I don't want to put this in all pages. But keeping the static version in all pages seems almost as tedious. Or maybe I'll just add the css in all pages and then the design guy will have to imagine all the menu stuff around each page body. But I'm not happy with this. Malin On 8/21/06, hv @ Fashion Content [EMAIL PROTECTED] wrote: This is why I don't use the Border component pattern, but add the basic structure to all pages. With a decent css design and some NavigationPane/Header/Footer components you can keep the additional tags quite low, and allow the designer maximum freedom. Something like: html jwcid=shell head jwcid=$remove$ ... /head body jwcid=body div id=navbar jwcid=navbarulliLink/li/ul/div div id=content .. /div div id=footer jwcid=footercopyright etc./div Henrik Malin Ljungh [EMAIL PROTECTED] skrev i en meddelelse news:[EMAIL PROTECTED] I thought one of the main advantages of Tapestry was that you can open your html files directly from the filesystem and see how they actually will look when rendered by the Tapestry servlet. But now when my design guy is about to do the css this is not the case, and I guess it is because I have not entered static bodies to the components that renders its own body in a proper way. And the biggest problem is maybe the border component. Am I supposed to insert a static version of my border component in each and every page to get this to work properly? What if I change the border component - I will have to change all my files... I realise this is not a critical runtime issue, but I thought maybe I have missed something here. How do you guys handle this? Malin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: popup LinkSubmit
I'm thinking about use the DirectLink, passing the entity id as the parameter on each link, and them retrieve the entity from database on the listener, like I said... will be easier.. Thanks Jesse! On 8/16/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: You'll probably have to change the forms target back to what it was previously - after opening the popup..(I think it's called _self ? ) There's probably a more elegant way to do it in javascript but I'm just reciting what I saw recently on another tap3 based project that did exactly what you describe wanting. (using the target stuff, it didn't look pretty to me but they weren't paying me to fix that ;) ) On 8/16/06, Mael Caldas [EMAIL PROTECTED] wrote: The problem is that there are another links that submits the same form, but I don't want to pop up in these another links. Just in one. The case is, I have some Entities, listed by name, with links to edit, remove e show details (Using AjaxDirectLink, like the flags on Tacos), and a link called print, of course, to print, but, when the user click on print button, I need to present the information in another page, without decorations, to make the details printable, and perform a kind of print Preview, removing the Browsers features, (location bar, status, menu and so on). With the DirectLink, is perfect, popup the window without the features, but I can't select the entity, and pass to the page to present the information... I thought about one solution, by using the entity id on the link parameter, and use the parameter to retrieve the entity from database on the listener, and setup the page. But is not a good thing, once I already have all the entities on the memory... Thanks for the suggestion Mael On 8/16/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: You can change the target of the form temporarilySomething like: form onSubmit=this.target=_blank Something like that, you'll have to google the details...Just make sure you call IRequestCycle.activate() on the other page to be sure it gets rendered out to the popup. On 8/16/06, Mael Caldas [EMAIL PROTECTED] wrote: Hi! I need to submit a form clicking on a link on the selected entity, pass the selected entity to a page, and present this page in a popup. So I want to use a kind of popup LinkSubmit, but I only know how to do a popup link with DirectLink, using the PopupLinkRenderer... Any idea? Thanks! Mael -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Label on Property Selection List
Hi I'm using tapestry 4, and have a selection list that submits the form on change, without a button, but, when I have only one item on the list, I can't submit the form, because, of course, there is nothing to change! Does anybody knows a simple way to have a label inside the property selection list, like chose your item, in the first position of the selection list , so, if I have only one item on the list, when I change from chose your item to the Item 1, the javascript submits the form... Thanks!
Re: Label on Property Selection List
Thanks a lot Ryan! That was exactly what I wanted! :) []'s Mael On 8/16/06, Ryan Holmes [EMAIL PROTECTED] wrote: As a matter of fact, yes, there is a simple way! Excuse my enthusiasm, but it's not often that I get to say that on the Tapestry mailing list ;) You want a LabeledPropertySelectionModel, which is a simple decorator around your existing IPropertySelectionModel: http://tapestry.apache.org/tapestry4/tapestry/apidocs/org/apache/ tapestry/form/LabeledPropertySelectionModel.html Inside the method that creates your IPropertySelectionModel just add something like: (assume your existing model is in a variable named myModel) IPropertySelectionModel labeledModel = new LabeledPropertySelectionModel(myModel, Choose your item); return labeledModel; -Ryan On Aug 16, 2006, at 11:59 AM, Mael Caldas wrote: Hi I'm using tapestry 4, and have a selection list that submits the form on change, without a button, but, when I have only one item on the list, I can't submit the form, because, of course, there is nothing to change! Does anybody knows a simple way to have a label inside the property selection list, like chose your item, in the first position of the selection list , so, if I have only one item on the list, when I change from chose your item to the Item 1, the javascript submits the form... Thanks! Ryan Holmes, CISSP [EMAIL PROTECTED] ph. (213) 626-0026 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Properties file export
Hi Peter, I think this kind of solution, the user restarting the app, is, at least, a little weird, but if you really want to do this, I thought this: Using tomcat as a container example: - Make the server manager app to be accessed by the users. - Give the permission to the user access the manager application. (For example, if you use LDAP as your user database, configure the realm on server.xml to use your LDAP database, and put the user on manager group. Or another group that can use the manager application) - Make a link on your application pointing to the restart URL of your container manager application. Like http://www.yourhost.com/manager/html/reload?path=/yourapp The problem is that the user will be redirected to the container manager restart confirmation page... you can find a way to bring him back to your application, sending a request to the restart URL, and then redirecting to your app, using javascript, or something like that, but this I don't know how to do.. I can't think another solution because the container is the one who manage the applications, deploying, restarting and so on... []'s Mael On 8/16/06, Peter Dawn [EMAIL PROTECTED] wrote: ok. all i want to do is, i want to provide the user to be able to modify the text displayed on my web page. so in order to do that they would need to modify the info within the properties file and re-start the web app. now the question is how do we do this. any ideas. and i want to do everything from within the web app and nothing external to it (to the least possible extent) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: popup LinkSubmit
The problem is that there are another links that submits the same form, but I don't want to pop up in these another links. Just in one. The case is, I have some Entities, listed by name, with links to edit, remove e show details (Using AjaxDirectLink, like the flags on Tacos), and a link called print, of course, to print, but, when the user click on print button, I need to present the information in another page, without decorations, to make the details printable, and perform a kind of print Preview, removing the Browsers features, (location bar, status, menu and so on). With the DirectLink, is perfect, popup the window without the features, but I can't select the entity, and pass to the page to present the information... I thought about one solution, by using the entity id on the link parameter, and use the parameter to retrieve the entity from database on the listener, and setup the page. But is not a good thing, once I already have all the entities on the memory... Thanks for the suggestion Mael On 8/16/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: You can change the target of the form temporarilySomething like: form onSubmit=this.target=_blank Something like that, you'll have to google the details...Just make sure you call IRequestCycle.activate() on the other page to be sure it gets rendered out to the popup. On 8/16/06, Mael Caldas [EMAIL PROTECTED] wrote: Hi! I need to submit a form clicking on a link on the selected entity, pass the selected entity to a page, and present this page in a popup. So I want to use a kind of popup LinkSubmit, but I only know how to do a popup link with DirectLink, using the PopupLinkRenderer... Any idea? Thanks! Mael -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.