Re: [Wicket-user] DataTable row and header formatting

2007-04-19 Thread craigdd

I found the repeater examples in the examples download, that helps a little
bit, but that still doesn't answer my question  as to how you would do
things like set the alignment to center on the test of the second column of
my table.

When it comes down to it...should I be using DataView instead of DataTable?

-Craig


craigdd wrote:
 
 Sorry, I keep asking what are probably simple questions regarding the
 DataTable.
 
 How do I utilize this component and still have access to format things
 such and the alignment / width of each column.
 
 By the way, is there any good example out there using DataTable /
 DataView, I don't see any in the normal wicket examples download.
 
 Thanks
 Craig
 

-- 
View this message in context: 
http://www.nabble.com/DataTable-row-and-header-formatting-tf3610550.html#a10090175
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable row and header formatting

2007-04-19 Thread Igor Vaynberg

if you want a lot of control over the markup then you should use the
dataview. datatable trades markup control for functionality - you get a lot
of functionality for very little setup. that said, you can still write your
own icolumn implementations that can set the width, etc, but it is less
flexible then the dataview where you have full control.

eg

class mypropcol extends propertycolumn {
 public Component getHeader(String componentId) {
 Component header=super.getHeader(componentId);
 header.add(new SimpleAttributeModifier(style,width:300px;));
 }
}


-igor



On 4/19/07, craigdd [EMAIL PROTECTED] wrote:



I found the repeater examples in the examples download, that helps a
little
bit, but that still doesn't answer my question  as to how you would do
things like set the alignment to center on the test of the second column
of
my table.

When it comes down to it...should I be using DataView instead of
DataTable?

-Craig


craigdd wrote:

 Sorry, I keep asking what are probably simple questions regarding the
 DataTable.

 How do I utilize this component and still have access to format things
 such and the alignment / width of each column.

 By the way, is there any good example out there using DataTable /
 DataView, I don't see any in the normal wicket examples download.

 Thanks
 Craig


--
View this message in context:
http://www.nabble.com/DataTable-row-and-header-formatting-tf3610550.html#a10090175
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DataTable alternating tr background colors

2007-04-18 Thread craigdd

What is the best way to add alternating back ground colors, or CSS styles to
trs when using the DataTable extension object?
-- 
View this message in context: 
http://www.nabble.com/DataTable-alternating-tr-background-colors-tf3604301.html#a10069961
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable alternating tr background colors

2007-04-18 Thread Igor Vaynberg

class mydatatable extends datatable {

   protected Item newRowItem(String id, int index, IModel model)
   {
   return new OddEvenItem(id, index, model);
   }
}

tr.even { background-color:yellow; }
tr.odd { background-color:white; }

-igor


On 4/18/07, craigdd [EMAIL PROTECTED] wrote:



What is the best way to add alternating back ground colors, or CSS styles
to
trs when using the DataTable extension object?
--
View this message in context:
http://www.nabble.com/DataTable-alternating-tr-background-colors-tf3604301.html#a10069961
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DataTable (date format)

2007-02-23 Thread Kingen Star

Hi.

Is there an easy way to format the date that the DataTable is displaying?
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable (date format)

2007-02-23 Thread Igor Vaynberg

class datepropcol extends propertycolumn {
imodel createlabelmodel(imodel rowmodel) {
  final imodel prop=super.createlabelmodel(rowmodel);
  return new abstractreadonlymodel() {
   object getobject() {
Date date=(Date)prop.getObject();
String str=formatdate...
return str;
 }
}
}
-igor



On 2/23/07, Kingen Star [EMAIL PROTECTED] wrote:


Hi.

Is there an easy way to format the date that the DataTable is displaying?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DataTable with expandable rows

2006-12-22 Thread Niels Bo

Hi there

I need a little help to solve this.

I want to create a table using DataTable, where the user can select a row
and
then see some more details in a extra row inserted below the selected.
Something like this:

th
 tdcol 1/tdtdcol 2/tdtdcol 3/td
/th
tr
 tdaaa/tdtdbbb/tdtdccc/td
/tr
tr
 td colspan=3details data from the record above/td
/tr

I belive I can use the ReuseIfModelsEqualStrategy to handle the selected
row, but
how do I insert the extra row with one cell spanning all columns?

Best Regards
Niels
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable with column styles and widths

2006-12-22 Thread Niels Bo

The setStyle() on a column, puts the style a col tag!
I belive that is the only way you can set style to a complete column on a
single tag.

Niels


igor.vaynberg wrote:
 
 nothing in the works yet, still trying to figure out the nicest way to do
 this
 
 niel's idea might be more straightforward but from framework's point of
 view
 it is too limited and you can further generalize it to
 
 setStyle(rightadjusted width200) and remove setWidth() completely.
 
 then the question becomes
 
 when you call setStyle() on a column - where does that style go? does it
 go
 onto the th? or the tds?
 
 -igor
 
 
 On 10/31/06, Jan Mikkelsen [EMAIL PROTECTED] wrote:

 I have run into the same requirement and would also like a more elegant
 solution.
 Is something in the works or is there more important stuff to do :) ?
 Personally I prefer Niels' approach because it is very straightforward.

 Thanks,
 /Jan


 Igor Vaynberg wrote:
  i think what would be even better is if icolumn had add(IBehavior)
  that would get attached to the header
 
  right now what you have to do is something like this
 
  new MyColumn() {
   Component getHeader() {
  Component c= super.getHeader();
  c.add(new MyAttributeModifier());
 }
  }
 
  which is tricky for newbies to figure out.
 
  -igor
 
 
 
  On 10/14/06, * Niels Bo* [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
  Hi
 
  I have this suggestion for an extension to the DataTable component
  that will make it easier to set width and ccs styles individually
  on each column.
 
  It involves these files (attached):
 
   IColumn.java - new getWidth() and getStyleName()
   AbstractColumn.java - implement default get/set Width and
 StyleName
   DataTable.html - added colgroupsection
   DataTable.java - added a few lines.
 
  Usage like:
IColumn column = new PropetyColumn(...);
column.setStyleName(rightadjust);
column.setWidth(200);
 
  Would this be a useful improvement for other Wicket users?
 
  Niels
 
 
 -
  Using Tomcat but need to do more? Need to support web services,
  security?
  Get stuff done quickly with pre-integrated technology to make your
  job easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache
  Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 
 
 
 
 -
  Using Tomcat but need to do more? Need to support web services,
 security?
  Get stuff done quickly with pre-integrated technology to make your job
 easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 
 
 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 
 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/DataTable-with-column-styles-and-widths-tf2442398.html#a8028625
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's 

Re: [Wicket-user] DataTable with column styles and widths

2006-12-22 Thread Niels Bo

Yes, and the idear was that setStyle() should do a class=, 
so maybe setCSSClass() is better...


Martijn Dashorst wrote:
 
 Yep,
 
 Styling should be done in the css, not on the markup tags. Though
 sometimes convenient and I often violate this myself, I cringe
 everytime I add a style= attribute to a tag instead of a class=.
 
 Martijn
 
 On 10/31/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
 nothing in the works yet, still trying to figure out the nicest way to do
 this

 niel's idea might be more straightforward but from framework's point of
 view
 it is too limited and you can further generalize it to

  setStyle(rightadjusted width200) and remove setWidth() completely.

 then the question becomes

 when you call setStyle() on a column - where does that style go? does it
 go
 onto the th? or the tds?

 -igor



 On 10/31/06, Jan Mikkelsen [EMAIL PROTECTED] wrote:
  I have run into the same requirement and would also like a more elegant
  solution.
  Is something in the works or is there more important stuff to do :) ?
  Personally I prefer Niels' approach because it is very straightforward.
 
  Thanks,
  /Jan
 
 
  Igor Vaynberg wrote:
   i think what would be even better is if icolumn had add(IBehavior)
   that would get attached to the header
  
   right now what you have to do is something like this
  
   new MyColumn() {
Component getHeader() {
   Component c= super.getHeader();
   c.add(new MyAttributeModifier());
  }
   }
  
   which is tricky for newbies to figure out.
  
   -igor
  
  
  
   On 10/14/06, * Niels Bo* [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]  wrote:
  
   Hi
  
   I have this suggestion for an extension to the DataTable
 component
   that will make it easier to set width and ccs styles individually
   on each column.
  
   It involves these files (attached):
  
IColumn.java - new getWidth() and getStyleName()
AbstractColumn.java - implement default get/set Width and
 StyleName
 DataTable.html - added colgroupsection
