-
4 Nov 2010 4:32 AM #1
Problem with getting value from grid-model
Problem with getting value from grid-model
Hello,
i`m wondering why my grid doesn`t display data after callback.
I found out a problem in my column id. The model looks like:
Code:@SuppressWarnings
("serial") public class GridResultModel extends BaseModel {public static final String TE_ID = "te-id";public GridResultModel() { }public GridResultModel(String teId) { super();set(TE_ID, teId); }public void setTeId(String teId) { set(TE_ID, teId);public String getTeId() { return get(TE_ID);}@BEAN(GridResultModel.class) public interface GridResultBeanModel extends BeanModelMarker { } }When i read the content of a selected row, i get different column ids:
Istaead of "te-id" i get "teId"...
Code:resultGrid.addListener(Events.RowClick, new Listener<GridEvent<GridResultModel>>() {@Override publicvoid handleEvent(GridEvent<GridResultModel> be) {ModelData model = (ModelData) be.getModel();System.out.println(model.get(GridResultModel.TE_ID)); [...]The output of println is always "null" !!!
Help pls!
-
4 Nov 2010 4:34 AM #2
This is not needed if using BaseModel. Have you tried to reproduce your code in a small, standalone example implementing EntryPoint?Code:@BEAN(GridResultModel.class) public interface GridResultBeanModel extends BeanModelMarker { } }
-
4 Nov 2010 4:44 AM #3
When i leave this part out, i get this error:
java.lang.AssertionError: No BeanModelFactory found for class de.bitmarck.bi.hzv.tnp.client.modelData.GridResultModel
No, i have copied and modified these parts of my project.Have you tried to reproduce your code in a small, standalone example implementing EntryPoint?
-
4 Nov 2010 4:49 AM #4
Somewhere in your code you than use a BeanModelReader, which you dont need for this.
-
4 Nov 2010 5:25 AM #5
-
4 Nov 2010 5:26 AM #6
Similar Threads
-
Problem when loading a model
By jedihua in forum Sencha Touch 1.x: DiscussionReplies: 4Last Post: 16 Oct 2010, 7:26 PM -
Rendering Column model Problem..
By yagi in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 29 Sep 2010, 2:25 AM -
Problem With Adding children to Model
By bsmithny in forum Ext GWT: DiscussionReplies: 0Last Post: 4 Dec 2009, 7:03 AM -
problem w/ grid column model widths, screenshot
By illuminum in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 22 Jun 2008, 6:57 PM


Reply With Quote