myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gerhard.petra...@gmail.com>
Subject Re: @ViewAccessScoped datatable selected row value not available for first time
Date Fri, 28 Dec 2012 03:00:05 GMT
hi jacob,

we heard about similar issues in combination with primefaces.
in those cases some parts of primefaces don't propagate parameters (like
the window-id).

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2012/12/28 Pon <jacob.elias@gmail.com>

> Unfortunately I do not have a link to a demo, I have pasted below the code
> I am using. If any other details are required, kindly let me know.
> Appreciated. ManagedBean <nabble_embed> @Named("emp") @ViewAccessScoped
> public class EmployeeManagedBean implements Serializable { private Employee
> selectedRequest = new Employee(); @PostConstruct public void init() {
> initTable(); } private void initTable() { lazyModel = new
> LazyEmployeeDataModel(requestList, requestService); } public
> LazyDataModel<Employee> getLazyModel() { return lazyModel; }
> </nabble_embed> and onRowSelect Method <nabble_embed> public void
> onRowSelect(SelectEvent event) { try { setSelectedRequest((Employee)
> event.getObject()); System.out.println("row " + getSelectedRequest());
> </nabble_embed> JSF Code <nabble_embed> <p:dataTable id="dataTable"
> var="req" lazy="true" value="#{emp.lazyModel}" rowKey="#{req.empNo}"
> paginator="true" rows="10" selection="#{emp.selectedRequest}"> <p:ajax
> event="rowSelectRadio" listener="#{emp.onRowSelect}" /> <p:column
> selectionMode="single" style="" /> </nabble_embed>
> ------------------------------
> View this message in context: Re: @ViewAccessScoped datatable selected
> row value not available for first time<http://myfaces.10567.n7.nabble.com/ViewAccessScoped-datatable-selected-row-value-not-available-for-first-time-tp113980p113982.html>
>
> Sent from the My Faces - Dev mailing list archive<http://myfaces.10567.n7.nabble.com/My-Faces-Dev-f3.html>at
Nabble.com.
>

Mime
View raw message