DataTable.java - added a few lines.
  
   Usage like:
 IColumn column = new PropetyColumn(...);
 column.setStyleName(rightadjust);
 column.setWidth(200);
  
   Would this be a useful improvement for other Wicket users?
  
   Niels
  
  
 -
   Using Tomcat but need to do more? Need to support web services,
   security?
   Get stuff done quickly with pre-integrated technology to make
 your
   job easier
   Download IBM WebSphere Application Server v.1.0.1 based on Apache
   Geronimo
  
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   mailto:Wicket-user@lists.sourceforge.net 
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
  
  
 
  
  
 -
   Using Tomcat but need to do more? Need to support web services,
 security?
   Get stuff done quickly with pre-integrated technology to make your
 job
 easier
   Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
  
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  
 
  
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
 
 -
  Using Tomcat but need to do more? Need to support web services,
 security?
  Get stuff done quickly with pre-integrated technology to make your job
 easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



 
 
 -- 
  

Re: [Wicket-user] DataTable with expandable rows

2006-12-22 Thread Johan Compagner

you could have a panel for every row. So that you can dynamically add
whatever type
of row you want to that table.


On 12/22/06, Niels Bo [EMAIL PROTECTED] wrote:


Hi there

I need a little help to solve this.

I want to create a table using DataTable, where the user can select a row
and
then see some more details in a extra row inserted below the selected.
Something like this:

th
  tdcol 1/tdtdcol 2/tdtdcol 3/td
/th
tr
  tdaaa/tdtdbbb/tdtdccc/td
/tr
tr
  td colspan=3details data from the record above/td
/tr

I belive I can use the ReuseIfModelsEqualStrategy to handle the selected
row, but
how do I insert the extra row with one cell spanning all columns?

Best Regards
Niels

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable header manipulation

2006-11-08 Thread dulanov

I added a class check to the first header th element by next code:


issues = new DataTable(issues, columns.toArray(new
IColumn[columns.size()]), issueListProvider, itemsPerPage) {

@Override protected Item newRowItem(String id, int index, IModel
model) {
return new OddEvenItem(id, index, model);
}
};
issues.addTopToolbar(new IssueHeadersToolbar(issues,
issueListProvider));
...

public static class IssueHeadersToolbar extends HeadersToolbar {

public IssueHeadersToolbar(DataTable table, ISortStateLocator
stateLocator) {
super(table, stateLocator);

RepeatingView headers = (RepeatingView) get(headers);
MarkupContainer checkColumn = (MarkupContainer)
((MarkupContainer) headers.get(1)).get(header);
checkColumn.add(new AttributeModifier(class, true, new
Model(check)));
}
}

Is it possible to simplify?


Stefan Lindner wrote:
 
 I can manipulate the data grip part of a DataTable by overriding
 newCellItem. But if I e.g. need a speical layout for the table header, I
 must add a class or id attribute to the th elements of the headline
 (different layout on the left and right side e.g.).
 I can see no way to manipulate the generation of the headline. O.K. I can
 design my own Toolbar according to HeadersToolbar but in most cases that's
 much too compülicated. Is there an easy way to control the generation of
 the table head?
  
 Stefan Lindner
 
  
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/DataTable-header-manipulation-tf2397492.html#a7237234
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable header manipulation

2006-11-08 Thread dulanov

I added a class check to the first header th element by next code:

ListIColumn columns = new ArrayListIColumn();
columns.add(new AbstractColumn(new Model()) {

@Override public Component getHeader(String componentId) {
return new IssueSelectionFragment(componentId,
checkBoxFrag, IssueTabular.this, new Issue());
}

public void populateItem(Item cellItem, String componentId,
IModel rowModel) {
setModel(rowModel);
Issue issue = (Issue) getModelObject();
cellItem.add(new IssueSelectionFragment(componentId,
checkBoxFrag, IssueTabular.this, issue));
cellItem.add(new AttributeModifier(class, true, new
Model(check)));
}
});

issues = new DataTable(issues, columns.toArray(new
IColumn[columns.size()]), issueListProvider, itemsPerPage) {

@Override protected Item newRowItem(String id, int index, IModel
model) {
return new OddEvenItem(id, index, model);
}
};
issues.addTopToolbar(new IssueHeadersToolbar(issues,
issueListProvider));
...

public static class IssueHeadersToolbar extends HeadersToolbar {

public IssueHeadersToolbar(DataTable table, ISortStateLocator
stateLocator) {
super(table, stateLocator);

RepeatingView headers = (RepeatingView) get(headers);
MarkupContainer checkColumn = (MarkupContainer)
((MarkupContainer) headers.get(1)).get(header);
checkColumn.add(new AttributeModifier(class, true, new
Model(check)));
}
}

Is it possible to simplify?


Stefan Lindner wrote:
 
 I can manipulate the data grip part of a DataTable by overriding
 newCellItem. But if I e.g. need a speical layout for the table header, I
 must add a class or id attribute to the th elements of the headline
 (different layout on the left and right side e.g.).
 I can see no way to manipulate the generation of the headline. O.K. I can
 design my own Toolbar according to HeadersToolbar but in most cases that's
 much too compülicated. Is there an easy way to control the generation of
 the table head?
  
 Stefan Lindner
 
  
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/DataTable-header-manipulation-tf2397492.html#a7237245
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable header manipulation

2006-11-08 Thread dulanov

After same experiments I stop by following:

public static final class IssueHeadersToolbar extends HeadersToolbar {

public IssueHeadersToolbar(DataTable table, ISortStateLocator
stateLocator) {
super(table, stateLocator);
get(headers:1:header).add(new AttributeModifier(class, true,
new Model(check)));
}
}

But, this isn't supportable solution ;(


dulanov wrote:
 
 I added a class check to the first header th element by next code:
 
 ListIColumn columns = new ArrayListIColumn();
 columns.add(new AbstractColumn(new Model()) {
 
 @Override public Component getHeader(String componentId) {
 return new IssueSelectionFragment(componentId,
 checkBoxFrag, IssueTabular.this, new Issue());
 }
 
 public void populateItem(Item cellItem, String componentId,
 IModel rowModel) {
 setModel(rowModel);
 Issue issue = (Issue) getModelObject();
 cellItem.add(new IssueSelectionFragment(componentId,
 checkBoxFrag, IssueTabular.this, issue));
 cellItem.add(new AttributeModifier(class, true, new
 Model(check)));
 }
 });
 
 issues = new DataTable(issues, columns.toArray(new
 IColumn[columns.size()]), issueListProvider, itemsPerPage) {
 
 @Override protected Item newRowItem(String id, int index,
 IModel model) {
 return new OddEvenItem(id, index, model);
 }
 };
 issues.addTopToolbar(new IssueHeadersToolbar(issues,
 issueListProvider));
 ...
 
 public static class IssueHeadersToolbar extends HeadersToolbar {
 
 public IssueHeadersToolbar(DataTable table, ISortStateLocator
 stateLocator) {
 super(table, stateLocator);
 
 RepeatingView headers = (RepeatingView) get(headers);
 MarkupContainer checkColumn = (MarkupContainer)
 ((MarkupContainer) headers.get(1)).get(header);
 checkColumn.add(new AttributeModifier(class, true, new
 Model(check)));
 }
 }
 
 Is it possible to simplify?
 
 
 Stefan Lindner wrote:
 
 I can manipulate the data grip part of a DataTable by overriding
 newCellItem. But if I e.g. need a speical layout for the table header, I
 must add a class or id attribute to the th elements of the headline
 (different layout on the left and right side e.g.).
 I can see no way to manipulate the generation of the headline. O.K. I can
 design my own Toolbar according to HeadersToolbar but in most cases
 that's much too compülicated. Is there an easy way to control the
 generation of the table head?
  
 Stefan Lindner
 
  
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/DataTable-header-manipulation-tf2397492.html#a7239447
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DataTable and AjaxFallbakcLink (Wicket 2.0)

2006-11-04 Thread Stefan Lindner
Dear Wicket wizzards,
 
my current problem is a little bit hard to explain:
1. I have a Panel P1 contianing an AjaxTabbedPanel
2. One of the AjaxTabbedPanell panels (P2) contains a DataTable
3. Panel P1 has a AjaxFallbackLink. The AjaxFallBackLink's onClick method 
adds P2 to the AjaxRequestTarget targets. This means, whenever the 
AjaxFallbackLink is clicked, the mehtod onclick is activated and the method 
adds P2 to the AjaxRequestTarget list.
4. When the link is clicked, the size() method of the DataTables's 
SortableDataProvider is called at first.. Then the iterator() method.
5. The onBeforeRender methods of P2 and the DataTable are called afterwards.
 
What I want to do is to provide the DataTable with actual data. So I expected 
taht the size() and iterator() methods ware called after beforeRender(). But 
they are called before. Is this the intened behavior?
 
Stefan Lindner
winmail.dat-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable and AjaxFallbackLink (Wicket 2.0)

