Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-201

ButtonTag.java doesn't accept body content

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 Beta 2
    • Fix Version/s: 1.0.0
    • Component/s: Tag Libraries
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: PC
    • Bugzilla Id:
      1890

      Description

      The following shows a button with the text "Click". All the other
      internationalized strings are working fine. This worked perfectly in 1.0 Beta 1
      but not in Beta 2.

      <html:button property="retrieve">
      <bean:message key="button.retrieve"/>
      </html:button>

      -------- from Hal Deadman -------------
      It looks like this was broken in a recent update. The ButtonTag.java needs a
      doAfterBody() method in order to set the text instance variable to the body
      content. That will make it work like the SubmitTag.java.

      /**

      • Save the associated label from the body content.
        *
      • @exception JspException if a JSP exception has occurred
        */
        public int doAfterBody() throws JspException {

      if (bodyContent != null)

      { String value = bodyContent.getString().trim(); if (value.length() > 0) text = value; }

      return (SKIP_BODY);

      }

      Hal

        Attachments

          Activity

            People

            • Assignee:
              craigmcc Craig R. McClanahan
              Reporter:
              thanee@nortelnetworks.com Thane Eisener
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: