Struts 2
  1. Struts 2
  2. WW-574

ActionButton and ActionLink UI tags

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Future
    • Component/s: Plugin - Tags
    • Labels:
      None

      Description

      We've written simple ActionButton and ActionLink tags for use in our application, I think they'd make a good addition to the distribution.

      e.g.

      <ww:actionbutton label="'mylabel'" action="'MyAction'"/>

      would generate

      <input type="button" value="mylabel" onClick="location.href='MyAction.action'"/>

      Similarly:

      <ww:actionlink action="'MyAction'">text here</ww:actionlink>

      would generate

      <a href="MyAction.action">text here</a>

        Activity

        Hide
        Ted Husted added a comment -

        I think the UI tags we have now handle these use cases well.

        Show
        Ted Husted added a comment - I think the UI tags we have now handle these use cases well.
        Hide
        Jose Luiz added a comment -

        <input type="button" value="mylabel" onClick="location.href='MyAction.action'"/>

        Thanks not the rigth way to do that, Internet Explorer has a bug (surprise!) thats location.href ignores your base href, so you the rigth way would be:

        <a href="MyAction.action" id="a_unique_id" style="display: none;"></a>
        <input type="button" value="mylabel" onClick="document.getElementById('a_unique_id').click();"/>

        Usually I use base href and I think its matter.

        Show
        Jose Luiz added a comment - <input type="button" value="mylabel" onClick="location.href='MyAction.action'"/> Thanks not the rigth way to do that, Internet Explorer has a bug (surprise!) thats location.href ignores your base href, so you the rigth way would be: <a href="MyAction.action" id="a_unique_id" style="display: none;"></a> <input type="button" value="mylabel" onClick="document.getElementById('a_unique_id').click();"/> Usually I use base href and I think its matter.
        Hide
        Kenny MacLeod added a comment -

        On reflection, these tags would need to be considerably improved before they could make it into the distribution.

        What they need is something like a cross between URLTag (for generating the URL) and AbstractUITag (for rendering the link or button). Unfortunately, the current hierarchy of these classes makes this impossible.

        Show
        Kenny MacLeod added a comment - On reflection, these tags would need to be considerably improved before they could make it into the distribution. What they need is something like a cross between URLTag (for generating the URL) and AbstractUITag (for rendering the link or button). Unfortunately, the current hierarchy of these classes makes this impossible.

          People

          • Assignee:
            Patrick Lightbody
            Reporter:
            Kenny MacLeod
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development