2006-11-04 Thread Stefan Lindner
To explain my problem a little bit more:

 

The DataTable is built from a database. To avoid unnecessary
transactions, I want to minimize the access to the database.

The SortableDataprovider's size() and iterator() methods are called
every time I display the panel by klicking on his AjaxTabbedPanels's
link.

So I place a special link on the page that means now update the content
of all panels in my AjaxTabbedPanel panels. But not all of the Panels in
My AjaxTabbedPanel may be chosen by the user so I do not need to reload
all their contents from database unless the panel is re-displayed. Is
there any event/method I can catch/override that is called before a
Panel is re-displayed? The beforeRender method doesn't the trick,
because the size() and iteraotr() methods of the Panels's DataTables are
called before.

 

Stefan Lindner

winmail.dat-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable and AjaxFallbakcLink (Wicket 2.0)

2006-11-04 Thread Igor Vaynberg
i believe size() and iterator() are called in onattach() not onbeforerender(). what is the difference from your point of view?size() might also get called before because it might be used in isVisible() method so whenever wicket needs to determine visibility dataprovider's size might get called.
but this is all encapsulated, you should not care when and what methods are called on the dataprovider.-igorOn 11/4/06, Stefan Lindner
 [EMAIL PROTECTED] wrote:Dear Wicket wizzards,
my current problem is a little bit hard to explain:1. I have a Panel P1 contianing an AjaxTabbedPanel2. One of the AjaxTabbedPanell panels (P2) contains a DataTable3. Panel P1 has a AjaxFallbackLink. The AjaxFallBackLink's onClick method adds P2 to the AjaxRequestTarget targets. This means, whenever the AjaxFallbackLink is clicked, the mehtod onclick is activated and the method adds P2 to the AjaxRequestTarget list.
4. When the link is clicked, the size() method of the DataTables's SortableDataProvider is called at first.. Then the iterator() method.5. The onBeforeRender methods of P2 and the DataTable are called afterwards.
What I want to do is to provide the DataTable with actual data. So I expected taht the size() and iterator() methods ware called after beforeRender(). But they are called before. Is this the intened behavior?Stefan Lindner
-Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable and AjaxFallbackLink (Wicket 2.0)

2006-11-04 Thread Igor Vaynberg
iterator() should not be called if the panel that has the datatable is not visible and is not about to be painted.but anyways, you can cache the data in the dataprovider for as long as you want, and then just clear the cache whenever you want the state to be requeried from thte db
-igorOn 11/4/06, Stefan Lindner [EMAIL PROTECTED] wrote:
To explain my problem a little bit more:The DataTable is built from a database. To avoid unnecessarytransactions, I want to minimize the access to the database.The SortableDataprovider's size() and iterator() methods are called
every time I display the panel by klicking on his AjaxTabbedPanels'slink.So I place a special link on the page that means now update the contentof all panels in my AjaxTabbedPanel panels. But not all of the Panels in
My AjaxTabbedPanel may be chosen by the user so I do not need to reloadall their contents from database unless the panel is re-displayed. Isthere any event/method I can catch/override that is called before a
Panel is re-displayed? The beforeRender method doesn't the trick,because the size() and iteraotr() methods of the Panels's DataTables arecalled before.Stefan Lindner-
Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable with column styles and widths

2006-11-01 Thread Martijn Dashorst
Yep,

Styling should be done in the css, not on the markup tags. Though
sometimes convenient and I often violate this myself, I cringe
everytime I add a style= attribute to a tag instead of a class=.

Martijn

On 10/31/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
 nothing in the works yet, still trying to figure out the nicest way to do
 this

 niel's idea might be more straightforward but from framework's point of view
 it is too limited and you can further generalize it to

  setStyle(rightadjusted width200) and remove setWidth() completely.

 then the question becomes

 when you call setStyle() on a column - where does that style go? does it go
 onto the th? or the tds?

 -igor



 On 10/31/06, Jan Mikkelsen [EMAIL PROTECTED] wrote:
  I have run into the same requirement and would also like a more elegant
  solution.
  Is something in the works or is there more important stuff to do :) ?
  Personally I prefer Niels' approach because it is very straightforward.
 
  Thanks,
  /Jan
 
 
  Igor Vaynberg wrote:
   i think what would be even better is if icolumn had add(IBehavior)
   that would get attached to the header
  
   right now what you have to do is something like this
  
   new MyColumn() {
Component getHeader() {
   Component c= super.getHeader();
   c.add(new MyAttributeModifier());
  }
   }
  
   which is tricky for newbies to figure out.
  
   -igor
  
  
  
   On 10/14/06, * Niels Bo* [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]  wrote:
  
   Hi
  
   I have this suggestion for an extension to the DataTable component
   that will make it easier to set width and ccs styles individually
   on each column.
  
   It involves these files (attached):
  
IColumn.java - new getWidth() and getStyleName()
AbstractColumn.java - implement default get/set Width and StyleName
 DataTable.html - added colgroupsection
DataTable.java - added a few lines.
  
   Usage like:
 IColumn column = new PropetyColumn(...);
 column.setStyleName(rightadjust);
 column.setWidth(200);
  
   Would this be a useful improvement for other Wicket users?
  
   Niels
  
  
 -
   Using Tomcat but need to do more? Need to support web services,
   security?
   Get stuff done quickly with pre-integrated technology to make your
   job easier
   Download IBM WebSphere Application Server v.1.0.1 based on Apache
   Geronimo
  
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   mailto:Wicket-user@lists.sourceforge.net 
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
  
  
 
  
  
 -
   Using Tomcat but need to do more? Need to support web services,
 security?
   Get stuff done quickly with pre-integrated technology to make your job
 easier
   Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
  
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  
 
  
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
 
 -
  Using Tomcat but need to do more? Need to support web services, security?
  Get stuff done quickly with pre-integrated technology to make your job
 easier
  Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job
 easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user





-- 
a href=http://www.thebeststuffintheworld.com/vote_for/wicket;Vote/a
for a href=http://www.thebeststuffintheworld.com/stuff/wicket;Wicket/a
at the a 

Re: [Wicket-user] DataTable with column styles and widths

2006-10-31 Thread Jan Mikkelsen
I have run into the same requirement and would also like a more elegant 
solution.
Is something in the works or is there more important stuff to do :) ?
Personally I prefer Niels' approach because it is very straightforward.

Thanks,
/Jan


Igor Vaynberg wrote:
 i think what would be even better is if icolumn had add(IBehavior) 
 that would get attached to the header

 right now what you have to do is something like this

 new MyColumn() {
  Component getHeader() {
 Component c= super.getHeader();
 c.add(new MyAttributeModifier());
}
 }

 which is tricky for newbies to figure out.

 -igor



 On 10/14/06, * Niels Bo* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Hi
  
 I have this suggestion for an extension to the DataTable component
 that will make it easier to set width and ccs styles individually
 on each column.
  
 It involves these files (attached):
  
  IColumn.java - new getWidth() and getStyleName()
  AbstractColumn.java - implement default get/set Width and StyleName
  DataTable.html - added colgroupsection
  DataTable.java - added a few lines.
  
 Usage like:
   IColumn column = new PropetyColumn(...);
   column.setStyleName(rightadjust);
   column.setWidth(200);
  
 Would this be a useful improvement for other Wicket users?
  
 Niels

 -
 Using Tomcat but need to do more? Need to support web services,
 security?
 Get stuff done quickly with pre-integrated technology to make your
 job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 https://lists.sourceforge.net/lists/listinfo/wicket-user




 

 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 

 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable with column styles and widths

2006-10-31 Thread Igor Vaynberg
nothing in the works yet, still trying to figure out the nicest way to do thisniel's idea might be more straightforward but from framework's point of view it is too limited and you can further generalize it to
setStyle(rightadjusted width200) and remove setWidth() completely.then the question becomeswhen you call setStyle() on a column - where does that style go? does it go onto the th? or the tds?
-igorOn 10/31/06, Jan Mikkelsen [EMAIL PROTECTED] wrote:
I have run into the same requirement and would also like a more elegantsolution.Is something in the works or is there more important stuff to do :) ?Personally I prefer Niels' approach because it is very straightforward.
Thanks,/JanIgor Vaynberg wrote: i think what would be even better is if icolumn had add(IBehavior) that would get attached to the header right now what you have to do is something like this
 new MyColumn() {Component getHeader() { Component c= super.getHeader(); c.add(new MyAttributeModifier());} } which is tricky for newbies to figure out.
 -igor On 10/14/06, * Niels Bo* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 wrote: Hi I have this suggestion for an extension to the DataTable component that will make it easier to set width and ccs styles individually on each column.
 It involves these files (attached):IColumn.java - new getWidth() and getStyleName()AbstractColumn.java - implement default get/set Width and StyleName
