06-23-2010 06:34 AM
<h:dataTable binding="#{DialogManager.bean.dataTable}" value="#{DialogManager.bean.dataList}" var="dataItem">
<h:column>
<f:facet name="header">
<h:outputText value="ID" />
</f:facet>
<h:commandLink value="#{dataItem.id}" action="#{MyBeanDialog.editDataItem}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:outputText value="#{dataItem.name}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Author" />
</f:facet>
<h:outputText value="#{dataItem.author}" />
</h:column>
</h:dataTable>
public class MyBeanDialog extends BaseDialogBean {
…
public String editDataItem() {
if (logger.isDebugEnabled()) logger.debug("editDataItem");
// Get selected MyData item to be edited.
dataItem = (customNode) dataTable.getRowData();
// Store the ID of the data item in hidden input element.
dataItemId.setValue(dataItem.getId());
return "edit"; // Navigation case.
}
…
<navigation-case>
<from-action>#{MyBeanDialog.editDataItem}</from-action>
<from-outcome>edit</from-outcome>
<to-view-id>/jsp/extension/dialogs/edit-data-item.jsp</to-view-id>
</navigation-case>
<h:panelGrid>
<h:outputText value="ID" />
<h:outputText value="#{MyBeanDialog.dataItem.id}" />
<h:outputText value="Name" />
<h:inputText value="#{MyBeanDialog.dataItem.name}" />
<h:outputText value="Author" />
<h:inputText value="#{MyBeanDialog.dataItem.author}" />
</h:panelGrid>
<h:commandLink value="#{dataItem.id}" action="#{MyBeanDialog.editDataItem}" />
06-23-2010 10:43 AM
06-24-2010 10:35 AM
<h:commandLink value="#{dataItem.id}" action="#{MyBeanDialog.editDataItem}" />
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.