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

http://issues.apache.org/bugzilla/show_bug.cgi?id=38461

           Summary: struts-el html tag library errorKey not using documented
                    default value on Oracle Application Server
           Product: Struts
           Version: 1.2.7
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: EL
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


I encountered an odd problem with the struts-el html tag library.

I was using code like the following in my jsp to render any entry boxes that
weren't valid in a a different style.
<html:text errorStyleClass="error" property="lastname"  />

This was working fine when I was using the struts html tag library but when I
started using the html-el tag library the errorStyleClass was no longer being
used when running the application on Oracle Application Server. However it still
worked fine under tomcat 5.5

After debugging this problem I found out that it was being set to null by the
release() method in ELTextTag where there are the lines
       setDisabledExpr(null);
       setErrorKey(null);
       setErrorStyleExpr(null);

I think the middle line should be setErrorKeyExpr(null) as ErrorKey is already
set to Global.ERROR_KEY by the call to super.release() and ErrorKeyExpr is not
reset anywhere in the release method. When running on tomcat the release method
never seemed to get called leaving the error key set to the expected value.

I've worked around this for the moment by explicitly specifying the value for
ErrorKey as below
<html:text errorKey="org.apache.struts.action.ERROR" errorStyleClass="error"
property="lastname"  />

Note: The following classes all exhibit the same problem.
ELCheckboxTag.java
ELFileTag.java
ELMultiboxTag.java
ELPasswordTag.java
ELRadioTag.java
ELSelectTag.java
ELTextareaTag.java
ELTextTag.java

I've checked in the 1.2.8 release and the source code repository and the same
issue appears to be present in those as well.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

Reply via email to