DataTable.html - added colgroupsectionDataTable.java - added a few lines. Usage like: IColumn column = new PropetyColumn(...); column.setStyleName(rightadjust);
 column.setWidth(200); Would this be a useful improvement for other Wicket users? Niels -
 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server 
v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___
 Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user 
https://lists.sourceforge.net/lists/listinfo/wicket-user  -
 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1
 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user-
Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable with column styles and widths

2006-10-20 Thread Igor Vaynberg
i think what would be even better is if icolumn had add(IBehavior) that would get attached to the headerright now what you have to do is something like thisnew MyColumn() {Component getHeader() { Component c=
super.getHeader(); c.add(new MyAttributeModifier()); }}which is tricky for newbies to figure out.-igorOn 10/14/06, 
Niels Bo [EMAIL PROTECTED] wrote:
Hi

I have thissuggestion for an extension totheDataTable component that willmake it easier to set width andccs styles individually on each column.

It involves these files (attached):

IColumn.java - new getWidth() and getStyleName()
AbstractColumn.java - implement default get/set Width and StyleName

DataTable.html - added colgroupsection
DataTable.java - added a few lines. 
Usage like: 
 IColumn column = new PropetyColumn(...);
 column.setStyleName(rightadjust);

 column.setWidth(200); 

Would this be a useful improvement for other Wicket users?

Niels

-Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DataTable with column styles and widths

2006-10-14 Thread Niels Bo
Hi

I have thissuggestion for an extension totheDataTable component that willmake it easier to set width andccs styles individually on each column.

It involves these files (attached):

IColumn.java - new getWidth() and getStyleName()
AbstractColumn.java - implement default get/set Width and StyleName

DataTable.html - added colgroupsection
DataTable.java - added a few lines. 
Usage like: 
 IColumn column = new PropetyColumn(...);
 column.setStyleName(rightadjust);

 column.setWidth(200); 

Would this be a useful improvement for other Wicket users?

Niels


datatable.isazip
Description: Zip compressed data
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable header manipulation

2006-10-07 Thread Leszek Gawron
Igor Vaynberg wrote:
 what if you have two datatables on a page? then your ids are no longer 
 unique.

that is why classes should be used...

-- 
Leszek Gawron

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DataTable header manipulation

2006-10-06 Thread Stefan Lindner
I can manipulate the data grip part of a DataTable by overriding newCellItem. 
But if I e.g. need a speical layout for the table header, I must add a class or 
id attribute to the th elements of the headline (different layout on the left 
and right side e.g.).
I can see no way to manipulate the generation of the headline. O.K. I can 
design my own Toolbar according to HeadersToolbar but in most cases that's much 
too compülicated. Is there an easy way to control the generation of the table 
head?
 
Stefan Lindner
winmail.dat-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable header manipulation

2006-10-06 Thread Leszek Gawron
Stefan Lindner wrote:
 I can manipulate the data grip part of a DataTable by overriding newCellItem. 
 But if I e.g. need a speical layout for the table header, I must add a class 
 or id attribute to the th elements of the headline (different layout on the 
 left and right side e.g.).
 I can see no way to manipulate the generation of the headline. O.K. I can 
 design my own Toolbar according to HeadersToolbar but in most cases that's 
 much too compülicated. Is there an easy way to control the generation of the 
 table head?
  
 Stefan Lindner
I keep having exactly the same problems. DataTable components do not 
carry any css classes so any visual customization/layout is hardly possible.

-- 
Leszek Gawron

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable header manipulation

2006-10-06 Thread Gwyn Evans
I'm not sure about Stefan's requirements, but doesn't the
table.class  thead  tr.headers  th hierarchy let you target the
header sufficiently?

/Gwyn

On 06/10/06, Leszek Gawron [EMAIL PROTECTED] wrote:
 Stefan Lindner wrote:
  I can manipulate the data grip part of a DataTable by overriding 
  newCellItem. But if I e.g. need a speical layout for the table header, I 
  must add a class or id attribute to the th elements of the headline 
  (different layout on the left and right side e.g.).
  I can see no way to manipulate the generation of the headline. O.K. I can 
  design my own Toolbar according to HeadersToolbar but in most cases that's 
  much too compülicated. Is there an easy way to control the generation of 
  the table head?
 
  Stefan Lindner
 I keep having exactly the same problems. DataTable components do not
 carry any css classes so any visual customization/layout is hardly possible.

 --
 Leszek Gawron

-- 
Download Wicket 1.2.2 now! - http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable header manipulation

2006-10-06 Thread Igor Vaynberg
when i look at the markup of the headers toolbar i seewicket:panel tr class=headers  span wicket:id=headers   th wicket:id=headerspan wicket:id=labelnbsp;/span/th
  /span /tr/wicket:panelthat is, i see that the tr carries a class, and the th carries a class. if there is a sortable header then those also carry classes.have you seen the demo of the datatable in examples? it is fully styled.
where else would you want me to add css classes?-IgorOn 10/6/06, Leszek Gawron [EMAIL PROTECTED]
 wrote:Stefan Lindner wrote: I can manipulate the data grip part of a DataTable by overriding newCellItem. But if I 
e.g. need a speical layout for the table header, I must add a class or id attribute to the th elements of the headline (different layout on the left and right side e.g.). I can see no way to manipulate the generation of the headline. 
O.K. I can design my own Toolbar according to HeadersToolbar but in most cases that's much too compülicated. Is there an easy way to control the generation of the table head? Stefan LindnerI keep having exactly the same problems. DataTable components do not
carry any css classes so any visual customization/layout is hardly possible.--Leszek Gawron-Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable header manipulation

2006-10-06 Thread Leszek Gawron
Gwyn Evans wrote:
 I'm not sure about Stefan's requirements, but doesn't the
 table.class  thead  tr.headers  th hierarchy let you target the
 header sufficiently?

e.g. it does not allow me to specify column widths. If every column had 
it's id appended as class like:

th class=column-namename/thth class=column-actionsactions/th

I could set style for column actions to 'width: 1px; white-space: 
nowrap' so it occupies the least space.

This is only a simple use case I got into yesterday.

Same goes for filters toolbar and paging toolbar. In order to do any 
real customization I had to extend the classed and use AttributeAppender 
to set class attribute so the markup is customizable by css.

 public class StyledGoFilter extends GoFilter {
   public StyledGoFilter( String id ) {
   super( id, new Model( filtruj ) );
   getGoButton().add( new AttributeAppender( class, new Model( 
 button ), ; ) );
   add( new AttributeAppender( style, new Model( width: 1px ), 
 ; ) );
   }
 }

 public class StyledTextFilter extends TextFilter {
 
   public StyledTextFilter( String id, IModel model, FilterForm form ) {
   super( id, model, form );
   getFilter().add( new AttributeAppender( style, new Model( 
 width: 99% ), ; ) );
   }
 
 }

Of course the code uses 'class' attributes, I have changed it for the 
example.

I would like to work with single header/column/input in css instead of 
modifying them all at once. Having dynamic class names for every th/td 
in columns allows you to target particular cells.


BTW is there any way to change the paging navigator so it uses something 
else than   ? My users say   gets unreadable.


I'm fairly new to wicket so plase bear my stupidity with patience :)

-- 
Leszek Gawron

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable header manipulation

2006-10-06 Thread Stefan Lindner
If you want to have the first column of a table in a special layout or the 
last, a special css treatment is needed. In this cases it is very helpful to 
have an id-attribute in the td tag. So I overwrite cellContainer
 
 
@Override

protected Item newCellItem(MarkupContainer cellContainer, final String id, int 
index, final IModel model) {

cellContainer.add(new AttributeModifier(id, true, new 
ModelString(BLAFASELTRALALA)));

Item item = new Item(cellContainer, id, index, model);

int columns = getColumns().length;

String idAttribute = single;

if (columns  1) {

if (index == 0)

idAttribute = left;

else if (index == columns - 1)

idAttribute = right;

else

idAttribute = middle;

}

item.add(new AttributeModifier(id, true, new ModelString(idAttribute)));

return item;

}

 

 

 

And each cell is marked as left, middle or right or single if the table 
has only on column. Now I can easily do things like this in css:

#left { border-left: 2px solid rgb(34,69,104);
}

To complete the appearence, it would be nice to have the same thing for the 
table header. Yes, of cource, I saw the examle cde and the resulting tables 
look very pretty, but the customer's whish

