[Wicket-user] Why item.getIndex() always zero?

2006-09-14 Thread wq

..
int c = 0; 
..
List columns = new ArrayList();
columns.add(new AbstractColumn(new Model(操作)){
public void populateItem(Item cellItem, String 
componentId, IModel
model){
c += cellItem.getIndex()+ 1;

System.out.println(cellItem.getIndex():+cellItem.getIndex());
System.out.println(c:+c);
cellItem.add(new ActionPanel(componentId, 
model));
}
});
..
add(new DefaultDataTable(table, columns, new ColumnDataProvider(),50));
..


the Class ColumnDataProvider extends SortableDataProvider.

cellItem.getIndex() always return 0.why?


-- 
View this message in context: 
http://www.nabble.com/Why-item.getIndex%28%29-always-zero--tf2270996.html#a6303776
Sent from the Wicket - User forum 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] Why item.getIndex() always zero?

2006-09-14 Thread wq

List columns = new ArrayList();
columns.add(new AbstractColumn(new Model(操作)){
public void populateItem(Item cellItem, String 
componentId, IModel
model){
rowIndex += cellItem.getIndex()+ 1;

//System.out.println(cellItem.getIndex():+cellItem.getIndex());
//System.out.println(c:+c);
cellItem.add(new ActionPanel(componentId, 
model));
}
});
columns.add(new PropertyColumn(new Model(ID), id));
columns.add(new AbstractColumn(new Model(display)) {
public void populateItem(Item cellItem, String 
componentId, IModel
rowModel) {
cellItem.add(new 
TitlePanel(componentId,rowModel));
}

});
columns.add(new PropertyColumn(new Model(type), 
strClmType));
columns.add(new PropertyColumn(new Model(control), 
activeDate));

...
I could misUnderstand your means but there are many columns  and many
ActionPanel.




Martijn Dashorst-4 wrote:
 
 Because the cellItems are the column items...
 
 You only have one column, so it will always return 0 (first column).
 
 Martijn
 
 On 9/14/06, wq [EMAIL PROTECTED] wrote:

 ..
 int c = 0;
 ..
 List columns = new ArrayList();
 columns.add(new AbstractColumn(new Model(操作)){
 public void populateItem(Item cellItem, String
 componentId, IModel
 model){
 c += cellItem.getIndex()+ 1;

 System.out.println(cellItem.getIndex():+cellItem.getIndex());
 System.out.println(c:+c);
 cellItem.add(new ActionPanel(componentId,
 model));
 }
 });
 ..
 add(new DefaultDataTable(table, columns, new ColumnDataProvider(),50));
 ..


 the Class ColumnDataProvider extends SortableDataProvider.

 cellItem.getIndex() always return 0.why?


 --
 View this message in context:
 http://www.nabble.com/Why-item.getIndex%28%29-always-zero--tf2270996.html#a6303776
 Sent from the Wicket - User forum 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

 
 
 -- 
 Download Wicket 1.2.2 now! New Ajax components: Tree, TreeTable and
 ModalWindow
 -- http://wicketframework.org
 
 -
 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/Why-item.getIndex%28%29-always-zero--tf2270996.html#a6304285
Sent from the Wicket - User forum 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] filtertable and checkgroup cannot work together

2006-09-08 Thread wq

 I made it. 
I replace this line
--table.addTopToolbar(new FilterToolbar(table,provider));

with

--add(new FilterPanel(filter-panel,table,provider));

the Filterpanel is copied from FilterToolbar with some modification and not
added into table,the filterform is now out of table.

it works fine!

Thanks Igor!


igor.vaynberg wrote:
 
 noep, no sample code. just try taking the original toolbar and removing
 the
 form it creates - and pass one into the constructor instead.
 
 -Igor
 
 
 On 9/6/06, wq [EMAIL PROTECTED] wrote:


 thanks Igor!

 without a form, how can I get the filter input?
 have some sample codes?

 can I move the filterform out of the table?





 igor.vaynberg wrote:
 
  filter toolbar was not meant to be embedded in another form because it
  uses
  a form of its own, so for right now i would say that usecase is not
  supported. please add an rfe for it.
 
  if you want one right now then you have to create your own variant that
  doesnt use an embedded form. it would be pretty much a copy and paste
 job
  of
  the current toolbar but w/out the form.
 
  -Igor
 
 
  On 8/31/06, wq [EMAIL PROTECTED] wrote:
 
 
  HELP! HELP!
 
 
 
  wq wrote:
  
   final CheckGroup group=new CheckGroup(group, new ArrayList());
   ...
   group.add(new CheckGroupSelector(groupselector));
   ..
   SortableWapSrcDataProvider provider = new
 SortableWapSrcDataProvider();
   DefaultDataTable table = new
   DefaultDataTable(table,columns,provider,30);
   table.addTopToolbar(new FilterToolbar(table,provider));
   group.add(table);
   form.add(group);
  
