Re: T5: Grid component, reorder and empty source

2007-11-16 Thread Arve Klev
hi,
as a novice in regards to Tapestry, I first thought it was a bug,
but at last I tried to supply a beanmodel, and everything is fine (obvious
to others, I think).
I found the tip here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/beaneditform.html.

table t:type=grid pagerPosition=both source=persons model=
personModel reorder=firstName /

@Inject
private BeanModelSource _beanModelSource;

@Inject
private ComponentResources _resources;

@Retain
private BeanModel _model;

public BeanModel getPersonModell() {
return _model;
}

void pageLoaded() {
_model = _beanModelSource.create(Person.class, false, _resources);
}

Is this the right way to inform the grid component to use the Person.class
?


thanks,

Arve Klev

2007/11/13, adamh [EMAIL PROTECTED]:


 I'm seeing the same behaviour, if my source is empty and I use the
 'remove'
 parameter I get the same exception:

 'grid: xxx -- no source to determine list type from'

 Results.tml
 t:grid t:source=myResults t:row=item t:remove=Id,colour,name
 t:rowsPerPage=10 width=620px

 Removing the 'remove' param the page renders with the 'nothing to display'
 message.

 --
 View this message in context:
 http://www.nabble.com/T5%3A-Grid-component%2C-reorder-and-empty-source-tf4782045.html#a13732796
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: T5: Grid component, reorder and empty source

2007-11-16 Thread Arve Klev
yes, it works fine.


2007/11/16, Joshua Jackson [EMAIL PROTECTED]:

 On 11/16/07, Arve Klev [EMAIL PROTECTED] wrote:
  hi,
  as a novice in regards to Tapestry, I first thought it was a bug,
  but at last I tried to supply a beanmodel, and everything is fine
 (obvious
  to others, I think).
  I found the tip here:
 
 http://tapestry.apache.org/tapestry5/tapestry-core/guide/beaneditform.html
 .
 
  table t:type=grid pagerPosition=both source=persons model=
  personModel reorder=firstName /
 
 @Inject
 private BeanModelSource _beanModelSource;
 
 @Inject
 private ComponentResources _resources;
 
 @Retain
 private BeanModel _model;
 
 public BeanModel getPersonModell() {
 return _model;
 }
 
 void pageLoaded() {
 _model = _beanModelSource.create(Person.class, false,
 _resources);
 }
 
  Is this the right way to inform the grid component to use the 
 Person.class
  ?

 Have you tried it yet?


 --
 What you want today, may not exist tommorrow

 Blog: http://joshuajava.wordpress.com/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: T5: Grid component, reorder and empty source

2007-11-16 Thread Joshua Jackson
On 11/16/07, Arve Klev [EMAIL PROTECTED] wrote:
 hi,
 as a novice in regards to Tapestry, I first thought it was a bug,
 but at last I tried to supply a beanmodel, and everything is fine (obvious
 to others, I think).
 I found the tip here:
 http://tapestry.apache.org/tapestry5/tapestry-core/guide/beaneditform.html.

 table t:type=grid pagerPosition=both source=persons model=
 personModel reorder=firstName /

@Inject
private BeanModelSource _beanModelSource;

@Inject
private ComponentResources _resources;

@Retain
private BeanModel _model;

public BeanModel getPersonModell() {
return _model;
}

void pageLoaded() {
_model = _beanModelSource.create(Person.class, false, _resources);
}

 Is this the right way to inform the grid component to use the Person.class
 ?

Have you tried it yet?


-- 
What you want today, may not exist tommorrow

Blog: http://joshuajava.wordpress.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Grid component, reorder and empty source

2007-11-16 Thread Marcus
Hi Arve,

We're using an if to display grid only when it has data. Like this:

test.java:
...