I think, the integration of something like the above code would help some 
people (see Leszek Gawron's reply)

 

Stefan Lindner


winmail.dat-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable header manipulation

2006-10-06 Thread Igor Vaynberg
what if you have two datatables on a page? then your ids are no longer unique.On 10/6/06, Stefan Lindner [EMAIL PROTECTED]
 wrote:If you want to have the first column of a table in a special layout or the last, a special css treatment is needed. In this cases it is very helpful to have an id-attribute in the td tag. So I overwrite cellContainer
@Overrideprotected Item newCellItem(MarkupContainer cellContainer, final String id, int index, final IModel model) {cellContainer.add(new AttributeModifier(id, true, new ModelString(BLAFASELTRALALA)));
Item item = new Item(cellContainer, id, index, model);int columns = getColumns().length;String idAttribute = single;if (columns  1) {if (index == 0)idAttribute = left;
else if (index == columns - 1)idAttribute = right;elseidAttribute = middle;}item.add(new AttributeModifier(id, true, new ModelString(idAttribute)));
return item;}And each cell is marked as left, middle or right or single if the table has only on column. Now I can easily do things like this in css:
#left { border-left: 2px solid rgb(34,69,104);}To complete the appearence, it would be nice to have the same thing for the table header. Yes, of cource, I saw the examle cde and the resulting tables look very pretty, but the customer's whish
I think, the integration of something like the above code would help some people (see Leszek Gawron's reply)Stefan Lindner-
Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable header manipulation

2006-10-06 Thread Stefan Lindner
I think there are two cases:
1. Improve the look of all tables generated by DefaultDataTable
   This can be done by adding id and class attributes to th and td
2. Tune the appearence of a special table.
   This can still be done by surrounding the table with a span tag
having an id. E.g.
 HTML:
 span id=mySpecialTable wicket:id=tableHere goes the
table/span


 Css:
 #mySpecialTable ... {
 }

Wicket will never be able to serve any of the designers needs out of the
box. If I need a speical DataTable, I can modify the existing one. And
in this case, it would be nice to have a method to override that
controls header generation and not to write a header for my own.

Stefan Lindner


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable header manipulation

2006-10-06 Thread Igor Vaynberg
lets see a patch of what you want-IgorOn 10/6/06, Stefan Lindner [EMAIL PROTECTED] wrote:
I think there are two cases:1. Improve the look of all tables generated by DefaultDataTable
 This can be done by adding id and class attributes to th and td2. Tune the appearence of a special table. This can still be done by surrounding the table with a span taghaving an id. 
E.g. HTML: span id=mySpecialTable wicket:id=tableHere goes thetable/span Css: #mySpecialTable ... { }Wicket will never be able to serve any of the designers needs out of the
box. If I need a speical DataTable, I can modify the existing one. Andin this case, it would be nice to have a method to override thatcontrols header generation and not to write a header for my own.Stefan Lindner
-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Datatable/displaying,editing,adding,deleting

2006-09-25 Thread Nino Wael
Are there any example on howto do this?

-Nino


-Original Message-
From:   [EMAIL PROTECTED] on behalf of Igor Vaynberg
Sent:   Mon 25-09-2006 07:21
To: wicket-user@lists.sourceforge.net
Cc: 
Subject:Re: [Wicket-user] Datatable/displaying,editing,adding,deleting

there is nothing because its trivial to build

just a datatable and a column whose markup comes from a fragment that has
add/edit/delete/whatever links.

-Igor


On 9/24/06, Nino Wael [EMAIL PROTECTED] wrote:

 Hi

 Whats the bedst component for showing a database table and doing
 mantainance. Idea is to be able to delete, add, update the table from the
 component. I've been looking at the repeater component, but im not sure if
 there is any thing that already has the exact functionallity.

 regards


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user






winmail.dat-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Datatable/displaying,editing,adding,deleting

2006-09-25 Thread Igor Vaynberg
there is one in wicket-phonebook that is in wicket-stuff's svn. it uses a panel instead of a fragment i think, but that is just a matter of where the markup comes from.-Igor
On 9/24/06, Nino Wael [EMAIL PROTECTED] wrote:
Are there any example on howto do this?-Nino-Original Message-From: [EMAIL PROTECTED] on behalf of Igor Vaynberg
Sent: Mon 25-09-2006 07:21To: wicket-user@lists.sourceforge.netCc:Subject:Re: [Wicket-user] Datatable/displaying,editing,adding,deleting
there is nothing because its trivial to buildjust a datatable and a column whose markup comes from a fragment that hasadd/edit/delete/whatever links.-IgorOn 9/24/06, Nino Wael 
[EMAIL PROTECTED] wrote: Hi Whats the bedst component for showing a database table and doing mantainance. Idea is to be able to delete, add, update the table from the
 component. I've been looking at the repeater component, but im not sure if there is any thing that already has the exact functionallity. regards -
 Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT  business topics through brief surveys -- and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___
 Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Datatable/displaying,editing,adding,deleting

2006-09-24 Thread Nino Wael
Hi

Whats the bedst component for showing a database table and doing mantainance. 
Idea is to be able to delete, add, update the table from the component. I've 
been looking at the repeater component, but im not sure if there is any thing 
that already has the exact functionallity.

regards

winmail.dat-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Datatable/displaying,editing,adding,deleting

2006-09-24 Thread Igor Vaynberg
there is nothing because its trivial to buildjust a datatable and a column whose markup comes from a fragment that has add/edit/delete/whatever links.-IgorOn 9/24/06, 
Nino Wael [EMAIL PROTECTED] wrote:
HiWhats the bedst component for showing a database table and doing mantainance. Idea is to be able to delete, add, update the table from the component. I've been looking at the repeater component, but im not sure if there is any thing that already has the exact functionallity.
regards-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DataTable toolbars result in invalid HTML

2006-08-18 Thread Jan Schlosser
Hi all,

the resulting HTML of extension's DataTable (with toolbars) renders  
invalid according to the HTML specs:

Java:

 IColumn[] columns = new IColumn[2];
 columns[0] = new PropertyColumn(new Model(foo), foo);
 columns[1] = new PropertyColumn(new Model(bar), bar);

 IDataProvider provider = new EmptyDataProvider();

 DataTable table = new DataTable(table, columns, provider, 20);
 table.addTopToolbar(new HeadersToolbar(table, null));

 add(table);

Markup:

 table wicket:id=table/table

results in following rendered HTML:

 table
   thead
   span
   tr class=headers
   thspanfoo/span/th
   thspanbar/span/th
   /tr
   /span
   /thead
   tbody

   /tbody
   tfoot

   /tfoot
 /table

According to (X)HTML's definition thead may only contain tr tags.  
Here we've got span in between, such that the HTML is not valid  
according to the specs.

I had a look into DataTable's source and found out that toolbars are  
made of RepeaterViews. From my knowledge with Wicket setting  
setRenderBodyOnly(true) on both topToolbars and bottomToolbars (which  
are of type RepeaterView) in DataTable.java should have made the  
trick. But it didn't. span is always rendered.

Is there anything I missed?

Regards,
Jan

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable toolbars result in invalid HTML

2006-08-18 Thread Igor Vaynberg
fixed calling setrenderbodyonly on the repeaters has no effect because repeaters themselves render no markup.if you look at the markup:thead span wicket:id=topToolbars
  span wicket:id=toolbar/span /span/theadthe first span was already supressed by calling item.setRenderBodyOnly(true); on the direct child of the repeater
the second span is actually owned by the toolbar component - so to supress it you have to call toolbar.setRenderBodyOnly(true);-IgorOn 8/18/06, 
Jan Schlosser [EMAIL PROTECTED] wrote:
Hi all,the resulting HTML of extension's DataTable (with toolbars) rendersinvalid according to the HTML specs:Java: IColumn[] columns = new IColumn[2]; columns[0] = new PropertyColumn(new Model(foo), foo);
 columns[1] = new PropertyColumn(new Model(bar), bar); IDataProvider provider = new EmptyDataProvider(); DataTable table = new DataTable(table, columns, provider, 20);
 table.addTopToolbar(new HeadersToolbar(table, null)); add(table);Markup: table wicket:id=table/tableresults in following rendered HTML:
 table thead span tr class=headers thspanfoo/span/th
 thspanbar/span/th /tr /span /thead tbody /tbody
 tfoot /tfoot /tableAccording to (X)HTML's definition thead may only contain tr tags.Here we've got span in between, such that the HTML is not valid
according to the specs.I had a look into DataTable's source and found out that toolbars aremade of RepeaterViews. From my knowledge with Wicket settingsetRenderBodyOnly(true) on both topToolbars and bottomToolbars (which
are of type RepeaterView) in DataTable.java should have made thetrick. But it didn't. span is always rendered.Is there anything I missed?Regards,Jan-
Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DataTable with Multi Selection

2006-04-12 Thread Jin Zhu
Hi,I am trying to use DataTable to provide multiple row selection. The row selections will be recorded and processed when the form is submitted. What's the best way of doing this? Or is it possible at all?In general, can each row of the DataTable be rendered as a check box for any boolean value of the model?Thanks,  Jin
		How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

