Re: [T5] Handle post from external application
Thiago H. de Paula Figueiredo wrote: > > They're not mutually exclusive. They are just different ways to receive > parameters. Which one to use is all about the URLs. > > Suppose the page that will receive the request is named "process": > > www.example.com/process/parameter1/parameter2/parameter3: use onActivate > www.example.com/process?parameter1=1¶meter2=2: use > Request.getParameter > www.example.com/process/parameter1/parameter2?parameter3=3: use both! > onActivate to get parameters 1 and 2 and Request.getParameter to get > parameter 3. > > Thiago, I know this thread is old, but I had a related question. If I submit a form to a response page, what method can be used in the response page to redirect to a URL like your "use both!" example? i.e. How can I append "?parameter3=3¶meter4=4..." to the end of the context when redirecting after POST? The idea is to keep the Tapestry onPassivate URL context for real objects, but allow optional, unordered parameters to be defined in a GET-style parameter list. Is this possible in Tapestry? Thanks! -- View this message in context: http://www.nabble.com/-T5--Handle-post-from-external-application-tp21008825p25531337.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: Upgrade of t5-restful-webservices
I've been looking for something like this. Thanks for contributing your work! I concur about the autowiring comment. Would be nice if that was automatic. texomaleo wrote: > > Version 0.2.0 supports multiple RESTful web service methods per IoC > service > class by way of the @RestfulWebMethod annotation. The request-path > arguments in the URL are also now translated using ValueEncoders. > > See http://code.google.com/p/t5-restful-webservices. The GettingStarted > page should be all you need to get going. > > This is alpha software. Let me know your thoughts. > > Cheers, > Bill in Austin > > -- View this message in context: http://www.nabble.com/T5%3A-Upgrade-of-t5-restful-webservices-tp21168914p21234179.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Handle post from external application
I was talking about posting from another web application to a Tapestry page, but it really shouldn't matter where the post is coming from (i.e. Java application, Perl script, etc). My goal is to have a page that operates normally for Tapestry requests or REST URL requests from onActivate contexts, but also have the same page be able to respond to posts from other applications. Thiago, can the approach you propose coexist with an onActivate context for Tapestry requests or are they mutually exclusive? In what page method does getting the request parameters happen (e.g. onActivate?) ? Thanks! Massimo Lusetti wrote: > > On Mon, Dec 15, 2008 at 2:41 PM, Thiago H. de Paula Figueiredo > wrote: > >> Em Mon, 15 Dec 2008 03:17:19 -0300, thermus escreveu: >> >>> What is the proper way to handle a form post to a Tapestry page from an >>> external application? I know how to encode the parameters in the URL >>> and >>> use the onActivate context, but in this case, the data being passed from >>> the external application will exceed the URL length limit so I need to >>> use >>> post. >> >> Inject the Request and use it to get the parameter values, just like you >> would do without Tapestry. Tapestry adds a hidden field with some values >> you >> better not try to deal with them. :) > > We are talking about the client side which is a java app (for example) > that has to post data to the T5 web app for taking advantage of great > processing features provider by T5 you have to deal with the hidden > formadata parameter. > Please correct me if I'm wrong. > > -- > Massimo > http://meridio.blogspot.com > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://www.nabble.com/-T5--Handle-post-from-external-application-tp21008825p21018348.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] Handle post from external application
What is the proper way to handle a form post to a Tapestry page from an external application? I know how to encode the parameters in the URL and use the onActivate context, but in this case, the data being passed from the external application will exceed the URL length limit so I need to use post. Can anyone advise how to do this? -- View this message in context: http://www.nabble.com/-T5--Handle-post-from-external-application-tp21008825p21008825.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: What's the easiest way to implement two dependent select lists ?
I agree there must be a better way to do it with a Tapestry component, but I'd probably do it as you described (it would only be a trivial amount of JS). Again, I'm curious what the Tap experts would do. The zone solution has been suggested for recent versions but doesn't appear useful in this case. You might want to reignite these threads: http://www.nabble.com/Updating-a-zone-within-a-form---td18769907.html http://www.nabble.com/Updating-a-zone-within-a-form---td18769907.html http://www.nabble.com/-T5--AJAX-and-partial-updates-of-formsZone-AjaxFormLoop-FormInjector-FormFragment-and-the-like--td19664541.html http://www.nabble.com/-T5--AJAX-and-partial-updates-of-formsZone-AjaxFormLoop-FormInjector-FormFragment-and-the-like--td19664541.html HugoPalma wrote: > > I'm already using the OnEvent component. Still, because the model of the > select list i want to update is calculated server-side i need to pass it > in json to the client, parse it again in javascript and then update the > select input. This does work but i feel that there should be a simpler > way of doing this, maybe using zones. > > thermus wrote: >> I'm a Tapestry novice, but you may want to have a look at >> http://code.google.com/p/tapestry5-components/ t5components . It allows >> you >> to add a mixin to components to respond to an OnChange event with AJAX >> (see: >> http://87.193.218.134:8080/t5c-demo/oneventpage this and >> http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/mixins/OnEvent.html >> this for details). You could then change the data model for the other >> select component with a tiny bit of JavaScript in the onCompleteCallback >> function. >> >> I'm curious how a Tapestry expert would handle it. >> >> >> HugoPalma wrote: >> >>> I have a very usual use where in a form i have two selects, and when the >>> user selects a value on one the values on the second should be filtered >>> accordingly. >>> As the Select component doesn't support ajax out-of.the-box i see myself >>> forced to implement a lot of plumbing and javascript stuff. >>> >>> Still, i feel that this kind of use case should be much easier to >>> implement. >>> Maybe i'm missing something. >>> I'd like to hear some ideas about how u would handle this. >>> >>> Thanks. >>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-implement-two-dependent-select-lists---tp20859735p20888201.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: What's the easiest way to implement two dependent select lists ?
I'm a Tapestry novice, but you may want to have a look at http://code.google.com/p/tapestry5-components/ t5components . It allows you to add a mixin to components to respond to an OnChange event with AJAX (see: http://87.193.218.134:8080/t5c-demo/oneventpage this and http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/mixins/OnEvent.html this for details). You could then change the data model for the other select component with a tiny bit of JavaScript in the onCompleteCallback function. I'm curious how a Tapestry expert would handle it. HugoPalma wrote: > > I have a very usual use where in a form i have two selects, and when the > user selects a value on one the values on the second should be filtered > accordingly. > As the Select component doesn't support ajax out-of.the-box i see myself > forced to implement a lot of plumbing and javascript stuff. > > Still, i feel that this kind of use case should be much easier to > implement. > Maybe i'm missing something. > I'd like to hear some ideas about how u would handle this. > > Thanks. > > -- View this message in context: http://www.nabble.com/What%27s-the-easiest-way-to-implement-two-dependent-select-lists---tp20859735p20877559.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]
Include HTML in Grid Cell
Is there a way to get HTML content to appear in a Grid cell? Thinking I could easily include multi-line text in a cell, I tried setting a bean property to text with tags. However, when it renders the tags are replaced by '& lt;' and '& gt;'. The problem, I think, is that AbstractPropertyOutput.renderPropertyValue uses 'write' which converts XML control characters to their "safe" XML entity equivalents according to http://tapestry.formos.com/nightly/tapestry5/guide/dom.html. writeRaw seems like it would do it, but it's buried pretty deep. Is there another way of allowing HTML to appear in a cell? -- View this message in context: http://www.nabble.com/Include-HTML-in-Grid-Cell-tp20804000p20804000.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] Backslash in URL chokes onActivate (5.0.16)
Nevermind. "%255C" did the trick. thermus wrote: > > I encountered a problem where onActivate(String str) chokes if "%5C" (i.e. > backslash) is included in the URL context. Aside from not allowing > backslashes at all, is there a proper way to escape backslashes so > Tapestry treats them as part of the incoming string parameter? > -- View this message in context: http://www.nabble.com/-T5--Backslash-in-URL-chokes-onActivate-%285.0.16%29-tp20759966p20760189.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] Backslash in URL chokes onActivate (5.0.16)
I encountered a problem where onActivate(String str) chokes if "%5C" (i.e. backslash) is included in the URL context. Aside from not allowing backslashes at all, is there a proper way to escape backslashes so Tapestry treats them as part of the incoming string parameter? -- View this message in context: http://www.nabble.com/-T5--Backslash-in-URL-chokes-onActivate-%285.0.16%29-tp20759966p20759966.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: Persistance
I'm interested in this as well. Specifically if a user has two page instances open, how can T5 persistence be used reliably? I found on Safari and Firefox (not sure about IE, but likely a problem there as well) that the persisted session properties are shared between page instances and each page can overwrite the another. My searches didn't come up with a definitive answer although I did see that the question has been asked several times. Can anyone comment on this or provide a workaround? Peter Stavrinides wrote: > > ... but what would be ideal in my humble view is a proper page persistence > Strategy, where a value is retained until the user leaves the page. In > truth someone posted such a solution which used a cookie, and it seemed to > behave exactly as it should, nevertheless I am still against relying on a > cookie. I understand this may be difficult to implement due to Tapestry's > inner workings, particularly the way pages are pooled, but since > conversational state covers some of this ground (the difference being a > conversation is tied to not only the page, but the window so each tab is > treated as a new conversation)... > -- View this message in context: http://www.nabble.com/Persistance-tp20732003p20743522.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] Combine a form and response in same template/Java class
Thanks for your response. These conventions are good to know. I thought I was being silly by keeping them separate. Howard Lewis Ship wrote: > > Then you really have two pages, not one. Bundle up your query data > into a single object that can be passed from Query page to Result > page. > > On Sun, Nov 2, 2008 at 4:01 PM, thermus <[EMAIL PROTECTED]> wrote: >> >> #2. >> >> >> >> Sven Homburg wrote: >>> >>> thermus, >>> >>> please clarify what you want to do: >>> >>> >>>1. display a query dialog to the user, user choose some value and >>> submit >>>the form, >>>after submit, display grid and query form ? >>>2. display a query dialog to the user, user choose some value and >>> submit >>>the form, >>>after submit, display only grid and NOT query form ? >>> >>> >>> 2008/11/2 thermus <[EMAIL PROTECTED]> >>> >>>> >>>> Thanks, but what do I condition on? How can I differentiate if the >>>> user >>>> is >>>> requesting the original form "page" or is flipping through the pages of >>>> a >>>> grid component? >>>> >>>> >>>> >>>> SergeEby wrote: >>>> > >>>> > Hi, >>>> > >>>> > You can use a block. Search for examples in the mailing list. >>>> > >>>> > /Serge >>>> > >>>> > >>>> > thermus wrote: >>>> >> >>>> >> I currently have a very simple webapp. I have a form and return a >>>> >> pageable grid component based on the form parameters. Right now, I >>>> have >>>> >> the form and response as separate tml/Java classes. Everything >>>> works >>>> >> fine, but it's getting to be a pain to keep all of these pieces in >>>> order >>>> >> (2 templates and 2 Java classes per query x 10 queries). >>>> >> >>>> >> I'd like to combine the form with response so I only have to >>>> maintain >>>> one >>>> >> tml and one Java class per query. What is the logic I need in my >>>> >> class/template to do this? >>>> >> >>>> >> So far, my attempts have been unsuccessful. I tried to add a >>>> Persist >>>> >> boolean and set it to true in the onSuccess method and included an >>>> >> if-else in the template to render the appropriate piece. If I just >>>> used >>>> >> @Persist, I couldn't get back to the form to ever load again once it >>>> was >>>> >> submitted the first time. If I used @Persist("flash"), I could >>>> reload >>>> >> the form on demand, but now the grid pager links would take me back >>>> to >>>> >> the form (since the boolean would reset to false). >>>> >> >>>> >> Does anyone else combine their forms and response pages? Is this a >>>> bad >>>> >> practice? It just seems silly to have to keep track of 4 entities >>>> for >>>> a >>>> >> simple form/response. Boy do I miss Perl. >>>> >> >>>> > >>>> > >>>> >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/-T5--Combine-a-form-and-response-in-same-template-Java-class-tp20287170p20293925.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] >>>> >>>> >>> >>> >>> -- >>> with regards >>> Sven Homburg >>> http://www.chenillekit.org >>> http://tapestry5-components.googlecode.com >>> >>> >>> - >>> best regards >>> Sven >>> >> >> -- >> View this message in context: >> http://www.nabble.com/-T5--Combine-a-form-and-response-in-same-template-Java-class-tp20287170p20294861.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] >> >> > > > > -- > Howard M. Lewis Ship > > Creator Apache Tapestry and Apache HiveMind > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-T5--Combine-a-form-and-response-in-same-template-Java-class-tp20287170p20296541.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] Combine a form and response in same template/Java class
#2. Sven Homburg wrote: > > thermus, > > please clarify what you want to do: > > >1. display a query dialog to the user, user choose some value and > submit >the form, >after submit, display grid and query form ? >2. display a query dialog to the user, user choose some value and > submit >the form, >after submit, display only grid and NOT query form ? > > > 2008/11/2 thermus <[EMAIL PROTECTED]> > >> >> Thanks, but what do I condition on? How can I differentiate if the user >> is >> requesting the original form "page" or is flipping through the pages of a >> grid component? >> >> >> >> SergeEby wrote: >> > >> > Hi, >> > >> > You can use a block. Search for examples in the mailing list. >> > >> > /Serge >> > >> > >> > thermus wrote: >> >> >> >> I currently have a very simple webapp. I have a form and return a >> >> pageable grid component based on the form parameters. Right now, I >> have >> >> the form and response as separate tml/Java classes. Everything works >> >> fine, but it's getting to be a pain to keep all of these pieces in >> order >> >> (2 templates and 2 Java classes per query x 10 queries). >> >> >> >> I'd like to combine the form with response so I only have to maintain >> one >> >> tml and one Java class per query. What is the logic I need in my >> >> class/template to do this? >> >> >> >> So far, my attempts have been unsuccessful. I tried to add a Persist >> >> boolean and set it to true in the onSuccess method and included an >> >> if-else in the template to render the appropriate piece. If I just >> used >> >> @Persist, I couldn't get back to the form to ever load again once it >> was >> >> submitted the first time. If I used @Persist("flash"), I could reload >> >> the form on demand, but now the grid pager links would take me back to >> >> the form (since the boolean would reset to false). >> >> >> >> Does anyone else combine their forms and response pages? Is this a >> bad >> >> practice? It just seems silly to have to keep track of 4 entities for >> a >> >> simple form/response. Boy do I miss Perl. >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/-T5--Combine-a-form-and-response-in-same-template-Java-class-tp20287170p20293925.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] >> >> > > > -- > with regards > Sven Homburg > http://www.chenillekit.org > http://tapestry5-components.googlecode.com > > > - > best regards > Sven > -- View this message in context: http://www.nabble.com/-T5--Combine-a-form-and-response-in-same-template-Java-class-tp20287170p20294861.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] "please wait" page or Progress indicator
I have to set up a process in response to form parameters that may cause a visitor's browser to time out. How can I set up a simple "please wait" page that will wait until the response page is ready? Searching these threads and Google only reveals AJAX methods specific for T4. Is there some example T5 code out there? -- View this message in context: http://www.nabble.com/-T5--%22please-wait%22-page-or-Progress-indicator-tp20293998p20293998.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] Combine a form and response in same template/Java class
Thanks, but what do I condition on? How can I differentiate if the user is requesting the original form "page" or is flipping through the pages of a grid component? SergeEby wrote: > > Hi, > > You can use a block. Search for examples in the mailing list. > > /Serge > > > thermus wrote: >> >> I currently have a very simple webapp. I have a form and return a >> pageable grid component based on the form parameters. Right now, I have >> the form and response as separate tml/Java classes. Everything works >> fine, but it's getting to be a pain to keep all of these pieces in order >> (2 templates and 2 Java classes per query x 10 queries). >> >> I'd like to combine the form with response so I only have to maintain one >> tml and one Java class per query. What is the logic I need in my >> class/template to do this? >> >> So far, my attempts have been unsuccessful. I tried to add a Persist >> boolean and set it to true in the onSuccess method and included an >> if-else in the template to render the appropriate piece. If I just used >> @Persist, I couldn't get back to the form to ever load again once it was >> submitted the first time. If I used @Persist("flash"), I could reload >> the form on demand, but now the grid pager links would take me back to >> the form (since the boolean would reset to false). >> >> Does anyone else combine their forms and response pages? Is this a bad >> practice? It just seems silly to have to keep track of 4 entities for a >> simple form/response. Boy do I miss Perl. >> > > -- View this message in context: http://www.nabble.com/-T5--Combine-a-form-and-response-in-same-template-Java-class-tp20287170p20293925.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] force a Zone update after page rendering?
Were you able to solve this problem. I'm facing a similar issue. Can you or anyone else share your solution if available? Andy Pahne-3 wrote: > > > I'd like to force a Zone update after page rendering without clicking > any links or submitting any forms. > > I have the Zone ID, but have no idea how to execute the update or how to > connect the update with a listener (like I would if I used an ActionLink). > > > Andy > > > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-T5--force-a-Zone-update-after-page-rendering--tp19780083p20287279.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]
Pivot table result in Grid component
Is there a component available that accepts something equivalent to a Swing TableModel and renders a pageable and sortable table like the grid component. I need something to display a pivot table result so I don't know the number of columns ahead of time. Can anyone suggest a way to implement this using the grid component data model or some alternative? -- View this message in context: http://www.nabble.com/Pivot-table-result-in-Grid-component-tp20287217p20287217.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]
Combine a form and response in same template/Java class
I currently have a very simple webapp. I have a form and return a pageable grid component based on the form parameters. Right now, I have the form and response as separate tml/Java classes. Everything works fine, but it's getting to be a pain to keep all of these pieces in order (2 templates and 2 Java classes per query x 10 queries). I'd like to combine the form with response so I only have to maintain one tml and one Java class per query. What is the logic I need in my class/template to do this? So far, my attempts have been unsuccessful. I tried to add a Persist boolean and set it to true in the onSuccess method and included an if-else in the template to render the appropriate piece. If I just used @Persist, I couldn't get back to the form to ever load again once it was submitted the first time. If I used @Persist("flash"), I could reload the form on demand, but now the grid pager links would take me back to the form (since the boolean would reset to false). Does anyone else combine their forms and response pages? Is this a bad practice? It just seems silly to have to keep track of 4 entities for a simple form/response. Boy do I miss Perl. -- View this message in context: http://www.nabble.com/Combine-a-form-and-response-in-same-template-Java-class-tp20287170p20287170.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]