You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa" <da...@xs4all.nl> on 2004/02/26 11:51:44 UTC

[Table comp] is there a difference between b3 & b4 in using SimpleTableModel?

Hi,

Below the two methods i used in b3 to create a table. Everything worked ok.
Using b4 i suddenly noticed the following whilst stepping through the code. 
(After fining out i started gettnigs nulls instead of the expected rows)

_tableModel (on the return in the code below) contains:
- m_arrRows = null (??)
- m_objColumnModel = correct
- m_objDataModel = correct (incl a correct entry for m_arrRows)
- rest is also correct.
So the _tableModel basically looks ok.

Could it be that i'm not getting any rows (they do exist in the dataModel 
though) because the m_arrRows == null? Or should that entry be null, the 
SimpleDataModel constructor suggests it should be.

As mentioned before, i cannot remember ever doing anything with the 
m_arrRows in the _tableModel (though that could imply early brain damage ;))
Am i overlooking something obvious or is there something that has changed 
slightly?

TIA
Fermin DCG


public ITableModel getTableModel() {
  if (_tableModel==null || _refreshData) {
   initTableSessionStateManager();
   _tableModel = m_objTableSessionStateManager.recreateTableModel(new 
SimpleTableState());
  }
  return _tableModel;
}

private void initTableSessionStateManager() {
  _tableDataModel = (ITableDataModel) getBinding("data2bShown").getObject();
  _tableColumnModel = createTableColumnModel( (Vector) 
getBinding("tableColumnDescriptions").getObject() );
  m_objTableSessionStateManager = new 
SimpleTableSessionStateManager(_tableDataModel, _tableColumnModel);
     //m_objTableSessionStateManager = new NullTableSessionStateManager();
}


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: [Table comp] is there a difference between b3 & b4 in using SimpleTableModel? (Solved)

Posted by "F. Da Costa" <da...@xs4all.nl>.
There was indeed a change in the bindings of the TableRows component (row 
instead of value).


> Hi,
> 
> Below the two methods i used in b3 to create a table. Everything worked ok.
> Using b4 i suddenly noticed the following whilst stepping through the 
> code. (After fining out i started gettnigs nulls instead of the expected 
> rows)
> 
> _tableModel (on the return in the code below) contains:
> - m_arrRows = null (??)
> - m_objColumnModel = correct
> - m_objDataModel = correct (incl a correct entry for m_arrRows)
> - rest is also correct.
> So the _tableModel basically looks ok.
> 
> Could it be that i'm not getting any rows (they do exist in the 
> dataModel though) because the m_arrRows == null? Or should that entry be 
> null, the SimpleDataModel constructor suggests it should be.
> 
> As mentioned before, i cannot remember ever doing anything with the 
> m_arrRows in the _tableModel (though that could imply early brain damage 
> ;))
> Am i overlooking something obvious or is there something that has 
> changed slightly?
> 
> TIA
> Fermin DCG
> 
> 
> public ITableModel getTableModel() {
>  if (_tableModel==null || _refreshData) {
>   initTableSessionStateManager();
>   _tableModel = m_objTableSessionStateManager.recreateTableModel(new 
> SimpleTableState());
>  }
>  return _tableModel;
> }
> 
> private void initTableSessionStateManager() {
>  _tableDataModel = (ITableDataModel) getBinding("data2bShown").getObject();
>  _tableColumnModel = createTableColumnModel( (Vector) 
> getBinding("tableColumnDescriptions").getObject() );
>  m_objTableSessionStateManager = new 
> SimpleTableSessionStateManager(_tableDataModel, _tableColumnModel);
>     //m_objTableSessionStateManager = new NullTableSessionStateManager();
> }
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org