http://www.nabble.com/user-files/235815/Snap1.gif
  
   the html file is:
   form wicket:id=form
 span wicket:id=group
 nbsp;nbsp;nbsp;input type=checkbox
   wicket:id=groupselector全选/清除/inputbr/
 table class=dataview cellspacing=0
  wicket:id=table[table]/table
 /span
 input type=submit value=确定 /
   /form
  
   when I click the 'groupselector', the theckbox in filtertable cannot
 be
   checked. If the filtertoolbar is removed,all works fine.
   I suppose it is the filterform in  filtertable that  blocks the
   groupselect javascript.
  
   How can I do? very thanks!
  
 
  --
  View this message in context:
 
 http://www.nabble.com/filtertable-and-checkgroup-cannot-work-together-tf2195268.html#a6078904
  Sent from the Wicket - User forum 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
 
 
 
 -
  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/filtertable-and-checkgroup-cannot-work-together-tf2195268.html#a6170501
 Sent from the Wicket - User forum 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

 
 -
 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/filtertable-and-checkgroup-cannot-work-together-tf2195268.html#a6203673
Sent from the Wicket - User forum at Nabble.com

Re: [Wicket-user] filtertable and checkgroup cannot work together

2006-09-06 Thread wq

thanks Igor!

without a form, how can I get the filter input?
have some sample codes?

can I move the filterform out of the table?





igor.vaynberg wrote:
 
 filter toolbar was not meant to be embedded in another form because it
 uses
 a form of its own, so for right now i would say that usecase is not
 supported. please add an rfe for it.
 
 if you want one right now then you have to create your own variant that
 doesnt use an embedded form. it would be pretty much a copy and paste job
 of
 the current toolbar but w/out the form.
 
 -Igor
 
 
 On 8/31/06, wq [EMAIL PROTECTED] wrote:


 HELP! HELP!



 wq wrote:
 
  final CheckGroup group=new CheckGroup(group, new ArrayList());
  ...
  group.add(new CheckGroupSelector(groupselector));
  ..
  SortableWapSrcDataProvider provider = new SortableWapSrcDataProvider();
  DefaultDataTable table = new
  DefaultDataTable(table,columns,provider,30);
  table.addTopToolbar(new FilterToolbar(table,provider));
  group.add(table);
  form.add(group);
 
   http://www.nabble.com/user-files/235815/Snap1.gif
 
  the html file is:
  form wicket:id=form
span wicket:id=group
nbsp;nbsp;nbsp;input type=checkbox
  wicket:id=groupselector全选/清除/inputbr/
table class=dataview cellspacing=0
 wicket:id=table[table]/table
/span
input type=submit value=确定 /
  /form
 
  when I click the 'groupselector', the theckbox in filtertable cannot be
  checked. If the filtertoolbar is removed,all works fine.
  I suppose it is the filterform in  filtertable that  blocks the
  groupselect javascript.
 
  How can I do? very thanks!
 

 --
 View this message in context:
 http://www.nabble.com/filtertable-and-checkgroup-cannot-work-together-tf2195268.html#a6078904
 Sent from the Wicket - User forum 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

 
 -
 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/filtertable-and-checkgroup-cannot-work-together-tf2195268.html#a6170501
Sent from the Wicket - User forum 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] filtertable and checkgroup cannot work together

2006-08-31 Thread wq

final CheckGroup group=new CheckGroup(group, new ArrayList());
...
group.add(new CheckGroupSelector(groupselector));
..
SortableWapSrcDataProvider provider = new SortableWapSrcDataProvider();
DefaultDataTable table = new DefaultDataTable(table,columns,provider,30);
table.addTopToolbar(new FilterToolbar(table,provider));
group.add(table);
form.add(group);

http://www.nabble.com/user-files/235815/Snap1.gif 

the html file is:
form wicket:id=form
span wicket:id=group
nbsp;nbsp;nbsp;input type=checkbox
wicket:id=groupselector全选/清除/inputbr/
table class=dataview cellspacing=0 
wicket:id=table[table]/table
/span
input type=submit value=确定 /
/form

when I click the 'groupselector', the theckbox in filtertable cannot be
checked. If the filtertoolbar is removed,all works fine.
I suppose it is the filterform in  filtertable that  blocks the groupselect
javascript.

How can I do? very thanks!
-- 
View this message in context: 
http://www.nabble.com/filtertable-and-checkgroup-cannot-work-together-tf2195268.html#a6075049
Sent from the Wicket - User forum 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] filtertable and checkgroup cannot work together

2006-08-31 Thread wq

HELP! HELP!



wq wrote:
 
 final CheckGroup group=new CheckGroup(group, new ArrayList());
 ...
 group.add(new CheckGroupSelector(groupselector));
 ..
 SortableWapSrcDataProvider provider = new SortableWapSrcDataProvider();
 DefaultDataTable table = new
 DefaultDataTable(table,columns,provider,30);
 table.addTopToolbar(new FilterToolbar(table,provider));
 group.add(table);
 form.add(group);
 
  http://www.nabble.com/user-files/235815/Snap1.gif 
 
 the html file is:
 form wicket:id=form
   span wicket:id=group
   nbsp;nbsp;nbsp;input type=checkbox
 wicket:id=groupselector全选/清除/inputbr/
   table class=dataview cellspacing=0 
 wicket:id=table[table]/table
   /span
   input type=submit value=确定 /
 /form
 
 when I click the 'groupselector', the theckbox in filtertable cannot be
 checked. If the filtertoolbar is removed,all works fine.
 I suppose it is the filterform in  filtertable that  blocks the
 groupselect javascript.
 
 How can I do? very thanks!
 

-- 
View this message in context: 
http://www.nabble.com/filtertable-and-checkgroup-cannot-work-together-tf2195268.html#a6078904
Sent from the Wicket - User forum 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