Results 1 to 1 of 1
- 08-01-2011, 08:33 PM #1
Member
- Join Date
- Aug 2011
- Posts
- 1
- Rep Power
- 0
How to send value recently selected in the url as a param?
Hello! I'm working on a struts2 (2.2.3) web app, using jquery plugin (3.0.0) for ajax.
I have a jsp in which I have 2 sj:autocompleter (the first one for providers and the second one for products). I need to filter the products by the provider selected. In this particular application is a must to have an autocompleter for the second collection.
What I want is to send in the url the value selected in the first autocompleter as a parameter so that I'm able to use that selection for filtering the second autocompleter.
Part of my jsp code:
The problem I'm having is that "%{purchase.provider.id}" is something selected exactly before sending the url_products and when I send the value through the url the value is not updated from the latest selection done.XML Code:<s:url id="url_products" action="myAction" method="showProducts"> <s:param name="providerSelected" value="%{purchase.provider.id}"></s:param> </s:url> <sj:autocompleter id="purchaseProviderId" name="purchaseProvider" value="%{purchaseProvider}" onCompleteTopics="providerChanged" cssClass="product" href="%{url_providers}" /> <sj:autocompleter id="productId" name="productDescription" value="%{productDescription}" listenTopics="providerChanged" href="%{url_products}" />
What I think is that this value is part of the session and since the new selection done for the provider has not been submitted yet to the action, "%{purchase.provider.id}" is just pointing to the value the session is aware of.
Question: How can I send the value recently selected in "purchaseProviderId" autocompleter through the url as a param?
Thanks in advance!
Similar Threads
-
drawing only the most recently added component?
By billycro in forum New To JavaReplies: 10Last Post: 07-03-2011, 08:55 PM -
Array as object or param?
By überfuzz in forum New To JavaReplies: 3Last Post: 02-08-2011, 11:06 PM -
How to use <s:param> tag
By aruna.hcu in forum Web FrameworksReplies: 7Last Post: 01-13-2010, 08:25 AM -
Javadoc - cannot compile @param tags
By jon80 in forum New To JavaReplies: 9Last Post: 05-14-2009, 08:57 AM -
jsp:param action
By Java Tip in forum Java TipReplies: 0Last Post: 12-24-2007, 10:03 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks