]
Nick Belaevski commented on RF-4290:
------------------------------------
Brendan,
Both points are right. The reason for modalPanel to have its own h:form inside is DOM
manipulation that is done in order for modal panel to cover all another elements (to be
modal). That is the issue that cannot be solved by just setting z-index because z-indexes
of nested elements aren't added or multiplied, so there is always a chance that some
element with higher z-index can be higher than another container holding modal panel. So
modal panel is appended as child to document.body on show and moved to its initial
location on hide. And of course, moving modal panel out from its initial location make it
impossible to use any external form
Suggestion Box bug: Revisit RF-923
----------------------------------
Key: RF-4290
URL:
https://jira.jboss.org/jira/browse/RF-4290
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.1
Environment: JBoss 4.2.2
Reporter: Brendan Farragher
Assignee: Tsikhon Kuprevich
I have discovered the following suggestion box bug in a different context that has been
reported as being fixed by JIRA RF-923:
https://jira.jboss.org/jira/browse/RF-923;jsessionid=691170C187DCB362DD9A...
The context is the following:
I have a JSP include that contains a JSF subview and a RF modal panel tag. Within the
modal panel tag, I have an HTML table. One of the table cells contains a textfield that
has a RF suggestion box tag associated. The drop-down list is displayed after typing, but
when a selection is made, the result variable (which is a Hibernate pojo) is not passed to
the setter method that I have specified as the target on the f:setPropertyActionListener
tag. Through logging messages, I see that the method is fired when a selection event
occurs. The problem is that the variable is null, just as the behavior states in the
RF-923 bug.
In the example below, the setSuggestionBoxNameLookupResult method is passed a null value
when the selection is made from the drop down list.
Here is the JSP that is brought in as a subview to the main JSF JSP page via a JSP
include tag:
<%@ taglib
uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib
uri="http://richfaces.org/a4j" prefix="a4j" %>
<f:subview id="nameModalWindowSubView">
<rich:modalPanel id="lookupModalPanel" width="500"
height="250">
<f:facet name="header">
<h:outputText value="#{msgs.header}"/>
</f:facet>
<table id="lookupGrid">
<tbody>
<tr>
<td scope="row" class="cellInfo">
<h:outputText value="#{msgs.findLabelText}"/>
</td>
<td scope="row" class="cellInfo">
<a4j:region id="findNameRegion">
<h:inputText id="findName" styleClass="LongInput"
maxlength="30" value="#{bean.findName}"/>
<%-- Suggestion box RichFaces tag for name. Performs name lookup and displays drop
down list. --%>
<%-- When a selection is made, several fields are re-rendered with the selected
values. --%>
<%-- NOTE: There is a bug in version 3.1.0 of RichFaces where the
--%>
<%-- setPropertyActionListener target method gets passed a null --%>
<%-- parameter, instead of the selected DB pojo. An upgrade to version
--%>
<%-- 3.2.1 was required to fix it. RichFaces 3.2 jars are present in the
--%>
<%-- WEB-INF/lib folder, to correct this problem --%>
<rich:suggestionbox
width="#{bean.suggestionBoxWidth}"
height="#{bean.suggestionBoxHeight}"
id="nameSuggestBox"
styleClass="nameSuggestBox"
for="findName"
ajaxSingle="true"
suggestionAction="#{bean.autoComplete}"
var="result"
fetchValue="#{result.field1}"
nothingLabel="#{msgs.suggestionBoxNoMatchText}">
<h:column>
<h:outputText value="#{result.field1}" />
</h:column>
<h:column>
<h:outputText value="#{result.field2}" />
</h:column>
<h:column>
<h:outputText value="#{result.field3}"
style="font-style:italic"/>
</h:column>
<h:column>
<h:outputText value="#{result.field3}" />
</h:column>
<a4j:support event="onselect"
timeout="#{bean.suggestionBoxSelectionEventAjaxTimeout}">
<f:setPropertyActionListener value="#{result}"
target="#{bean.suggestionBoxNameLookupResult}" />
</a4j:support>
</rich:suggestionbox>
</a4j:region>
</td>
<td>
<button type="button"
onClick="javascript:processNameLookup()">OK</button>
</td>
<td>
<button type="button"
onClick="javascript:closeNameLookupWindow()">Close</button>
</td>
</tr>
</tbody>
</table>
</rich:modalPanel>
<button type="button"
onClick="javascript:showNameLookupWindow()">Name Lookup</button>
</f:subview>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: