[
https://jira.jboss.org/jira/browse/RF-4395?page=com.atlassian.jira.plugin...
]
Chris Simons commented on RF-4395:
----------------------------------
Full code for rich:dataTable and rich:dropDownMenu...
<rich:dataTable
id="emergencyContacts"
var="emergencyContact"
value="#{cvUser.userProfile.emergencyContacts}"
rendered="true"
rowClasses="oddRows, evenRows"
rows="#{util.getDefaultDataTableRows(facesContext, null)}"
onRowMouseOver="#{globals['dataTable.onRowMouseOver']}"
onRowMouseOut="#{globals['dataTable.onRowMouseOut']}"
sortMode="single"
sortable=""
width="#{globals['dataTable.width.default']}">
<f:facet name="header">
Emergency Contacts
</f:facet>
<rich:column sortBy="#{emergencyContact.fullName}">
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:commandLink action="#{userProfileManager.viewEmergencyContact}"
value="#{emergencyContact.fullName}" />
</rich:column>
<rich:column sortBy="#{emergencyContact.relationship}">
<f:facet name="header">
<h:outputText value="Relationship" />
</f:facet>
<h:outputText value="#{emergencyContact.relationship}"/>
</rich:column>
<rich:column sortBy="#{emergencyContact.primaryPhone}">
<f:facet name="header">
<h:outputText value="Primary Phone" />
</f:facet>
<h:outputText value="#{emergencyContact.primaryPhone}" />
</rich:column>
<rich:column sortBy="#{emergencyContact.primaryEmail}">
<f:facet name="header">
<h:outputText value="Primary Email" />
</f:facet>
<h:outputLink value="mailto:#{emergencyContact.primaryEmail}">
<h:outputText value="#{emergencyContact.primaryEmail}"/>
</h:outputLink>
</rich:column>
<rich:column sortBy="#{emergencyContact.address.fullAddress}">
<f:facet name="header">
<h:outputText value="Address" />
</f:facet>
<!-- Include Full Address template -->
<ui:include src="/layout/objects/fullAddress.xhtml" >
<ui:param name="address" value="#{emergencyContact.address}"
/>
</ui:include>
</rich:column>
<rich:column sortBy="#{emergencyContact.nextOfKinType.name}">
<f:facet name="header">
<h:outputText value="Next of Kin" />
</f:facet>
<h:outputText value="#{emergencyContact.nextOfKinType.name}"/>
</rich:column>
<rich:column styleClass="data-table-action-header"
width="40">
<f:facet name="header">
<h:outputText value="Actions" />
</f:facet>
<rich:toolBar>
<rich:dropDownMenu value="Actions">
<rich:menuItem submitMode="ajax" value="Edit"
action="#{userProfileManager.modifyEmergencyContact}">
</rich:menuItem>
<rich:menuItem submitMode="ajax" value="Delete"
action="#{userProfileManager.preRemoveEmergencyContact}"
oncomplete="javascript:Richfaces.showModalPanel('removePopup')">
</rich:menuItem>
</rich:dropDownMenu>
</rich:toolBar>
<!--
<rich:toolBar
onItemMouseOver="this.style.backgroundColor='#F1F1F1'"
onItemMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
<rich:toolBarGroup itemSeparator="line">
<h:commandLink id="editImage"
action="#{userProfileManager.modifyEmergencyContact}">
<h:graphicImage
value="#{theme.imgdir}/data-table/page_white_edit.png"
alt="Modify #{emergencyContact.fullName}"/>
</h:commandLink>
<a4j:commandLink id="removeEMLink" reRender="popupForm"
oncomplete="javascript:Richfaces.showModalPanel('removePopup')"
action="#{userProfileManager.preRemoveEmergencyContact}">
<h:graphicImage value="#{theme.imgdir}/data-table/cross.png"
alt="Remove #{emergencyContact.fullName}"/>
</a4j:commandLink>
</rich:toolBarGroup>
</rich:toolBar>
-->
</rich:column>
<f:facet name="footer">
<rich:columnGroup>
<rich:column colspan="7">
<rich:datascroller align="left" for="emergencyContacts"
maxPages="20" renderIfSinglePage="false"/>
</rich:column>
</rich:columnGroup>
</f:facet>
</rich:dataTable>
rich:dropDownMenu - display is never right
------------------------------------------
Key: RF-4395
URL:
https://jira.jboss.org/jira/browse/RF-4395
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.1
Reporter: Chris Simons
Attachments: Firefox.jpg, Firefox_toolbar.jpg, IE6.jpg, IE6_toolbar.jpg
I see a lot of rich:dropDownMenu bugs being resolved as "Cannot Reproduce" but
RichFaces users are clearly reporting these issues over and over again.
Here is a simple rich:dropDownMenu inside of a rich:dataTable column.
<rich:dropDownMenu value="Actions">
<rich:menuItem submitMode="ajax" value="Edit"
action="#{userProfileManager.modifyEmergencyContact}">
</rich:menuItem>
<rich:menuItem submitMode="ajax" value="Delete"
action="#{userProfileManager.preRemoveEmergencyContact}"
oncomplete="javascript:Richfaces.showModalPanel('removePopup')">
</rich:menuItem>
</rich:dropDownMenu>
In IE 6, this renders wrong (see screenshot).
In FireFox 2.0/3.0, it is still wrong but slightly better. (see screenshot)
Adding a rich:toolBar around the rich:dropDownMenu does little to change the
appearance...
<rich:toolBar>
<rich:dropDownMenu value="Actions">
<rich:menuItem submitMode="ajax" value="Edit"
action="#{userProfileManager.modifyEmergencyContact}">
</rich:menuItem>
<rich:menuItem submitMode="ajax" value="Delete"
action="#{userProfileManager.preRemoveEmergencyContact}"
oncomplete="javascript:Richfaces.showModalPanel('removePopup')">
</rich:menuItem>
</rich:dropDownMenu>
</rich:toolBar>
IE 6 - see screenshot; first menuItem will not highlight when hovered; appearance is all
over the place
Firefox 2.0/3.0 - see screenshot;
These are two RichFaces components not playing nice together. Shouldn't they?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira