DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10705>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10705

Title being created on a link tag when title is not an attribute, but...

           Summary: Title being created on a link tag when title is not an
                    attribute, but...
           Product: Struts
           Version: 1.0 Beta 2
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Custom Tags
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


the messages-resources parameter "null" is set to "false"

In a link tag, when there is no TITLE attribute set custom tag still adds a 
title when the message-resources in the struts-config has the null parameter 
set to "false"  
Ex:
  <message-resources
    parameter="org.apache.struts.webapp.example.ApplicationResources" 
    null="false"/>

The problem appears to be in the BaseHandlerTag.prepareStyles():

Code snipplet

        value = message(title, titleKey); 
       // When set to False will return ???foo ????
        if (value != null) {   //This will now eval to TRUE.
            styles.append(" title=\"");
            styles.append(value);
            styles.append("\"");
        }

Proposed solution:
In BaseHandlerTag, add a check.
if ( literal == null && key == null )
   return null;

--> If both are null then must want null.  

May want to handle outside of call, perform check before call to message in 
prepareStyles().

if ( title != null || titleKey != null ) {
   value = message( title, titleKey );
   if ( value != null ) {
       // do appending here
   }
}

The first solution will fix problem for both title and alt.  Second solution 
will require adding the logic in front of the alt section as well.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to