Re: [Wicket-user] DataTable with Multi Selection

2006-04-12 Thread Igor Vaynberg
sure, just put the table in the form and create an IColumn that adds a panel/fragment with a checkbox in it.-IgorOn 4/12/06, Jin Zhu 
[EMAIL PROTECTED] wrote:Hi,  
  I am trying to use DataTable to provide multiple row selection. The row selections will be recorded and processed when the form is submitted. What's the best way of doing this? Or is it possible at all?  
  In general, can each row of the DataTable be rendered as a check box for any boolean value of the model?Thanks,  Jin

		How low will we go? Check out Yahoo! Messenger's low 
 PC-to-Phone call rates.



RE: [Wicket-user] DataTable formatting

2006-04-11 Thread Frank Silbermann








The CSS attribute empty-cells: show
works in Mozilla, but not in IE 6.0  are there any work-arounds?



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick Heudecker
Sent: Monday, April 10, 2006 4:12
PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable formatting



Have you tried the CSS attribute 'empty-cells: show;'
?



On 4/10/06, Frank Silbermann [EMAIL PROTECTED] 
wrote:



To draw lines separating every cell in my DataTable I tried: table border=1 wicket:id=datatableas Igor recommended. It worked fine, except for when the IDataProvider provided either a null or an empty string for a particular cell. Then the line separators were missing. Do you think the more complex CSS approach would do better?--or even table border=1 wicket:id=datatable-IgorOn 3/31/06, Igor Vaynberg [EMAIL PROTECTED] wrote: style table.datatable td { border:0; border-bottom: 1px solid black; border-right: 1px solid black; } /style table class=datatable wicket:id=datatable . -Igor On 3/31/06, Frank Silbermann [EMAIL PROTECTED] wrote:   Is there a way to make the DataTable draw a line between every row and  column ? like a grid? 


















Re: [Wicket-user] DataTable formatting

2006-04-11 Thread Nick Heudecker
It works in IE as well, depending on the contents of the TD. Can you paste a bit of the markup?On 4/11/06, Frank Silbermann 
[EMAIL PROTECTED] wrote:


















The CSS attribute 'empty-cells: show'
works in Mozilla, but not in IE 6.0 – are there any work-arounds?



-Original Message-
From: [EMAIL PROTECTED]

[mailto:[EMAIL PROTECTED]] On Behalf Of 
Nick Heudecker
Sent: Monday, April 10, 2006 4:12
PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable formatting



Have you tried the CSS attribute 'empty-cells: show;'
?



On 4/10/06, Frank Silbermann 
[EMAIL PROTECTED] 
wrote:



To draw lines separating every cell in my DataTable I tried:

 table border=1 wicket:id=datatable

as Igor recommended. It worked fine, except for when the IDataProvider provided either a null or an empty string for a particular cell.
 Then the line separators were missing. Do you think the more complex CSS approach would do better?
--
or even table border=1 wicket:id=datatable
-Igor

On 
3/31/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

 style table.datatable td { border:0; border-bottom: 1px solid black;
 border-right: 1px solid black; } /style
 table class=datatable wicket:id=datatable
 .

 -Igor


 On 3/31/06, Frank Silbermann 
[EMAIL PROTECTED] wrote:
 
  Is there a way to make the DataTable draw a line between every row and
  column ? like a grid?
 





















RE: [Wicket-user] DataTable formatting

2006-04-10 Thread Frank Silbermann






To draw lines separating every cell in my DataTable I tried: table border=1 wicket:id=datatableas Igor recommended. It worked fine, except for when the IDataProvider provided either a null or an empty string for a particular cell. Then the line separators were missing. Do you think the more complex CSS approach would do better?--or even table border=1 wicket:id=datatable-IgorOn 3/31/06, Igor Vaynberg [EMAIL PROTECTED] wrote: style table.datatable td { border:0; border-bottom: 1px solid black; border-right: 1px solid black; } /style table class=datatable wicket:id=datatable . -Igor On 3/31/06, Frank Silbermann [EMAIL PROTECTED] wrote:   Is there a way to make the DataTable draw a line between every row and  column ? like a grid? 










Re: [Wicket-user] DataTable formatting

2006-04-10 Thread Nick Heudecker
Have you tried the CSS attribute 'empty-cells: show;' ?On 4/10/06, Frank Silbermann [EMAIL PROTECTED]
 wrote:















To draw lines separating every cell in my DataTable I tried:
 table border="1" wicket:id="datatable"
as Igor recommended. It worked fine, except for when the IDataProvider provided either a null or an empty string for a particular cell.
 Then the line separators were missing. Do you think the more complex CSS approach would do better?
--or even table border=1 wicket:id=datatable
-Igor
On 
3/31/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
 style table.datatable td { border:0; border-bottom: 1px solid black;
 border-right: 1px solid black; } /style
 table class=datatable wicket:id=datatable
 .
 -Igor
 On 
3/31/06, Frank Silbermann [EMAIL PROTECTED] wrote:
   Is there a way to make the DataTable draw a line between every row and
  column ? like a grid?
 












RE: [Wicket-user] DataTable formatting

2006-04-10 Thread Frank Silbermann








Thank you!



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick Heudecker
Sent: Monday, April 10, 2006 4:12
PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable formatting



Have you tried the CSS attribute 'empty-cells: show;'
?



On 4/10/06, Frank Silbermann [EMAIL PROTECTED] 
wrote:



To draw lines separating every cell in my DataTable I tried: table border=1 wicket:id=datatableas Igor recommended. It worked fine, except for when the IDataProvider provided either a null or an empty string for a particular cell. Then the line separators were missing. Do you think the more complex CSS approach would do better?--or even table border=1 wicket:id=datatable-IgorOn 3/31/06, Igor Vaynberg [EMAIL PROTECTED] wrote: style table.datatable td { border:0; border-bottom: 1px solid black; border-right: 1px solid black; } /style table class=datatable wicket:id=datatable . -Igor On 3/31/06, Frank Silbermann [EMAIL PROTECTED] wrote:   Is there a way to make the DataTable draw a line between every row and  column ? like a grid? 


















[Wicket-user] DataTable formatting

2006-03-31 Thread Frank Silbermann








Is there a way to make the DataTable draw a line between every row and column 
like a grid?








Re: [Wicket-user] DataTable formatting

2006-03-31 Thread Igor Vaynberg
style table.datatable td { border:0; border-bottom: 1px solid black; border-right: 1px solid black; } /styletable class=datatable wicket:id=datatable.
-IgorOn 3/31/06, Frank Silbermann [EMAIL PROTECTED] wrote:



















Is there a way to make the DataTable draw a line between every row and column –
like a grid?









Re: [Wicket-user] DataTable formatting

2006-03-31 Thread Igor Vaynberg
or even table border=1 wicket:id=datatable-IgorOn 3/31/06, Igor Vaynberg 
[EMAIL PROTECTED] wrote:style table.datatable
 td { border:0; border-bottom: 1px solid black; border-right: 1px solid black; } /styletable class=datatable wicket:id=datatable.

-IgorOn 3/31/06, Frank Silbermann 
[EMAIL PROTECTED] wrote:



















Is there a way to make the DataTable draw a line between every row and column –
like a grid?











[Wicket-user] DataTable and IDataProvider question

2006-03-24 Thread Frank Silbermann








I am working with a database that is kind
of strange. Someone provides a new
table with each days data. Thus,
the database can cause an SQLException as a normal result for the use case
where the user requests data that hasnt been produced yet.



When my Iterator IDataprovider.iterate(int
first, int count) method is called and I go to the database, I would
like to handle the SQLException to call void Component.setResponsePage(
Class.responsePage) to tell the user what has happened, passing in
PageParameters to enable the user to continue.



It seems that DataTable does not like me
jumping out of the iterate(first,count) method like that. It tries to set the ResponsePage to the
Wicket error page, which causes a serious failure saying that one cannot set
the ResponsePage twice.



What are my options for solving this
problem?



Is it simply a matter of making my iterate(first,count)
return an empty iterator to satisfy the DataTable caller before my setResponsePage()
can take effect? 



Here is the relevant section from the
Tomcat logfile:



Mar 24, 2006 8:11:03 AM org.apache.catalina.core.ApplicationContext log

INFO:
org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News /
Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule:
Redirect URL: http://jakarta.apache.org]]

Mar 24, 2006 8:11:03 AM org.apache.catalina.core.ApplicationContext log

INFO: ContextListener:
contextInitialized()

Mar 24, 2006 8:11:03 AM org.apache.catalina.core.ApplicationContext log

INFO: SessionListener:
contextInitialized()

Mar 24, 2006 8:11:10 AM org.apache.catalina.core.ApplicationContext log

