Announcement Announcement Module
Collapse
No announcement yet.
Spring Portlet MVC Question Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Portlet MVC Question

    Hi,
    How can I tell if I am in an action or a render using the request object from a JSP?

    Thanks.

  • #2
    Given that the action phase of an overall portlet request doesn't do any rendering, I doubt you would ever be processing a JSP in an action phase.

    Comment


    • #3
      Originally posted by johnalewis View Post
      Given that the action phase of an overall portlet request doesn't do any rendering, I doubt you would ever be processing a JSP in an action phase.
      Thanks for responding johnalewis.
      I will try to explain my issue better.

      I have a JSP which uses a bean to render a chart.

      Inside the bean I want to know if execution of the JSP
      is after an action + render, rather than just a render.

      So I only build the chart when needed ,after an action.

      Does that make more/any sense?

      Thanks.

      Comment


      • #4
        Yes, that makes more sense.

        AFAIK, there is nothing in the JSR 168 spec that tells you that you are performing the first render request following an action request. You could either stick something in the session to tell you this, or set some kind of 'dirty' flag on your bean during an action request.

        In JSR 286 there will be a new validation-based caching mechanism that uses an ETAG property as a validation token -- you could likely use that to accomplish your goal. Once 286 is widely available...

        Comment


        • #5
          thanks johnalewis

          I will put a put a dirty flag in the bean.
          Cheers.

          Comment

          Working...
          X