Reply with your bean that is accessed by the following. So we can see what the bean is expecting.
Code: Select all
actionListener="#{userTable.disableUser(user.userId)}"
p:commandLink is working fine for me; as you can see below, I conditionally render p:commandLink if user prefers AJAX or not.
Code: Select all
<p:dataTable id="dt_rollingStockOrdersList" var="order" value="#{pf_ordersController.ordersList}"
paginator="true" paginatorAlwaysVisible="true" rows="100">
<p:column headerText="Trip Date (From/To)">
<p:commandLink rendered="#{pf_usersController.ajax}" update=":pageContentPanel"
actionListener="#{pf_ordersController.prepareViewFromRollingStock(order.orderId)}">
<h:outputText escape="false" value="#{pf_ordersController.getTripDateDisplay(order)}" />
</p:commandLink>
<p:commandLink rendered="#{!pf_usersController.ajax}" ajax="false"
actionListener="#{pf_ordersController.prepareViewFromRollingStock(order.orderId)}">
<h:outputText escape="false" value="#{pf_ordersController.getTripDateDisplay(order)}" />
</p:commandLink>
</p:column>
bean method referenced by p:commandLink
Code: Select all
public String prepareViewFromRollingStock(Integer orderId) {
current = null;
try {
current = getFacade().getOrder(orderId);
if (current != null) {
currentBankForBalance = current.getBankForBalanceId();
currentBankForDeposit = current.getBankForDepositId();
currentDetails = current.getDetailsId();
currentNotes = current.getNotesId();
currentRoutes = current.getRoutesId();
browse = false;
add = false;
edit = false;
view = true;
viewToAdd = false;
viewToEdit = false;
getPageNavigation().setPage("/orders/pf_ViewOnlyFromRollingStock.xhtml");
}
else {
messages.addFormErrorMsg("Error on attempt to view ORDERS data from ROLLING STOCK (orderId==null)", "");
}
} catch (Exception e) {
e.printStackTrace();
messages.addFormErrorMsg("Error retrieving ORDERS data to view from ROLLING STOCK", (e.getMessage() != null) ? e.getMessage() : "");
}
return null;
}