Discussions

Web tier: servlets, JSP, Web frameworks: How to refresh JSP using Struts

  1. How to refresh JSP using Struts (1 messages)

    I'm struggling with a strategy to refresh a JSP using Struts when a simple onchange event fires on the client side.

    The scenario is this: I have a maintenance screen that is called from a results list. The maintenance screen is populated just fine from a 'prepare transaction' action class. One of the form fields that can be changed is a inventory part number. What I'm trying to figure out is what's the best way to display the part number's description when the user changes the part number?

    Right now I'm calling <html:rewrite forward="refreshAltSkuInfo"/>?action=update&pkarr=' + param1; My problem seems to be that I'm not getting the changed part number from the form field correctly. It is always null. My form is a DynaForm if that matters.

    Thanks for the help.

    Chris Juettner
    EagleJet Systems, Inc.
  2. How to refresh JSP using Struts[ Go to top ]

    I think it's the use of <html:rewrite> that's the issue here, because you're not submitting the page the current value of the part number is never making it into the ActionForm.
    Why not call form.submit() from your JavaScript?