INFO: ContextListener:
contextInitialized()

Mar 24, 2006 8:11:10 AM org.apache.catalina.core.ApplicationContext log

INFO: SessionListener:
contextInitialized()

Mar 24, 2006 8:11:20 AM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet
MEM_Application threw exception

wicket.WicketRuntimeException: Internal
Error: Could not render error page class
wicket.markup.html.pages.InternalErrorPage

 at
wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:106)

 at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76)

 at
wicket.RequestCycle.step(RequestCycle.java:971)

 at
wicket.RequestCycle.steps(RequestCycle.java:1005)

 at
wicket.RequestCycle.request(RequestCycle.java:451)

 at
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:212)

 at
wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:250)

 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)

 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)

 at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

 at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

 at
java.lang.Thread.run(Thread.java:595)

Caused by: wicket.WicketRuntimeException:
Already redirecting to '/MEMSpssWebModule/mem?wicket:interface=:0:1:'. Cannot
redirect more than once

 at
wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:88)

 at
wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:205)

 at
wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:60)

 at
wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49)

 at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66)

 at
wicket.RequestCycle.respond(RequestCycle.java:877)

 at
wicket.RequestCycle.step(RequestCycle.java:946)

 ...
20 more

Mar 24, 

Re: [Wicket-user] DataTable and IDataProvider question

2006-03-24 Thread Igor Vaynberg
how did it crash? what was the output?another thing is cant you try this before the datatable is even rendering? why do the check so late in the game?-IgorOn 3/24/06, 
Frank Silbermann [EMAIL PROTECTED] wrote:



















I'm using 1.2 B2



-Original Message-

From:
[EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]]
On Behalf Of Igor Vaynberg
Sent: Friday, March 24, 2006 10:41
AM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable and IDataProvider question



request cycle. are you using 1.2 head?


-Igor





On 3/24/06, Frank Silbermann 
[EMAIL PROTECTED] 
wrote:





I did that, and it
crashed. Who is supposed to catch the RestartResponseException to restart
the response? 







-Original Message-
From: [EMAIL PROTECTED]

[mailto:[EMAIL PROTECTED]]
On Behalf Of Igor Vaynberg
Sent: Friday, March 24, 2006 10:13
AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable and IDataProvider question



try throwing RestartResponseException.

-Igor



On 3/24/06, Frank
Silbermann 
[EMAIL PROTECTED]  wrote:





I am working with a database
that is kind of strange. Someone provides a new table with each day's
data. Thus, the database can cause an SQLException as a normal result for
the use case where the user requests data that hasn't been produced yet.



When my Iterator
IDataprovider.iterate(int first, int count) method is called and I go to
the database, I would like to handle the SQLException to call void
Component.setResponsePage( Class.responsePage) to tell the user what has
happened, passing in PageParameters to enable the user to continue.



It seems that DataTable
does not like me jumping out of the iterate(first,count) method
like that. It tries to set the ResponsePage to the Wicket error page,
which causes a serious failure saying that one cannot set the ResponsePage twice.



What are my options for
solving this problem?



Is it simply a matter of
making my iterate(first,count) return an empty iterator to satisfy the
DataTable caller before my setResponsePage() can take effect?




Here is the relevant section
from the Tomcat logfile:



Mar 24, 2006 8:11:03 AM
org.apache.catalina.core.ApplicationContext log

INFO:
org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News /
Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]



Mar 24, 2006 8:11:03 AM org.apache.catalina.core.ApplicationContext
log

INFO: ContextListener:
contextInitialized()

Mar 24, 2006 8:11:03 AM
org.apache.catalina.core.ApplicationContext log

INFO: SessionListener:
contextInitialized()

Mar 24, 2006 8:11:10 AM
org.apache.catalina.core.ApplicationContext log

INFO: ContextListener:
contextInitialized()

Mar 24, 2006 8:11:10 AM
org.apache.catalina.core.ApplicationContext log

INFO: SessionListener:
contextInitialized()

Mar 24, 2006 8:11:20 AM
org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service()
for servlet MEM_Application threw exception

wicket.WicketRuntimeException:
Internal Error: Could not render error page class
wicket.markup.html.pages.InternalErrorPage


at wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:106)


at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76)


at wicket.RequestCycle.step(RequestCycle.java:971)


at wicket.RequestCycle.steps(RequestCycle.java:1005)


at wicket.RequestCycle.request(RequestCycle.java:451)


at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:212)


at wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:250)


at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)


at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)


at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)


at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)


at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)


at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)


at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)


at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)


at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)


at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)


at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection

RE: [Wicket-user] DataTable and IDataProvider question

2006-03-24 Thread Frank Silbermann








Are we not expected to go to the database
when the iterate(first, count) method is called? Thats when the database tells me (through
an SQLException) that the table hasnt been created yet.



I am beginning to wonder about assumed
invariants that I did not take into consideration in my current design. When the user changes some query
parameters, then the next page refresh should replace the data in the table
based on the new query. Ive
assumed that I can handle this merely by changing the results returned by
IDataprovider.iterate(first, count), but now Im beginning to wonder.



A change in the query changes the result
of IDataProvider.size(). If DataTable
does not deal will with changing data sizes, maybe I have to respond to a
change in SQL query at a higher level  not merely to have the
IDataProvider reflect the changes, but to replace the whole table. What do you think? Anyway, here is the result I got. Do you need the log file? (Or do I just need to back up and
realize that the DataTable is not quite as flexible as Id assumed.)



type Exception report

message 

description The server encountered an
internal error () that prevented it from fulfilling this request.

exception 

wicket.WicketRuntimeException: Internal Error: Could not render error page class wicket.markup.html.pages.InternalErrorPage wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:106) wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76) wicket.RequestCycle.step(RequestCycle.java:971) wicket.RequestCycle.steps(RequestCycle.java:1005) wicket.RequestCycle.request(RequestCycle.java:451) wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:212) wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:250) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root
cause is available in the Apache Tomcat/5.5.9 logs.









-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg
Sent: Friday, March 24, 2006 11:06
AM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable and IDataProvider question



how did it crash? what was the output?

another thing is cant you try this before the datatable is even rendering? why
do the check so late in the game?

-Igor





On 3/24/06, Frank Silbermann [EMAIL PROTECTED]
wrote:





I'm using 1.2 B2







-Original
Message- 
From: [EMAIL PROTECTED]
[mailto:
[EMAIL PROTECTED]] On
Behalf Of Igor Vaynberg





Sent: Friday, March 24, 2006 10:41 AM
To: wicket-user@lists.sourceforge.net
Subject: Re:
[Wicket-user] DataTable and IDataProvider question







request cycle. are you using 1.2 head?


-Igor



On 3/24/06, Frank
Silbermann 
[EMAIL PROTECTED]  wrote:





I did that, and it
crashed. Who is supposed to catch the RestartResponseException to restart
the response? 







-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Igor Vaynberg
Sent: Friday, March 24, 2006 10:13
AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable and IDataProvider question



try throwing RestartResponseException.

-Igor



On 3/24/06, Frank
Silbermann 
[EMAIL PROTECTED]  wrote:





I am working with a
database that is kind of strange. Someone provides a new table with each
day's data. Thus, the database can cause an SQLException as a normal
result for the use case where the user requests data that hasn't been produced
yet.



When my Iterator
IDataprovider.iterate(int first, int count) method is called and I go to
the database, I would like to handle the SQLException to call void
Component.setResponsePage( Class.responsePage) to tell the user what has
happened, passing in PageParameters to enable the user to continue.



It seems that DataTable
does not like me jumping out of the iterate(first,count) method
like that. It tries to set the ResponsePage to the Wicket error page,
which causes a serious failure saying that one cannot set the ResponsePage
twice.



What are my options for
solving this problem?



Is it simply a matter of
making my iterate(first,count) return an empty iterator to satisfy the
DataTable caller before my setResponsePage() can take effect?




Here is the relevant
section from the Tomcat logfile:



Mar 24, 2006 8:11:03 AM
org.apache.catalina.core.ApplicationContext log

INFO:
org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News /
Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http

Re: [Wicket-user] DataTable and IDataProvider question