On Nov 16, 2007 2:40 PM, adamh [EMAIL PROTECTED] wrote:

 Hi Arve,

 Yep, I got it to work as well - I should have been a bit more persistent
 with my searching, still its little 'should be simple' things like this that
 can trip you up if you are new to the T5 way. Its just a question of the
 docs getting updated, I thought I saw talk of a grid section/tutorial
 somewhere.



 Arve Klev wrote:
 
  yes, it works fine.
 
 
  2007/11/16, Joshua Jackson [EMAIL PROTECTED]:
 
  On 11/16/07, Arve Klev [EMAIL PROTECTED] wrote:
   hi,
   as a novice in regards to Tapestry, I first thought it was a bug,
   but at last I tried to supply a beanmodel, and everything is fine
  (obvious
   to others, I think).
   I found the tip here:
  
  http://tapestry.apache.org/tapestry5/tapestry-core/guide/beaneditform.html
  .
  
   table t:type=grid pagerPosition=both source=persons model=
   personModel reorder=firstName /
  
  @Inject
  private BeanModelSource _beanModelSource;
  
  @Inject
  private ComponentResources _resources;
  
  @Retain
  private BeanModel _model;
  
  public BeanModel getPersonModell() {
  return _model;
  }
  
  void pageLoaded() {
  _model = _beanModelSource.create(Person.class, false,
  _resources);
  }
  
   Is this the right way to inform the grid component to use the 
  Person.class
   ?
 
  Have you tried it yet?
 
 
  --
  What you want today, may not exist tommorrow
 
  Blog: http://joshuajava.wordpress.com/
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/T5%3A-Grid-component%2C-reorder-and-empty-source-tf4782045.html#a13797863
 Sent from the Tapestry - User mailing list archive at Nabble.com.



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Grid component, reorder and empty source

2007-11-16 Thread adamh

Hi Arve,

Yep, I got it to work as well - I should have been a bit more persistent
with my searching, still its little 'should be simple' things like this that
can trip you up if you are new to the T5 way. Its just a question of the
docs getting updated, I thought I saw talk of a grid section/tutorial
somewhere.


Arve Klev wrote:
 
 yes, it works fine.
 
 
 2007/11/16, Joshua Jackson [EMAIL PROTECTED]:

 On 11/16/07, Arve Klev [EMAIL PROTECTED] wrote:
  hi,
  as a novice in regards to Tapestry, I first thought it was a bug,
  but at last I tried to supply a beanmodel, and everything is fine
 (obvious
  to others, I think).
  I found the tip here:
 
 http://tapestry.apache.org/tapestry5/tapestry-core/guide/beaneditform.html
 .
 
  table t:type=grid pagerPosition=both source=persons model=
  personModel reorder=firstName /
 
 @Inject
 private BeanModelSource _beanModelSource;
 
 @Inject
 private ComponentResources _resources;
 
 @Retain
 private BeanModel _model;
 
 public BeanModel getPersonModell() {
 return _model;
 }
 
 void pageLoaded() {
 _model = _beanModelSource.create(Person.class, false,
 _resources);
 }
 
  Is this the right way to inform the grid component to use the 
 Person.class
  ?

 Have you tried it yet?


 --
 What you want today, may not exist tommorrow

 Blog: http://joshuajava.wordpress.com/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Grid-component%2C-reorder-and-empty-source-tf4782045.html#a13797863
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Grid component, reorder and empty source

2007-11-16 Thread Marcus
Hi Arve,

We're using an if, to display grid only when it has data. Like this:

Test.java:
...
public boolean getHasDataToGrid1() { return (_listGrd1.size()  0);  }
...

Test.tml
...
t:if test=hasDataToGrid1
   table t:type=grid 
...


Marcus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Grid component, reorder and empty source

2007-11-16 Thread Arve Klev
Hi Marcus,

Thanks, thats easier.

Arve

2007/11/16, Marcus [EMAIL PROTECTED]:

 Hi Arve,

 We're using an if, to display grid only when it has data. Like this:

 Test.java:
 ...
 public boolean getHasDataToGrid1() { return (_listGrd1.size()  0);  }
 ...

 Test.tml
 ...
 t:if test=hasDataToGrid1
table t:type=grid 
 ...


 Marcus

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: T5: Grid component, reorder and empty source

2007-11-13 Thread adamh

I'm seeing the same behaviour, if my source is empty and I use the 'remove'
parameter I get the same exception:

'grid: xxx -- no source to determine list type from'

Results.tml
t:grid t:source=myResults t:row=item t:remove=Id,colour,name
t:rowsPerPage=10 width=620px

Removing the 'remove' param the page renders with the 'nothing to display'
message.

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Grid-component%2C-reorder-and-empty-source-tf4782045.html#a13732796
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5: Grid component, reorder and empty source

2007-11-10 Thread Arve Klev
hi,
I am using the grid component to present the result from a search.
When the data source is empty,

table t:type=grid pagerPosition=both source=persons /

returns There is no data to display. as expected.
but when I try to use the reorder parameter,

table t:type=grid pagerPosition=both source=persons
reorder=firstName /

an application exception occur: ...grid: xxx -- no source to determine list
type from

Is it supposed to be a non-empty datasource when using parameters like
reorder or remove?
(I am now reordering by get'ers and remove with @NonVisual in my
domain-model. Version is 5.0.6.)

thanks,

Arve Klev