No, it's not confusing, the thing about http / html is that it is still a submission... Just not using <s:textfield, etc.
Anyhow, on to the answer, just construct a link like this - <s:url action="..." namespace="..."><s:param name="print" value="true" /></s:url> -Wes On Tue, Aug 4, 2009 at 2:18 PM, Bhaarat Sharma<bhaara...@gmail.com> wrote: > I know its not the best case scenario. If i can do this then I will not > have to change major piece of the code. > I'll try to explain the scenario: basically one jsp page is used to show > results. this jsp page has pagination so each time 50 results are shown. But > the page has a printer friendly version. when printer friendly link is > clicked this same jsp page is loaded again but this time around we want to > print everything not just 50 records. so in my action class there is a > method which returns sublist. but in this case i want it to return the whole > list. > > So in the jsp i know when printerfriendly is taking place because it is > being passed a parameter called ?print=true > > so i thought that in jsp i could check if print=true then set action class > Printer method to true. ....kind of confusing i bet it sounds.. > > On Tue, Aug 4, 2009 at 2:14 PM, Wes Wannemacher <w...@wantii.com> wrote: > >> On Tue, Aug 4, 2009 at 2:09 PM, Bhaarat Sharma<bhaara...@gmail.com> wrote: >> > Thanks. >> > I have another question, which might be a little off topic. >> > >> > if I have a method like this in my Action class >> > >> > public void setPrinter(String print) >> > { >> > this.printer = print; >> > } >> > >> > how can I call this setter with some value from my jsp page using >> struts2? >> > >> > I know this can be set if I submit a form with hidden value and stuff but >> I >> > dont want to submit a form. I just want to set the value from the jsp >> page. >> > .. >> > >> >> At which point will that value be used? If you need to know the value >> of the 'print' variable within the execute method of your action, then >> it should be part of the form submission... In fact, I am having >> trouble thinking of a scenario where you would want to call that sort >> of method from a JSP that doesn't involve form submission (except >> javascript, but still, just calling a setter alone doesn't really have >> any effect unless you are calling another action method afterwards >> that has an interest in that variable's value). >> >> -Wes >> >> -- >> Wes Wannemacher >> >> Head Engineer, WanTii, Inc. >> Need Training? Struts, Spring, Maven, Tomcat... >> Ask me for a quote! >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org