Unable to assign the parameter from the MenuItem in ConextMenu to an outputtext inside an
outputPanel
-----------------------------------------------------------------------------------------------------
Key: RF-1832
URL:
http://jira.jboss.com/jira/browse/RF-1832
Project: RichFaces
Issue Type: Bug
Components: planning
Affects Versions: 3.1.3
Environment: Weblogic 9.2 , jboss-seam-2.0.0.GA, RichFaces 3.1.3.GA
Reporter: Amit Gupta
Context: There is a datatable being populated from databse on a page. When the user clicks
on a row in the dataTable, a contextmenu is displayed on the page. The ContextMenu has a
MenuItem. The menu item is displayed based on the value of the row selected.
Objective: When the user clicks the MenuItem the selected value should be passed on to an
outputText on the page.
Error: The value from the MenuItem in contextMenu is not being passed. The page throws an
exception without giving much detail about it. Looks like Line:59 in the code
<a4j:actionparam name="det" assignTo="#{ddmenu.current}"
value="{id}"/> is unable to assign the id to ddmenu.current
Exception Trace
Exception during request processing:
Caused by javax.servlet.ServletException with message: ""
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:321)
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3212)
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983)
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344)
weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Code piece:
<f:subview
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
xmlns:rich="http://richfaces.org/rich" id="subview">
<style>
.cur{
cursor:pointer;
}
</style>
<h:form id="calendarEventForm">
<table bgcolor ="#DDDDDD" border="1">
<tr>
<td>
<rich:spacer height="25" />
<rich:spacer width="50" />
<b>SEARCH:</b>
<rich:spacer width="10" />
<h:inputText styleClass="rsInput"
value="#{calendarEvent.title}" />
<rich:spacer width="20" />
<b>From</b>
<rich:spacer width="10" />
<a4j:outputPanel id="calendar">
<rich:calendar value="#{calendarEvent.fromDate}"
popup="true"/>
</a4j:outputPanel>
<rich:spacer width="20" />
<b>to</b>
<rich:spacer width="10" />
<a4j:outputPanel id="calendar1">
<rich:calendar value="#{calendarEvent.toDate}"
popup="true"/>
</a4j:outputPanel>
<rich:spacer width="40" />
<h:selectBooleanCheckbox
value="#{calendarEvent.published}"/>
<rich:spacer width="10" />
<b>Published</b>
<rich:spacer width="40" />
<h:selectBooleanCheckbox value="#{calendarEvent.draft}"/>
<rich:spacer width="10" />
<b>Draft</b>
<rich:spacer width="80" />
<a4j:commandButton styleClass="rsButton"
action="#{calendarEvent.findCalendarEvents}" value=" Go ">
<a4j:support event="onclick"
reRender="componentList" />
</a4j:commandButton>
<rich:spacer width="130" />
</td>
</tr>
</table>
</h:form>
<h:form id="calendarPopulateForm">
<rich:contextMenu id="menu12" submitMode="ajax">
<rich:menuItem ajaxSingle="true">
Click to Add Event
<a4j:actionparam name="det"
assignTo="#{ddmenu.current}" value="{id}"/>
</rich:menuItem>
</rich:contextMenu>
<h:panelGrid columns="2">
<rich:dataTable value="#{calendarEvent.componentList}"
var="component" id="componentList"
onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
rowClasses="cur">
<rich:column>
<f:facet name="header">
Component Id
</f:facet>
<h:outputText value="#{component.id}"/>
</rich:column>
<rich:column>
<f:facet name="header">
DisplayLabel
</f:facet>
<h:outputText value="#{component.displayLabel}"/>
</rich:column>
<rich:componentControl event="onRowClick" for="menu12"
operation="show">
<f:param value="#{component.id}" name="id"/>
<f:param value="#{component.displayLabel}"
name="displayLabel"/>
</rich:componentControl>
</rich:dataTable>
<a4j:outputPanel ajaxRendered="true">
<rich:panel>
<f:facet name="header">Last Menu Action</f:facet>
<h:outputText
value="#{ddmenu.current}"></h:outputText>
</rich:panel>
</a4j:outputPanel>
</h:panelGrid>
</h:form>
</f:subview>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira