Re: Looking at CarSort example.. will it work with ListDataModel?
I´ve fixed the bug with the width attribute in the current svn. If you use the nightly you have to wait for the next one. 2005/9/13, Rick Reumann <[EMAIL PROTECTED]>: > Rick Reumann wrote the following on 9/13/2005 3:47 PM: > > Removing "preserveState='true'" from the DataTable seemed to fix the > > problem. > > However I'm still having the problem where > > is not being preserved after the resort > (attribute width not shoing up in source code) > > -- > Rick > -- Mathias
Re: Looking at CarSort example.. will it work with ListDataModel?
Rick Reumann wrote the following on 9/13/2005 3:47 PM: Removing "preserveState='true'" from the DataTable seemed to fix the problem. However I'm still having the problem where is not being preserved after the resort (attribute width not shoing up in source code) -- Rick
Re: Looking at CarSort example.. will it work with ListDataModel?
Removing "preserveState='true'" from the DataTable seemed to fix the problem. Rick Reumann wrote the following on 9/13/2005 3:08 PM: Rick Reumann wrote the following on 9/13/2005 2:57 PM: Mathias Brökelmann wrote the following on 9/13/2005 11:32 AM: Yes it should work. Things are also getting really screwed up after a sort takes place and then I try to get a handle the row selected by doing... this.employee = (EmployeeVO)getEmployeesListBean().getEmployeesModel().getRowData(); Narrowing this down a bit more. I notice the above is always grabbing the 'last row' in the DataModel, regardless of which one is selected. So after a sort and you click on the "edit" button on the row, it will bring back the last row regardless of which one is clicked on from... action="#{employeeAction.prepareForEdit}"/> prepareForEdit() has the this.employee = (EmployeeVO)getEmployeesListBean().getEmployeesModel().getRowData(); After a sort takes place, I am no longer able to get the correct row that is selected. I am even using two methos now in my EmployeesListBean: public ListDataModel getEmployeesModelSorted() { log.debug("getEmployeesModelSorted"); sort(getSort(), isAscending()); return model; } public ListDataModel getEmployeesModel() { log.debug("getEmployeesModelUnsorted"); //don't sort here since this method gets called from EmployeeAction return model; } The JSP is using: the sort method, sorts just like it does in the car example, but I also am reinitializing the Model... Collections.sort(employees, comparator); //repopulate DataModel, since we just sorted model = new ListDataModel( employees ); The regular getEmployeesModel() method doesn't call the sort method so I thought that would mean I'd be able to get a handle to the correct row selected by the user, but something isn't working correctly. -- Rick
Re: Looking at CarSort example.. will it work with ListDataModel?
Rick Reumann wrote the following on 9/13/2005 2:57 PM: Mathias Brökelmann wrote the following on 9/13/2005 11:32 AM: Yes it should work. Things are also getting really screwed up after a sort takes place and then I try to get a handle the row selected by doing... this.employee = (EmployeeVO)getEmployeesListBean().getEmployeesModel().getRowData(); Narrowing this down a bit more. I notice the above is always grabbing the 'last row' in the DataModel, regardless of which one is selected. So after a sort and you click on the "edit" button on the row, it will bring back the last row regardless of which one is clicked on from... action="#{employeeAction.prepareForEdit}"/> prepareForEdit() has the this.employee = (EmployeeVO)getEmployeesListBean().getEmployeesModel().getRowData(); After a sort takes place, I am no longer able to get the correct row that is selected. I am even using two methos now in my EmployeesListBean: public ListDataModel getEmployeesModelSorted() { log.debug("getEmployeesModelSorted"); sort(getSort(), isAscending()); return model; } public ListDataModel getEmployeesModel() { log.debug("getEmployeesModelUnsorted"); //don't sort here since this method gets called from EmployeeAction return model; } The JSP is using: the sort method, sorts just like it does in the car example, but I also am reinitializing the Model... Collections.sort(employees, comparator); //repopulate DataModel, since we just sorted model = new ListDataModel( employees ); The regular getEmployeesModel() method doesn't call the sort method so I thought that would mean I'd be able to get a handle to the correct row selected by the user, but something isn't working correctly. -- Rick
Re: Looking at CarSort example.. will it work with ListDataModel?
Mathias Brökelmann wrote the following on 9/13/2005 11:32 AM: Yes it should work. Things are also getting really screwed up after a sort takes place and then I try to get a handle the row selected by doing... this.employee = (EmployeeVO)getEmployeesListBean().getEmployeesModel().getRowData(); After a sort takes place, I am no longer able to get the correct row that is selected. I am even using two methos now in my EmployeesListBean: public ListDataModel getEmployeesModelSorted() { log.debug("getEmployeesModelSorted"); sort(getSort(), isAscending()); return model; } public ListDataModel getEmployeesModel() { log.debug("getEmployeesModelUnsorted"); //don't sort here since this method gets called from EmployeeAction return model; } The JSP is using: the sort method, sorts just like it does in the car example, but I also am reinitializing the Model... Collections.sort(employees, comparator); //repopulate DataModel, since we just sorted model = new ListDataModel( employees ); The regular getEmployeesModel() method doesn't call the sort method so I thought that would mean I'd be able to get a handle to the correct row selected by the user, but something isn't working correctly. -- Rick
t:column width issue, was: Re: Looking at CarSort example.. will it work with ListDataModel?
Mathias Brökelmann wrote the following on 9/13/2005 11:32 AM: Yes it should work. This is odd. I'm using the nightly build of myfaces-all, but when the table resorts it doesn't produce the 'width' attribute on the td: Before clicking on a column to sort, the table correctly generates a width="280", after clicking on a column to sort, the width is no longer present in the generated source. Any ideas what could be going wrong? -- Rick
Re: Looking at CarSort example.. will it work with ListDataModel?
Yes it should work. 2005/9/13, Rick Reumann <[EMAIL PROTECTED]>: > I currently have a DataTable built from a ListDataModel that takes my > List. I want to implement column sorting, so I'm just beginning to look > at the Car sort example of MyFaces. > > Will the sort work on the front end if you use a ListDataModel vs a > direct List in your DataTable? > > -- > Rick > -- Mathias
Looking at CarSort example.. will it work with ListDataModel?
I currently have a DataTable built from a ListDataModel that takes my List. I want to implement column sorting, so I'm just beginning to look at the Car sort example of MyFaces. Will the sort work on the front end if you use a ListDataModel vs a direct List in your DataTable? -- Rick