You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2004/11/29 11:22:32 UTC

DO NOT REPLY [Bug 32425] New: - jx-macros.xml in java\org\apache\cocoon\forms\generation missing locale variable

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=32425>.
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=32425

           Summary: jx-macros.xml in java\org\apache\cocoon\forms\generation
                    missing locale variable
           Product: Cocoon 2
           Version: 2.1.6
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: CocoonForms
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: roy_huang@nbmgroup.com


<jx:macro name="widget" 
targetNamespace="http://apache.org/cocoon/forms/1.0#template">
      <jx:parameter name="id"/>
      
      <jx:set var="widget" value="${cformsHelper.getWidget(widget, id)}"/>
      <jx:if test="${cformsHelper.isVisible(widget)}">
        <jx:set var="cformsDummy" value="${cformsHelper.generateWidget(widget, 
locale)}"/>  <--here missing locale define
        <jx:evalBody/>
        <jx:set var="cformsDummy" value="${cformsHelper.flushRoot(widget)}"/>
      </jx:if>
    </jx:macro>

like template.jx,should add :
  <jx:if test="${empty locale}">
    <jx:set var="locale" value="${java.util.Locale.getDefault()}"/>
  </jx:if>

Otherwise page will throw NPE when FormattingDateConverter exist in form define.

-- 
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.