facebook

Struts 2 Validator shows errors for redirectAction results

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #312709 Reply

    ibrandt
    Participant

    This message has not been recovered.

    #312790 Reply

    support-swapna
    Moderator

    This message has not been recovered.

    #316486 Reply

    Todd Kofford
    Member

    I am having the same issue.

    What is the current status of the fix for this issue?

    The renaming of that result type happened well over one year ago. I expect better support from a product that I pay for.

    #316525 Reply

    support-swapna
    Moderator

    tkofford,

    In the latest ME (9.0 GA) release, the custom validation mechanism has been updated. You can now reference the root namespace from the result namespace param. This won’t be marked by the validator as an error. Secondly, you can expect to see a fix for the default namespace definition in the coming release. The support for result of type “redirectAction” is already available.

    Let me know if you have further queries.

    #317426 Reply

    Glenn Puckett
    Participant

    Hi, I have a related issue. However, in reading the posts above I’m not sure this was addressed. It sounds like the entire action redirect process was suspect so this may have been fixed by default. However, here it is.

    I am currently using ME 8.6.1

    In my struts.xml I have the following entry:

    
    <action name="*ProjectLabor" method="{1}" class="mm.cwdc.actions.ProjectLaborAction">
      <result name="list" type="tiles" >/owner/projects/details/list.tiles</result>
      <result name="csvdwnld" type="stream">
        <param name="contentType">text/csv</param>
        <param name="inputName">csvStream</param>
        <param name="contentDisposition">attachment;filename="myCLMA.csv"</param>
        <param name="bufferSize">1024</param>
      </result>
      <result name="csvupld" type="tiles">/owner/projects/details/csvupload.tiles</result>
    </action>
    

    In the ProjectLaborAction class I know I have a method: “public String list()”

    I decided that I need for a second module to forward control to ProjectLaborAction.list() when it finished a function so I added the following entry:

    
    <action name="*ProjectLaborUpdate" method="{1}" class="mm.cwdc.actions.ProjectLaborUpdateAction">
      <result name="list" type="redirectAction">
        <param name="actionName">listProjectLabor.action</param>
        <param name="namespace">/owner</param>
      </result>
      <result name="edit" type="tiles" >/owner/projects/details/edit.tiles</result>
      <result name="input" type="tiles" >/owner/projects/details/edit.tiles</result>
    </action>
    

    Now I am getting the list result flagged as an error. The error message is “Action listProjectLabor.action cannot be found in the namespace”.

    When I deploy the WAR file to JBoss the process works fine. So I know I can ignore it. But I can’t stand to see errors that aren’t really errors. I put up with a ton of “pseudo-errors” in my JSP modules. I’d really rather not have to ignore other errors too. It’s getting to the point where I don’t know what’s an error and what it not.

    It would be nice AT THE VERY LEAST to be able to suppress these error messages so we don’t have to constantly revisit modules because we’re not sure if there’s an error or just a re-occuring innadequacy of the editor to recognize valid code.

    #317444 Reply

    support-swapna
    Moderator

    WGPuckett,

    <param name=”actionName”>listProjectLabor.action</param>

    For actionName, there is no need to specify listProjectLabor.action. Just replace listProjectLabor.action with listProjectLabor.

    <param name=”actionName”>listProjectLabor</param>

    Let me know how this works for you.

    #317464 Reply

    Glenn Puckett
    Participant

    @support-swapna wrote:

    WGPuckett,

    <param name=”actionName”>listProjectLabor.action</param>

    For actionName, there is no need to specify listProjectLabor.action. Just replace listProjectLabor.action with listProjectLabor.

    <param name=”actionName”>listProjectLabor</param>

    Let me know how this works for you.

    Unfortunately that did not fix the error message.

    #317488 Reply

    support-swapna
    Moderator

    WGPuckett,

    Sorry for missing it the first time. I could replicate the issue at my end.
    I will file a PR for the dev team to work on it.
    Sorry for the inconvenience caused.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Struts 2 Validator shows errors for redirectAction results

You must be logged in to post in the forum log in