2006-03-24 Thread Igor Vaynberg
it should work just fine for varying sizes. i really dont understand where your problem is.i modified the examples DataTablePage with the following and it worked just fine, not sure what its not working for you:
add(new DefaultDataTable(table, columns, new SortableDataProvider() {   public Iterator iterator(int first, int count)   {throw new RestartResponseException(new GridViewPage());
   }  public int size()   {throw new RestartResponseException(new GridViewPage());   }   public IModel model(Object object)
   {// TODO Auto-generated method stubreturn null;   }  }, 8));-IgorOn 3/24/06, 
Frank Silbermann [EMAIL PROTECTED] wrote:

















Are we not expected to go to the database
when the "iterate(first, count)" method is called? That's when the database tells me (through
an SQLException) that the table hasn't been created yet.



I am beginning to wonder about assumed
invariants that I did not take into consideration in my current design. When the user changes some query
parameters, then the next page refresh should replace the data in the table
based on the new query. I've
assumed that I can handle this merely by changing the results returned by
IDataprovider.iterate(first, count), but now I'm beginning to wonder.



A change in the query changes the result
of IDataProvider.size(). If DataTable
does not deal will with changing data sizes, maybe I have to respond to a
change in SQL query at a higher level – not merely to have the
IDataProvider reflect the changes, but to replace the whole table. What do you think? Anyway, here is the result I got. Do you need the log file? (Or do I just need to back up and
realize that the DataTable is not quite as flexible as I'd assumed.)



type Exception report

message 

description The server encountered an
internal error () that prevented it from fulfilling this request.

exception 

wicket.WicketRuntimeException: Internal Error: Could not render error page class wicket.markup.html.pages.InternalErrorPage
 wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java
:106) wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond
(AbstractCompoundRequestCycleProcessor.java:76) wicket.RequestCycle.step
(RequestCycle.java:971) wicket.RequestCycle.steps(RequestCycle.java
:1005) wicket.RequestCycle.request(RequestCycle.java:451)
 wicket.protocol.http.WicketServlet.doGet(WicketServlet.java
:212) wicket.protocol.http.WicketServlet.doPost(WicketServlet.java
:250) javax.servlet.http.HttpServlet.service(HttpServlet.java
:709) javax.servlet.http.HttpServlet.service(HttpServlet.java
:802)

note The full stack trace of the root
cause is available in the Apache Tomcat/5.5.9 logs.









-Original Message-

From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of 
Igor Vaynberg
Sent: Friday, March 24, 2006 11:06
AM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable and IDataProvider question



how did it crash? what was the output?

another thing is cant you try this before the datatable is even rendering? why
do the check so late in the game?

-Igor





On 3/24/06, Frank Silbermann 
[EMAIL PROTECTED]
wrote:





I'm using 1.2 B2







-Original
Message- 
From: [EMAIL PROTECTED]

[mailto:
[EMAIL PROTECTED]] On
Behalf Of Igor Vaynberg





Sent:
 Friday, March 24, 2006 10:41 AM
To: wicket-user@lists.sourceforge.net

Subject: Re:
[Wicket-user] DataTable and IDataProvider question







request cycle. are you using 1.2 head?


-Igor



On 3/24/06, Frank
Silbermann 
[EMAIL PROTECTED]  wrote:





I did that, and it
crashed. Who is supposed to catch the RestartResponseException to restart
the response? 







-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Igor Vaynberg
Sent: Friday, March 24, 2006 10:13
AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable and IDataProvider question



try throwing RestartResponseException.

-Igor



On 3/24/06, Frank
Silbermann 
[EMAIL PROTECTED]  wrote:





I am working with a
database that is kind of strange. Someone provides a new table with each
day's data. Thus, the database can cause an SQLException as a normal
result for the use case where the user requests data that hasn't been produced
yet.



When my Iterator
IDataprovider.iterate(int first, int count) method is called and I go to
the database, I would like to handle the SQLException to call void
Component.setResponsePage( Class.responsePage) to tell the user what has
happened, passing in PageParameters to enable the user to continue.



It seems that DataTable
does not like me jumping out of the iterate(first,count) method
like that. It tries to set the ResponsePage to the Wicket error page,
which causes a serious failure saying that one cannot set the ResponsePage
twice.



What are my options for
solving this problem?



Is it simply a matter of
making my iterate(first,cou

Re: [Wicket-user] DataTable

2006-02-26 Thread Justin Lee
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

You could always add subclasses of AbstractColumn to provide whatever
data you wanted.  That combined with Fragments gives you loads of
flexibility.

Frank Silbermann wrote:
 In Wicket-Examples, Repeaters, there's an example of a DataTable from
 Wicket-Extensions.  The data provider supplies lists of javabeans, each
 bean representing a row in the table.  The PropertyColumn object for
 each column of the table gives information about the column title, its
 sortability, and the non-OGNL string used for pulling a cell's data out
 of the bean.
 
 In this example, the column names are hardcoded as bean properties, but
 what I want is to display any arbitrary JDBC ResultSet in a DataTable.
 Has anyone written code to do that?  (And if so, could I see it?
 ASP.NET has this feature, and I'm rewriting code that uses it.)
 
 If not, I was thinking that I could implement IDataProvider to contain
 information about the number and names of the columns taken from the
 ResultSetMetaData.  
 
 The data provider would hold a list of row objects, each of which would
 be (or contain) an indexed sequence (an Array or ArrayList) of atomic
 data objects, obtained by calling resultSet.getObject(index) varying
 index within the column count.
 
 My subclass of DataTable would be constructed with this data provider as
 an argument.  A loop (indexed within the column count) would create a
 list of PropertyColumn objects -- each with the display model based on
 the column name recorded from the ResultSetMetaData, and a non-OGNL
 property expression that makes use of List/Array indexing to access the
 specific field in the row.
 
 Does this sound like a good approach, or am I re-inventing the wheel
 here?
 
 
 ---
 This SF.Net email is sponsored by xPML, a groundbreaking scripting language
 that extends applications into web and mobile media. Attend the live webcast
 and join the prime developer group breaking into this new coding territory!
 http://sel.as-us.falkag.net/sel?cmd___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

- --
Justin Lee
http://www.antwerkz.com
AIM : evan chooly
720.299.0101
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (Cygwin)

iD8DBQFEAiRwJnQfEGuJ90MRAzGxAJ91Zad4B32tAanSJVWzXTsPoVLlAACeIh0h
rllYzFJZHttgUUd2MwDDwn4=
=JJWl
-END PGP SIGNATURE-


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DataTable

2006-02-24 Thread Frank Silbermann
In Wicket-Examples, Repeaters, there's an example of a DataTable from
Wicket-Extensions.  The data provider supplies lists of javabeans, each
bean representing a row in the table.  The PropertyColumn object for
each column of the table gives information about the column title, its
sortability, and the non-OGNL string used for pulling a cell's data out
of the bean.

In this example, the column names are hardcoded as bean properties, but
what I want is to display any arbitrary JDBC ResultSet in a DataTable.
Has anyone written code to do that?  (And if so, could I see it?
ASP.NET has this feature, and I'm rewriting code that uses it.)

If not, I was thinking that I could implement IDataProvider to contain
information about the number and names of the columns taken from the
ResultSetMetaData.  

The data provider would hold a list of row objects, each of which would
be (or contain) an indexed sequence (an Array or ArrayList) of atomic
data objects, obtained by calling resultSet.getObject(index) varying
index within the column count.

My subclass of DataTable would be constructed with this data provider as
an argument.  A loop (indexed within the column count) would create a
list of PropertyColumn objects -- each with the display model based on
the column name recorded from the ResultSetMetaData, and a non-OGNL
property expression that makes use of List/Array indexing to access the
specific field in the row.

Does this sound like a good approach, or am I re-inventing the wheel
here?


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataTable

2006-02-24 Thread Igor Vaynberg
this would be easier if you dont use the property columnjust create a subclass of abstract column that holds the index of the column and calls the appropriate getObject() on the result set.-Igor
On 2/24/06, Frank Silbermann [EMAIL PROTECTED] wrote:
In Wicket-Examples, Repeaters, there's an example of a DataTable fromWicket-Extensions.The data provider supplies lists of javabeans, eachbean representing a row in the table.The PropertyColumn object foreach column of the table gives information about the column title, its
sortability, and the non-OGNL string used for pulling a cell's data outof the bean.In this example, the column names are hardcoded as bean properties, butwhat I want is to display any arbitrary JDBC ResultSet in a DataTable.
Has anyone written code to do that?(And if so, could I see it?ASP.NET has this feature, and I'm rewriting code that uses it.)If not, I was thinking that I could implement IDataProvider to contain
information about the number and names of the columns taken from theResultSetMetaData.The data provider would hold a list of row objects, each of which wouldbe (or contain) an indexed sequence (an Array or ArrayList) of atomic
data objects, obtained by calling resultSet.getObject(index) varyingindex within the column count.My subclass of DataTable would be constructed with this data provider asan argument.A loop (indexed within the column count) would create a
list of PropertyColumn objects -- each with the display model based onthe column name recorded from the ResultSetMetaData, and a non-OGNLproperty _expression_ that makes use of List/Array indexing to access the
specific field in the row.Does this sound like a good approach, or am I re-inventing the wheelhere?---This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcastand join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnkkid0944bid$1720dat1642___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user