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

           Summary: ValidatorCommandRenderer breaks MyFaces dummy form.
           Product: Struts
           Version: Nightly Build
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Shale
        AssignedTo: dev@struts.apache.org
        ReportedBy: [EMAIL PROTECTED]


I have a webapp using shale over myfaces, and the front page is a menu, using
jscookmenu. On an older nightly build all was fine, but when I took build
20060408 of shale core, the menu links stopped working. I traced this back to
the ValidatorCommandRenderer creating a new ResponseWriter:

ResponseWriter buffResponsewriter = context.getRenderKit()
                    .createResponseWriter(writer, null,
                            hijackedWriter.getCharacterEncoding());

This means that when HtmlJSCookMenuRenderer calls setWriteDummyForm(true) on the
writer, the value is not propagated to the main writer for the view and so the
dummy form is no longer output. The source for the page is:

<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>

<f:loadBundle var="messages" basename="messages"/>

<f:view>
  <html>
    <head>
      <title>
        <h:outputText value="#{messages['menu.title']}"/>
      </title>
    </head>
    <body>

      <t:jscookMenu layout="hbr" theme="ThemeOffice">
        <t:navigationMenuItem itemLabel="Project">
          <t:navigationMenuItem itemLabel="#{messages['menu.newProject']}"
action="newProject"/>
          <t:navigationMenuItem itemLabel="Select..." action="openProject"/>
          <t:navigationMenuItem itemLabel="Close" action="closeProject"/>
        </t:navigationMenuItem>
        <t:navigationMenuItem itemLabel="Data">
          <t:navigationMenuItem itemLabel="Assignment" action="dataAssignment"/>
        </t:navigationMenuItem>
        <t:navigationMenuItem itemLabel="Help">
          <t:navigationMenuItem itemLabel="Contents" action="helpContents"/>
          <t:navigationMenuItem itemLabel="Getting Started"
action="helpGettingStarted"/>
          <t:navigationMenuItem itemLabel="About" action="helpAbout"/>
        </t:navigationMenuItem>
      </t:jscookMenu>
    </body>
  </html>
</f:view>

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