RE: [Wicket-user] [Wicket] DataView and optimized item removal

2005-08-16 Thread Igor Vaynberg
I was just trying to get away from n^2 search, off the top of my head I
don't see a way around that without hashcode or a comparator.

I definetely don't want to reintroduce uniquekeyprovider, there is really no
more point to it.

-Igor


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Christian Essl
 Sent: Monday, August 15, 2005 10:55 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] [Wicket] DataView and optimized 
 item removal
 
 You are right it does. I think it is a very common good 
 practice to impl hashCode when changing equals and it is not 
 so much more work if you need OIR at all.
 
 However I do understand that you do not want to implement an 
 extra method. 
 We could either reintroduce IUniqueKeyProvider, change the 
 impl to equal to the underlying object or replace the HashMap 
 with a list (or make some reasonable helper).
 
 What do you think?
 
 Christian
 
 There are different alternatives:
 
 On Mon, 15 Aug 2005 22:06:28 -0700, Phil Kulak 
 [EMAIL PROTECTED] wrote:
 
  If I'm reading it right, you're using a HashMap? Does this 
 mean that a 
  proper implementation of hashCode is required as well? I 
 mean, I know 
  it's always a good idea, of course, but is it an official 
 requirement 
  of OIR now?
 
  On 8/15/05, Christian Essl [EMAIL PROTECTED] wrote:
  Thanks Igor.
 
  My anonymous cvs is a bit lagging.
 
  Regarding the size thing, currently I use 
 IDataProvider.size(){return 
  Integer.MAX_VALUE;} This works so far fine. Propably we do 
 not need 
  any code change. This is maybe even better, because than DataView 
  respects the contract that it does not give a count paramter to 
  iterator() where
  first+count is bigger than what size() returned. Anyway 
 I'll take a 
  first+look
  and maybe I should write a test-case for that.
 
  Christian
 
  On Mon, 15 Aug 2005 18:24:32 -0700, Igor Vaynberg 
  [EMAIL PROTECTED]
  wrote:
 
   All done, check it out and let me know what you think.
   -Igor
  
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On 
 Behalf Of Igor 
   Vaynberg
   Sent: Monday, August 15, 2005 11:00 AM
   To: wicket-user@lists.sourceforge.net
   Subject: RE: [Wicket-user] [Wicket] DataView and optimized item 
   removal
  
   Alright, if that's what you guys want :) I will make 
 the changes 
   to make it work with model.equals(model). I am also 
 going to get 
   rid of the uniquekeyprovider since the model comparison 
 makes it 
   obsolete.
  
   I will tag the current version with 
 PRE_OIR_BY_MODEL_EQUALITY if 
   you still need to get to it.
  
   -Igor
  
  
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of 
Christian Essl
Sent: Monday, August 15, 2005 6:44 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] [Wicket] DataView and 
 optimized item 
removal
   
Initially I was not sure (anymore), but after reading
   Phil's comment I
also think model.equals(model) is better. I also think the 
identity definition (wheter through equals or string 
 uniquekey)
   belongs to the
data side, because you can only do this with knowledge
   about the data.
And I belief that it can save you some typing if you 
 have it all 
in one place.
   
I strongly agree that there should be a property on
   DataView to turn
OIR on or off.
   
BTW: Does DataView need to call IDataProvider.size().
Wouldn't it be enough if it just called iterator() with
   viewSize. The
iterator just returns than what is there. I have quite some 
views (unfortunately
orderitems) where I do not need paging and can just 
 get all of 
them with one select .
   
Christian
   
On Mon, 15 Aug 2005 01:00:38 -0700, Phil Kulak 
[EMAIL PROTECTED]
wrote:
   
 Won't it be comparing with the models from the last
request? You know,
 those models that were detached and may be 
 discarded, never to 
 be attached again save that comparison?

 Another problem is that I don't want the DataView using
value equality
 when row equality is available, which it always will be in
this case.
 I think if you want to make it more general, use the
model's equals so
 that it can use value, row, or object identity. I don't
   think that
 requiring a proper implementation of equals on the model is 
 any different from requiring it on the object and 
 it gives you 
 more options.

   
   
   
   
   
___
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - 
Hier
anmelden: http://mail.yahoo.de
   
   
   
---
SF.Net email is Sponsored by the Better Software Conference  
EXPO September 19-22, 2005 * San Francisco, CA * Development 
Lifecycle Practices 

[Wicket-user] Where is IUniqueIdProvider?

2005-08-16 Thread Gili


	I can clearly see it here: 
http://cvs.sourceforge.net/viewcvs.py/wicket-stuff/wicket-contrib-dataview/src/wicket/contrib/dataview/IUniqueIdProvider.java?rev=1.1view=log


	but when I do CVS checkout it's not there (on the SSH server). It's 
required for building the Hibernate wicket-stuff module.


Gili
--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Where is IUniqueIdProvider?

2005-08-16 Thread Phil Kulak
My bad. I was a little behind the curve on Igor's changes. It's fixed now.

On 8/15/05, Gili [EMAIL PROTECTED] wrote:
 
 I can clearly see it here:
 http://cvs.sourceforge.net/viewcvs.py/wicket-stuff/wicket-contrib-dataview/src/wicket/contrib/dataview/IUniqueIdProvider.java?rev=1.1view=log
 
 but when I do CVS checkout it's not there (on the SSH server). It's
 required for building the Hibernate wicket-stuff module.
 
 Gili
 --
 http://www.desktopbeautifier.com/
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
 Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] New Wiki Page

2005-08-16 Thread Johan Compagner

That depends a bit how many pages you create on the run.
Because we fill a PageMap of which you can set the max number of pages 
in ApplicationSettings:


   /**
* Gets the maximum number of pages held in a session.
*
* @return Returns the maxPages.
* @see ApplicationSettings#setMaxPages(int)
*/
   public final int getMaxPages()
   {
   return maxPages;
   }


default is 10

So the last 10 pages you create (instances of! so 10times a 
MyPage1.class also counts as one page)


If you want much lower then you can specify that but do remember that 
the back button support depends a bit on this

to lookup old pages..

Also ofcourse you can hold you're self pages in mem if you keep 
references to it through for example PageLinks that can
hold instances of pages that a link will set as the current when the 
link was clicked on


johan


Seth Ladd wrote:

On 8/15/05, Johan Compagner [EMAIL PROTECTED] wrote:
  

you shouldn't keep db data live between requests.
Use DetachableModels so that you only attach (load from db) when the
model data is asked for in the request phase.
And then when the request phase ais ended a detach happens so that you
can clear youre model (a list in this case)
So that all those objects aren't kept in mem.\



Great, that's what I had hoped (and read from the docs) so it's good
to get confirmation. :)

Now my question is, what is the lifespan of the Page object instance? 
How long does that live?


Thanks,
Seth


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

  



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] New Wiki Page

2005-08-16 Thread Seth Ladd
Johan,

Thanks for the helpful answer.  I come from a Spring MVC (and Struts
before that) world of request/responses, so I'm mapping what I know to
the world of Pages.  So far, so good. :)

 So the last 10 pages you create (instances of! so 10times a
 MyPage1.class also counts as one page)

Right, this makes sense.  In other words, each use has their own
instance of a Page class (one and only one instance per user).  Would
that be correct?

With detachable models, we're able to bind the backing model object
for just the scope of the request.  Is there anything analogous for
Page instances?  Since Pages are stored in the HTTP Session, can we
attach/detach Page classes as well?

Thanks again for your help,
Seth


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PageableDataView and column cells

2005-08-16 Thread Johan Compagner

it's fine.
I do have a first impl now but i am still not totally convinced what we 
should do


For example the setNumberOfRows on a PageableListView or ListView (if we 
combine them)
who is calling that. Are we going to push it through a Navigator or are 
users want to set them directly on the listview...


johan


Christian Essl wrote:

Hi Johan,

Thank you. I did not want to press you so.
Sorry for sending this now. I wanted to send it last Friday but 
accidentially kept it in my out box and didn't think of it anymore 
when I sent the box. I do realy not want to press you.


Sorry,
Christian



On Fri, 12 Aug 2005 20:32:44 +0200, Johan Compagner 
[EMAIL PROTECTED] wrote:



i will start first impl this weekend

Christian Essl wrote:

Oh yes. This should be before 1.1 and idea?

On Fri, 12 Aug 2005 10:48:47 -0700, Igor Vaynberg 
[EMAIL PROTECTED] wrote:



Hopefully when the new paging impl is done there wont be a need for
Pageable-pairs :)

-Igor



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christian Essl
Sent: Friday, August 12, 2005 10:37 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] PageableDataView and column cells

Wow, that's a good one. I guess there are also others who
need it and facing the implementation (I couldn't have done
it this way) I think there is a need.

I was acutally thinking along the lines of implementing a
PageableOrderedRepeatingView and than nest another
OrderedRepeatingView.

What about having a default PageableOrderedRepeatingView -
glad there is autocompletition - which has a method
internalOnBeginRequest(int page, int startIndex, int size),
so you could do the above and maybe other things more easy by
hand. I don't have a real use-case - just a thought.

Christian

On Fri, 12 Aug 2005 09:08:25 -0700, Igor Vaynberg
[EMAIL PROTECTED]
wrote:

 Here is the quick and dirty solution. Is there enough interest to
 build a full blown grid component?

 final int cols=7;
 final int rowsPerPage=5;
 add(new PageableDataView(grid, new
ContactDataProvider(),
 cols*rowsPerPage) {
 protected void populateItem(final 
DataItem item)

 {
 Contact
 contact=(Contact)item.getModelObject();
 item.add(new Label(cell,
 contact.getFirstName()+ +contact.getLastName()));
 }
 protected void renderItem(Component item)
 {
 DataItem di=(DataItem)item;
 if 
(di.getIndex()%cols==0)

 getResponse().write(tr);
 super.renderItem(item);
 if
(di.getIndex()+1==getItemCount()) {
 if
(getItemCount()%cols!=0)
 {
 int
 needed=cols*((getItemCount()/cols)+1)-getItemCount();
 getResponse().write(td 
colspan=\+needed+\nbsp;/td);

 }
 }
 if 
((di.getIndex()+1)%cols==0)

 getResponse().write(/tr);
 }
 });

 ---

 table cellspacing=0 class=dataview border=1
 span wicket:id=grid
 tdspan wicket:id=cell[cell]/span/td
 /span
 /table


 -Igor




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

 Sent: Friday, August 12, 2005 7:44 AM
 To: [EMAIL PROTECTED]
 Subject: [Wicket-user] PageableDataView and column cells

 Hi,

 I'm trying to display a grid of images, for example 4
columns and 3
 rows of images, where each cell is a different entry
retrieved from
 the database with a different index/id.

 I took a look at the DisplayTag example and 
PageableDataView's

 source-code and they don't seem to be quite appropriate
for handling
 my use-case. In a nutshell, PageableDataView only has a 
concept of

 rows, where the
 populateItem(ListView) method allows one to add()
different views of
 the same database row. So for example, a given row will
have an id,
 name, description, etc...

 What I need is multiple columns per visual row where
each column is
 a distinct DB item, with a distinct ID.
 PageableDataView only increments the index outside the scope of
 populateItem() so I'm not sure it's possible to implement 
using it.


 My gut feeling is that maybe I can use PageableDataView
with CSS
 somehow to emulate columns but i would be much nicer if I
just had a
 component that had the concept of columns in the first place.

 What do you think?

 Thank you,
 Gili
 --
 http://www.desktopbeautifier.com/


 ---
 SF.Net email is Sponsored by the Better Software Conference  
EXPO

 September 19-22, 2005 * San Francisco, CA * Development Lifecycle
 Practices Agile  Plan-Driven Development * Managing
Projects  Teams
 * Testing  QA Security * Process Improvement  Measurement *
 

Re: [Wicket-user] Hibernate. Unique field in GridPanel.

2005-08-16 Thread Oleg Marchuk

May be I can use something like this?
http://www.cs.uoregon.edu/~torok/GridPanelDocs/

IDataSource ds = new HibernateDataSource(Customer.class, COMPONENT_DAO);

List states = (List) COMPONENT_DAO.execute(new IHibernateCallback() {
public Object execute(Session session) {
return session.createQuery(FROM State s ORDER BY s.abbrev)
.list();
}
});

// Our custom columns
ArrayList cols = new ArrayList();

cols.add(new MultiColumn()
.add(new DeleteColumn())
.add(new EditColumn()));

cols.add(new TextFieldColumn(Address, address));
cols.add(new TextFieldColumn(City, city));
cols.add(new DropDownChoiceColumn(State, state, states)
.setAllowOrderBy(false));
cols.add(new TextFieldColumn(Name, name)
.add(RequiredValidator.getInstance()));
cols.add(new CheckBoxColumn(Prefered, prefered));

// Our feedback panel.
FeedbackPanel feedback = new FeedbackPanel(feedback);
add(feedback);

GridPanel gridPanel = new GridPanel(allCustomers, ds, 5, cols, feedback);
add(gridPanel);


Phil Kulak wrote:


Hmm.. there's another reason why I don't like coarse-grained
components like that. Since the component is doing all the saving and
updating, there's not a whole lot you can do.

On 8/15/05, Oleg Marchuk [EMAIL PROTECTED] wrote:
 


Hello.

Today I get cdapp example and play with it. I set one of the field of
Album to unique in mapping. And now when I am trying to save object with
same values I always get exception. How to rewrite code to show feedback
messsage like Error: this field must be unique. Try other value ?


   



--
Oleg Marchuk

Softzone ltd., software and IT consulting
Ukraine, Kiev, +380-44-2460965
[EMAIL PROTECTED]
http://www.softzonenet.com/



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] ListView with n rows and n columns

2005-08-16 Thread Johannes Fahrenkrug

Hello Wicke(t/d) users,

I'm wondering if someone already solved this one or if there is a best 
practice for it:


I have to display a table with a variable number of rows and a variable 
number of columns.
The purpose of it is this: I am writing a booking application and every 
trip can have a variable number of
little extras that you can book on top of the main trip (a special 
dinner, a boat ride and so on). Each one of those extras can be booked 
in different categories and different roomtypes (if the guest has to 
stay over night).


So it might look something like this:

DDC = DropDownChoice for Category
DDR = DropDownChoice for Roomtype

 Homer  Lenny   
   Carl
Chinese DinnerDDC, DDRDDC, DDRDDC, 
DDR  
Boat Trip  DDC, DDRDDC, DDR
DDC, DDR

Visit to the Powerplant   DDC, DDRDDC, DDRDDC, DDR


I have a list of POJOs for the customers and I have a list of POJOs for 
the extras.
Oh, and the booking of these extras is optional, of course. So for 
example it should be possible that only Lenny books the Boat Trip (by 
selecting a category and a room type for it)


Any suggestions are appreciated.

- Johannes


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ListView with n rows and n columns

2005-08-16 Thread Martijn Dashorst

Nest two listviews.

Wicket allows you to do so:

table
tr wicket:id=rows
td wicket:id=colsspan wicket:id=panel//td
/tr
/table

add(new ListView(rows, rowsList) {
   public void populateItem(ListItem row) {
   item.add(new ListView(cols, (List)row.getModelObject()){
public void populateItem(ListItem col) {
col.add(new Foo(panel));
}
   }
   );
   }
});

Martijn

Johannes Fahrenkrug wrote:


Hello Wicke(t/d) users,

I'm wondering if someone already solved this one or if there is a best 
practice for it:


I have to display a table with a variable number of rows and a 
variable number of columns.
The purpose of it is this: I am writing a booking application and 
every trip can have a variable number of
little extras that you can book on top of the main trip (a special 
dinner, a boat ride and so on). Each one of those extras can be booked 
in different categories and different roomtypes (if the guest has to 
stay over night).


So it might look something like this:

DDC = DropDownChoice for Category
DDR = DropDownChoice for Roomtype

 Homer  
Lenny  Carl
Chinese DinnerDDC, DDRDDC, DDRDDC, 
DDR  Boat Trip  DDC, DDRDDC, 
DDRDDC, DDR

Visit to the Powerplant   DDC, DDRDDC, DDRDDC, DDR


I have a list of POJOs for the customers and I have a list of POJOs 
for the extras.
Oh, and the booking of these extras is optional, of course. So for 
example it should be possible that only Lenny books the Boat Trip (by 
selecting a category and a room type for it)


Any suggestions are appreciated.

- Johannes


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing 
 QA

Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ColumnedDataProvider startIndex problems

2005-08-16 Thread Phil Kulak
Knock yourself out.

On 8/16/05, Gili [EMAIL PROTECTED] wrote:
 
 There is no way to offset the ColumnedDataProvider beginning index.
 This functionality doesn't really belong here but until the refactor of
 contrib-data I don't think there is a cleaner way.
 
 So I'll be adding ColumnedDataProvider.setStartIndex() ok?
 
 Gili
 --
 http://www.desktopbeautifier.com/
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
 Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Homepage URL bug?

2005-08-16 Thread Jan Bares
Hi,

I am not servlet API guru, but there's something strage in URL handling in
wicket. The http://server/myApp will display homepage of myApp. However,
http://server/myApp/ (note the final slash) returns error 404. For me this
is strange behaviour. When I use something similar with Apache or IIS, the
behaviour is different:
I ask for http://server/myApp. It is mapped to a folder. Apache responds
with redirect to http://server/myApp/ (note the final slash) and
http://server/myApp/ returns default document from the folder.

(wicket 1.1b2)

Jan





---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Gili


	On second thought... Instead of me adding this functionality into 
ColumnedDataProvider can we add a IDataProvider wrapper that provides 
this functionality? So I'd have the original IDataProvider, wrapped by 
the offset-producing-IDataProvider, then the ColumnedDataProvider.


Or is this going to be completely unnecessary in the new design?

Gili

Gili wrote:


There is no way to offset the ColumnedDataProvider beginning index. 
This functionality doesn't really belong here but until the refactor of 
contrib-data I don't think there is a cleaner way.


So I'll be adding ColumnedDataProvider.setStartIndex() ok?

Gili


--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Homepage URL bug?

2005-08-16 Thread Matej Knopp

You can map you servlet to myApp/
e.g.
servlet-mapping
  servlet-nameWicketServlet/servlet-name
  url-pattern/myApp//url-pattern
/servlet-mapping

but you must be aware, that all external resources (css, js, images) 
will be one level deeper.


-Matej

Jan Bares wrote:

Hi,

I am not servlet API guru, but there's something strage in URL handling in
wicket. The http://server/myApp will display homepage of myApp. However,
http://server/myApp/ (note the final slash) returns error 404. For me this
is strange behaviour. When I use something similar with Apache or IIS, the
behaviour is different:
I ask for http://server/myApp. It is mapped to a folder. Apache responds
with redirect to http://server/myApp/ (note the final slash) and
http://server/myApp/ returns default document from the folder.

(wicket 1.1b2)

Jan





---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Tomcat ThreadDeath

2005-08-16 Thread Gili


	Ok, so I tracked down the problem with reloading webapps under Tomcat 
to this: http://issues.apache.org/bugzilla/show_bug.cgi?id=27371


	and I read their entire discussion but it still isn't clear to me how 
to fix the problem. I tried copying log4j*.jar into common/lib but that 
didn't help either. Any ideas how to fix this problem?


Thanks,
Gili
--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Igor Vaynberg
I told you I didn't like it :) The whole process should be smoother, why
cant the internal view simply get the iterator from the external view and
use that. Why have a whole other wrapper/provider to implement.

What is this offset? When using pageddataview you should use the page number
to offset, when using a normal dataview you should use setfirstindex().

-Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Phil Kulak
 Sent: Tuesday, August 16, 2005 11:32 AM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Re: ColumnedDataProvider 
 startIndex problems
 
 Are we even sure we want this functionality in the 
 dataprovider? I wrote that class to get people's reactions to 
 the concept, but I don't think I got any feedback. I'm not 
 sure that's where the functionality belongs, but you can't 
 just subclass the whole heirarchy either.
 
 On 8/16/05, Gili [EMAIL PROTECTED] wrote:
  
  On second thought... Instead of me adding this 
 functionality 
  into ColumnedDataProvider can we add a IDataProvider wrapper that 
  provides this functionality? So I'd have the original 
 IDataProvider, 
  wrapped by the offset-producing-IDataProvider, then the 
 ColumnedDataProvider.
  
  Or is this going to be completely unnecessary in 
 the new design?
  
  Gili
  
  Gili wrote:
  
   There is no way to offset the ColumnedDataProvider 
 beginning index.
   This functionality doesn't really belong here but until 
 the refactor 
   of contrib-data I don't think there is a cleaner way.
  
   So I'll be adding ColumnedDataProvider.setStartIndex() ok?
  
   Gili
  
  --
  http://www.desktopbeautifier.com/
  
  
  ---
  SF.Net email is Sponsored by the Better Software Conference  EXPO 
  September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
  Practices Agile  Plan-Driven Development * Managing 
 Projects  Teams 
  * Testing  QA Security * Process Improvement  Measurement * 
  http://www.sqe.com/bsce5sf 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  
 EXPO September 19-22, 2005 * San Francisco, CA * Development 
 Lifecycle Practices Agile  Plan-Driven Development * 
 Managing Projects  Teams * Testing  QA Security * Process 
 Improvement  Measurement * http://www.sqe.com/bsce5sf 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: How load a new TreeModel in a Tree

2005-08-16 Thread Eelco Hillenius
I think I've got it... try setting optimizeItemRemoval on Tree to false. 
I'll make a fix so you don't have to do it, but that should work now.


Eelco


Eelco Hillenius wrote:

I'll try to look at it. In the meanwhile, couldn't you just change the 
root node of the (default)treemodel you are using?


Eelco

pepone pepone wrote:


can any body say me if there is any way to change the TreeModel
attached to a wicket tree i´m using wicket-1.1-b2

when i execute the next code the tree renders allways empty is this a 
bug?


treeView.getTreeState().setModel(newTreeModel);
treeView.modelChanged();

treeView is a class that extend wicket.markup.html.Tree



On 8/15/05, pepone pepone [EMAIL PROTECTED] wrote:
 


Hello all

I traying to update the TreeModel of a wicket Tree but i can´t do it

what i trying is

treeView.getTreeState().setModel(newTreeModel);
treeView.modelChanged();

but this allways render an empty tree

if i pass the treeModel direct to Tree constructor the tree renders ok

Any idea of how change the TreeModel of the tree component in 
execution time


thanks all

  




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing 
 QA
Security * Process Improvement  Measurement * 
http://www.sqe.com/bsce5sf

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





---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing 
 QA

Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] DataView.setStartIndex()

2005-08-16 Thread Igor Vaynberg
Im not sure this is a good idea. For example, when using pageabledataview
lets say at the time of request 1 you have 4 pages so the navigator will
draw 4 links, use clicks page 4 and at that time there are only 3 pages
because some rows were deleted. In this situation would you like to deal
with the exception or just let the listview default back to first page and
only draw 3 navigation links? When the new navigation is done we can make it
smarter and based on the index default ot the first or last page.


-Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 8:17 AM
 To: [EMAIL PROTECTED]
 Subject: [Wicket-user] DataView.setStartIndex()
 
 
   We should be throwing a IndexOutOfBoundsException if 
 the index is invalid, shouldn't we? Right now we silently set 
 the index to zero, which might be at all what the user intended.
 
 Gili
 --
 http://www.desktopbeautifier.com/
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development 
 Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * 
 Testing  QA
 Security * Process Improvement  Measurement * 
 http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multiple checkboxes, table columns how-to in Wicket?

2005-08-16 Thread Eelco Hillenius
First a Form. The a ListView. And for each row a Label and a CheckBox 
component? As the checkboxes paths are unique for each row, you should 
have no problems there.


Doesn't that work for you?

Eelco

Gwyn Evans wrote:


Hi,
  I'm currently trying to 'mirror' a quick  dirty JSP page in  Wicket 
 wondering how best do a particular thing...


  I've got a list of Services, with basically a String ('name') and a 
boolean attribute ('free').  There are 90-odd of these, and I need to 
display them as checkboxes in a set of columns.  The QD JSP method 
puts them in a table, with a set of checkboxes making up a column in a 
td.../td, as below...


String generateServiceTable(List services, int colSize, String 
listName) {

int cols = (services.size() / colSize) + 1;
StringBuffer sb = new StringBuffer();
sb.append(table tr\n);
int rows = 0;
for (int i = 0, ; i  services.size(); i++) {
Service service = (Service) services.get(i);
if (rows == 0) {
sb.append(td valign=top width=\ + 100 / cols + 
%\\n);

}
rows++;
sb.append(input type=\checkbox\ name=\ + listName + 
\ value=\);

sb.append(service.getName());
sb.append(\);
if (service.isFree()) {
sb.append( checked);
}
sb.append();
sb.append(service.getName());
sb.append(br\n);
if (rows == colSize) {
sb.append(/td\n);
rows = 0;
}
}
sb.append(/tr\n);
sb.append(/table\n);
return sb.toString();
}

so I get a

   a1[]   a11[]  a21[]  a31[] ...
   a2[]   a12[]  a22[]  a32[] ...
...
  a10[]   a20[]  a30[]  a40[] ...

effect, but I'm having difficulty working out a good/clean/simple way 
of achieving the same result with Wicket.
(Note that using the same name on the checkboxes results in them 
behaving in the same way as a multiple-choice list does, in terms of 
what the browser dispatches, at least.)


  I had this all working happily, using a ListMultipleChoice, so I've 
got the 'surrounding' form/model, etc, it's just how best to do this 
that's unclear...


/Gwyn





---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] ColumnedDataProvider startIndex problems

2005-08-16 Thread Gili

Cant you just set the offset in the dataview?
-Igor


	No because the DataView takes input from the ColumnedDataProvider so if 
you offset the DataView you're talking in column units as opposed to 
individual DB item units.


Gili
--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Gili

I told you I didn't like it  :)  The whole process should be smoother, why
cant the internal view simply get the iterator from the external view and
use that. Why have a whole other wrapper/provider to implement.

What is this offset? When using pageddataview you should use the page number
to offset, when using a normal dataview you should use setfirstindex().

-Igor


	I also agree it's not as smooth as it should be, but I also explained 
in the previous email why DataView.setFirstIndex() will not work. This 
should all be refactored into a new component that is column-aware 
instead of having to use ColumnedDataProvider like we do now. I don't 
think there is a cleaner way.


Gili


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Christian Essl
I actually like both of your approaches (who wonders chief of table with 
chief of DataView :). Like Igor says it is definately better to have 
components which have it all in one piece nicely together. On the other 
hand Phil's ColumnDataProvider has it's elegancy. It does not span an 
extra hierarchy and is IMO more flexible. I was actually thinking of a 
TableModelDataProvider which has an abstract method IModel getModel(int 
row,int col) - useful for calculated things or tables with a lot of empty 
elements.


Of my head: Why not combine both approaches? Have a generified DataTable 
(TableView) which uses for the rows an DataView and mainly has a method 
populateDataItem(DataItem di, int col, int row). Than make special panels 
which use this generic TableView and automatically wrap the IDataProviders 
in sepcialized providers or demand differnt models or whatsoever.


Christian

PS: The only reason for the offset I can think of is that you might want 
to start with an element which by the current calculation lies in the 
middle of a row.



On Tue, 16 Aug 2005 12:12:16 -0700, Igor Vaynberg [EMAIL PROTECTED] 
wrote:



I told you I didn't like it :) The whole process should be smoother, why
cant the internal view simply get the iterator from the external view and
use that. Why have a whole other wrapper/provider to implement.

What is this offset? When using pageddataview you should use the page 
number

to offset, when using a normal dataview you should use setfirstindex().

-Igor



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Phil Kulak
Sent: Tuesday, August 16, 2005 11:32 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: ColumnedDataProvider
startIndex problems

Are we even sure we want this functionality in the
dataprovider? I wrote that class to get people's reactions to
the concept, but I don't think I got any feedback. I'm not
sure that's where the functionality belongs, but you can't
just subclass the whole heirarchy either.

On 8/16/05, Gili [EMAIL PROTECTED] wrote:

 On second thought... Instead of me adding this
functionality
 into ColumnedDataProvider can we add a IDataProvider wrapper that
 provides this functionality? So I'd have the original
IDataProvider,
 wrapped by the offset-producing-IDataProvider, then the
ColumnedDataProvider.

 Or is this going to be completely unnecessary in
the new design?

 Gili

 Gili wrote:
 
  There is no way to offset the ColumnedDataProvider
beginning index.
  This functionality doesn't really belong here but until
the refactor
  of contrib-data I don't think there is a cleaner way.
 
  So I'll be adding ColumnedDataProvider.setStartIndex() ok?
 
  Gili

 --
 http://www.desktopbeautifier.com/


 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle
 Practices Agile  Plan-Driven Development * Managing
Projects  Teams
 * Testing  QA Security * Process Improvement  Measurement *
 http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is Sponsored by the Better Software Conference 
EXPO September 19-22, 2005 * San Francisco, CA * Development
Lifecycle Practices Agile  Plan-Driven Development *
Managing Projects  Teams * Testing  QA Security * Process
Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user








---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  
QA

Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Christian Essl 






___ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list

RE: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Igor Vaynberg
How about this idea:
We have a gridview extends dataview. A gridview takes a render interface
that it uses to render the grid (instead of body markup), so we can have a
tablerenderer or cssrenderer or whatever, and the interface would roughly
look like this:

Interface IGridRenderer {
begin(GridView view);
beginRow(GridView view);
beginCell(GridView view);
endCell(GridView view);
endRow(GridView view);
end(GridView view);
}

Basically this is the same as my first post that inserted the html directly
but now its tucked away in a renderer. This way we don't have the
unnceessary row-wise views and you can even use OIR cleanly since it is
basically a dataview.

-Igor


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 1:40 PM
 To: wicket-user@lists.sourceforge.net
 Subject: RE: [Wicket-user] Re: ColumnedDataProvider 
 startIndex problems
 
  I told you I didn't like it  :)  The whole process should 
 be smoother, 
  why cant the internal view simply get the iterator from the 
 external 
  view and use that. Why have a whole other wrapper/provider 
 to implement.
  
  What is this offset? When using pageddataview you should 
 use the page 
  number to offset, when using a normal dataview you should 
 use setfirstindex().
  
  -Igor
 
   I also agree it's not as smooth as it should be, but I 
 also explained in the previous email why 
 DataView.setFirstIndex() will not work. This should all be 
 refactored into a new component that is column-aware instead 
 of having to use ColumnedDataProvider like we do now. I don't 
 think there is a cleaner way.
 
 Gili
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  
 EXPO September 19-22, 2005 * San Francisco, CA * Development 
 Lifecycle Practices Agile  Plan-Driven Development * 
 Managing Projects  Teams * Testing  QA Security * Process 
 Improvement  Measurement * http://www.sqe.com/bsce5sf 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Igor Vaynberg
Or we can use the body markup to render the inside of each cell...
-Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Igor Vaynberg
 Sent: Tuesday, August 16, 2005 2:00 PM
 To: wicket-user@lists.sourceforge.net
 Subject: RE: [Wicket-user] Re: ColumnedDataProvider 
 startIndex problems
 
 How about this idea:
 We have a gridview extends dataview. A gridview takes a 
 render interface that it uses to render the grid (instead of 
 body markup), so we can have a tablerenderer or cssrenderer 
 or whatever, and the interface would roughly look like this:
 
 Interface IGridRenderer {
   begin(GridView view);
   beginRow(GridView view);
   beginCell(GridView view);
   endCell(GridView view);
   endRow(GridView view);
   end(GridView view);
 }
 
 Basically this is the same as my first post that inserted the 
 html directly but now its tucked away in a renderer. This way 
 we don't have the unnceessary row-wise views and you can even 
 use OIR cleanly since it is basically a dataview.
 
 -Igor
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Gili
  Sent: Tuesday, August 16, 2005 1:40 PM
  To: wicket-user@lists.sourceforge.net
  Subject: RE: [Wicket-user] Re: ColumnedDataProvider startIndex 
  problems
  
   I told you I didn't like it  :)  The whole process should
  be smoother,
   why cant the internal view simply get the iterator from the
  external
   view and use that. Why have a whole other wrapper/provider
  to implement.
   
   What is this offset? When using pageddataview you should
  use the page
   number to offset, when using a normal dataview you should
  use setfirstindex().
   
   -Igor
  
  I also agree it's not as smooth as it should be, but I 
 also explained 
  in the previous email why
  DataView.setFirstIndex() will not work. This should all be 
 refactored 
  into a new component that is column-aware instead of having to use 
  ColumnedDataProvider like we do now. I don't think there is 
 a cleaner 
  way.
  
  Gili
  
  
  ---
  SF.Net email is Sponsored by the Better Software Conference  EXPO 
  September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
  Practices Agile  Plan-Driven Development * Managing 
 Projects  Teams 
  * Testing  QA Security * Process Improvement  Measurement * 
  http://www.sqe.com/bsce5sf 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
 
 
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  
 EXPO September 19-22, 2005 * San Francisco, CA * Development 
 Lifecycle Practices Agile  Plan-Driven Development * 
 Managing Projects  Teams * Testing  QA Security * Process 
 Improvement  Measurement * http://www.sqe.com/bsce5sf 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] RE: DataView.setStartIndex() (Igor Vaynberg)

2005-08-16 Thread Gili

Im not sure this is a good idea. For example, when using pageabledataview
lets say at the time of request 1 you have 4 pages so the navigator will
draw 4 links, use clicks page 4 and at that time there are only 3 pages
because some rows were deleted. In this situation would you like to deal
with the exception or just let the listview default back to first page and
only draw 3 navigation links? When the new navigation is done we can make it
smarter and based on the index default ot the first or last page.


	Well, if the user wishes to catch the exception and redirect to index 
zero instead that's his choice to make but right now we're not even 
giving people the choice.


Gili


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multiple checkboxes, table columns how-to in Wicket?

2005-08-16 Thread Gwyn Evans
I don't think so, or at least it's the step beyond that that I'm not
seeing.  My tries with a  ListView gave me a repeated set of
tditem/td blocks, (using a Label for the item), but I can't see
how I can generate something like:-
td
item1br
item2br
..
item10br
/tdtd
item11br
item12br
..
/td

I think that if the original 1-row format isn't kept, I might be able
to do something similar, where the key might be to explicitly re-map
the input list into a list of 'horizontal' lists, then use a series of
tr's enclosing td's, each enclosing a single item, but that didn't
seem to be all that simple/clean and I wondered if I was missing
something obvious...  (Maybe I need to investigate extending
ListMultipleChoice or it's parent, and see where that gets me.)

/Gwyn

On 16/08/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 First a Form. The a ListView. And for each row a Label and a CheckBox
 component? As the checkboxes paths are unique for each row, you should
 have no problems there.
 
 Doesn't that work for you?
 
 Eelco
 
 Gwyn Evans wrote:
 
  Hi,
I'm currently trying to 'mirror' a quick  dirty JSP page in  Wicket
   wondering how best do a particular thing...
 
I've got a list of Services, with basically a String ('name') and a
  boolean attribute ('free').  There are 90-odd of these, and I need to
  display them as checkboxes in a set of columns.  The QD JSP method
  puts them in a table, with a set of checkboxes making up a column in a
  td.../td, as below...
 
  String generateServiceTable(List services, int colSize, String
  listName) {
  int cols = (services.size() / colSize) + 1;
  StringBuffer sb = new StringBuffer();
  sb.append(table tr\n);
  int rows = 0;
  for (int i = 0, ; i  services.size(); i++) {
  Service service = (Service) services.get(i);
  if (rows == 0) {
  sb.append(td valign=top width=\ + 100 / cols +
  %\\n);
  }
  rows++;
  sb.append(input type=\checkbox\ name=\ + listName +
  \ value=\);
  sb.append(service.getName());
  sb.append(\);
  if (service.isFree()) {
  sb.append( checked);
  }
  sb.append();
  sb.append(service.getName());
  sb.append(br\n);
  if (rows == colSize) {
  sb.append(/td\n);
  rows = 0;
  }
  }
  sb.append(/tr\n);
  sb.append(/table\n);
  return sb.toString();
  }
 
  so I get a
 
 a1[]   a11[]  a21[]  a31[] ...
 a2[]   a12[]  a22[]  a32[] ...
  ...
a10[]   a20[]  a30[]  a40[] ...
 
  effect, but I'm having difficulty working out a good/clean/simple way
  of achieving the same result with Wicket.
  (Note that using the same name on the checkboxes results in them
  behaving in the same way as a multiple-choice list does, in terms of
  what the browser dispatches, at least.)
 
I had this all working happily, using a ListMultipleChoice, so I've
  got the 'surrounding' form/model, etc, it's just how best to do this
  that's unclear...
 
  /Gwyn
 
 
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
 Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Hibernate. Unique field in GridPanel.

2005-08-16 Thread Phil Kulak
Oh, oops, I thought that's what you were talking about. :) Don't use
the GridPanel. Just wrap the save in a try catch, or check first to
see if the row exists.

On 8/16/05, Oleg Marchuk [EMAIL PROTECTED] wrote:
 May be I can use something like this?
 http://www.cs.uoregon.edu/~torok/GridPanelDocs/
 
 IDataSource ds = new HibernateDataSource(Customer.class, COMPONENT_DAO);
 
 List states = (List) COMPONENT_DAO.execute(new IHibernateCallback() {
 public Object execute(Session session) {
 return session.createQuery(FROM State s ORDER BY s.abbrev)
 .list();
 }
 });
 
 // Our custom columns
 ArrayList cols = new ArrayList();
 
 cols.add(new MultiColumn()
 .add(new DeleteColumn())
 .add(new EditColumn()));
 
 cols.add(new TextFieldColumn(Address, address));
 cols.add(new TextFieldColumn(City, city));
 cols.add(new DropDownChoiceColumn(State, state, states)
 .setAllowOrderBy(false));
 cols.add(new TextFieldColumn(Name, name)
 .add(RequiredValidator.getInstance()));
 cols.add(new CheckBoxColumn(Prefered, prefered));
 
 // Our feedback panel.
 FeedbackPanel feedback = new FeedbackPanel(feedback);
 add(feedback);
 
 GridPanel gridPanel = new GridPanel(allCustomers, ds, 5, cols, feedback);
 add(gridPanel);
 
 
 Phil Kulak wrote:
 
 Hmm.. there's another reason why I don't like coarse-grained
 components like that. Since the component is doing all the saving and
 updating, there's not a whole lot you can do.
 
 On 8/15/05, Oleg Marchuk [EMAIL PROTECTED] wrote:
 
 
 Hello.
 
 Today I get cdapp example and play with it. I set one of the field of
 Album to unique in mapping. And now when I am trying to save object with
 same values I always get exception. How to rewrite code to show feedback
 messsage like Error: this field must be unique. Try other value ?
 
 
 
 
 
 --
 Oleg Marchuk
 
 Softzone ltd., software and IT consulting
 Ukraine, Kiev, +380-44-2460965
 [EMAIL PROTECTED]
 http://www.softzonenet.com/
 
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
 Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] RE: DataView.setStartIndex() (Igor Vaynberg)

2005-08-16 Thread Gili


	Well, in my case, the underlying data is static. Images are not going 
to be dynamically removed. If an exception is thrown, I wish for it to 
be fatal. I'm just trying to mirror the design in Hibernate: you can 
choose to catch StaleObjectStateException or not. Either way, it only 
rarely gets thrown if the underlying data may change and if the data 
can't be change it never gets thrown.


	The reason you want to force developers to catch it is because it 
usually indicates the original request is no longer valid. That is, if 
the user operated on data which has been changed or removed then he 
should be reprompted for input because there is no graceful way to 
recover. Using my image browsing gallery as an example, say the user 
clicks next to move to the next page in the set of images, and we find 
out some images were removed, in *my* implementation I would catch the 
exception, find out what the last image is and ensure that the user sees 
the last page because that's what he meant to do... move forward, not back.


	I really think this is a domain-specific thing. You can't know ahead of 
time what the developers will want to do.


Gili

Igor Vaynberg wrote:

If we do add an exception we will be on the other side of the fence, the
user now HAS to handle it. Personally, I wouldn't want to have a try catch
block everytime I have a dataview for something that can be handled for me
automatically. What else would you do inside that catch block other then
redirect to first or last page?

Last time I checked setStartIndex() is public so you are more then welcome
to override it.

Public setStartIndex(int index) {
 if (index0||index==getItemCount()) {
throw new IndexOutOfBoundsException();
}
super.setStartIndex(index);
}

-Igor




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

Sent: Tuesday, August 16, 2005 2:05 PM
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] RE: DataView.setStartIndex() (Igor Vaynberg)


Im not sure this is a good idea. For example, when using 
pageabledataview lets say at the time of request 1 you have 


4 pages so 

the navigator will draw 4 links, use clicks page 4 and at that time 
there are only 3 pages because some rows were deleted. In this 
situation would you like to deal with the exception or just let the 
listview default back to first page and only draw 3 


navigation links? 

When the new navigation is done we can make it smarter and 


based on the index default ot the first or last page.

	Well, if the user wishes to catch the exception and 
redirect to index zero instead that's his choice to make but 
right now we're not even giving people the choice.


Gili


---
SF.Net email is Sponsored by the Better Software Conference  
EXPO September 19-22, 2005 * San Francisco, CA * Development 
Lifecycle Practices Agile  Plan-Driven Development * 
Managing Projects  Teams * Testing  QA Security * Process 
Improvement  Measurement * http://www.sqe.com/bsce5sf 
___

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









---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multiple checkboxes, table columns how-to in Wicket?

2005-08-16 Thread Eelco Hillenius

td
item1br item2br
/td

could be done just with a listview too:

td
span wicket:id=listspan wicket:id=label /br/span
/td

those spans shouldn't be in your way, and you could even set the 
rendering of the tags off.


And you can nest listview as deep as you want.

But I probably don't understand what you mean? :)

Eelco

Gwyn Evans wrote:


I don't think so, or at least it's the step beyond that that I'm not
seeing.  My tries with a  ListView gave me a repeated set of
tditem/td blocks, (using a Label for the item), but I can't see
how I can generate something like:-
td
item1br
item2br
..
item10br
/tdtd
item11br
item12br
..
/td

I think that if the original 1-row format isn't kept, I might be able
to do something similar, where the key might be to explicitly re-map
the input list into a list of 'horizontal' lists, then use a series of
tr's enclosing td's, each enclosing a single item, but that didn't
seem to be all that simple/clean and I wondered if I was missing
something obvious...  (Maybe I need to investigate extending
ListMultipleChoice or it's parent, and see where that gets me.)

/Gwyn

On 16/08/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 


First a Form. The a ListView. And for each row a Label and a CheckBox
component? As the checkboxes paths are unique for each row, you should
have no problems there.

Doesn't that work for you?

Eelco

Gwyn Evans wrote:

   


Hi,
 I'm currently trying to 'mirror' a quick  dirty JSP page in  Wicket
 wondering how best do a particular thing...

 I've got a list of Services, with basically a String ('name') and a
boolean attribute ('free').  There are 90-odd of these, and I need to
display them as checkboxes in a set of columns.  The QD JSP method
puts them in a table, with a set of checkboxes making up a column in a
td.../td, as below...

   String generateServiceTable(List services, int colSize, String
listName) {
   int cols = (services.size() / colSize) + 1;
   StringBuffer sb = new StringBuffer();
   sb.append(table tr\n);
   int rows = 0;
   for (int i = 0, ; i  services.size(); i++) {
   Service service = (Service) services.get(i);
   if (rows == 0) {
   sb.append(td valign=top width=\ + 100 / cols +
%\\n);
   }
   rows++;
   sb.append(input type=\checkbox\ name=\ + listName +
\ value=\);
   sb.append(service.getName());
   sb.append(\);
   if (service.isFree()) {
   sb.append( checked);
   }
   sb.append();
   sb.append(service.getName());
   sb.append(br\n);
   if (rows == colSize) {
   sb.append(/td\n);
   rows = 0;
   }
   }
   sb.append(/tr\n);
   sb.append(/table\n);
   return sb.toString();
   }

so I get a

  a1[]   a11[]  a21[]  a31[] ...
  a2[]   a12[]  a22[]  a32[] ...
...
 a10[]   a20[]  a30[]  a40[] ...

effect, but I'm having difficulty working out a good/clean/simple way
of achieving the same result with Wicket.
(Note that using the same name on the checkboxes results in them
behaving in the same way as a multiple-choice list does, in terms of
what the browser dispatches, at least.)

 I had this all working happily, using a ListMultipleChoice, so I've
got the 'surrounding' form/model, etc, it's just how best to do this
that's unclear...

/Gwyn
 




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

   




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
 





---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Gili


	Looks ok I think although I'm not too familiar with this whole concept 
of a seperate renderer. I'd have to try it to see what I think :)


Gili


How about this idea:
We have a gridview extends dataview. A gridview takes a render interface
that it uses to render the grid (instead of body markup), so we can have a
tablerenderer or cssrenderer or whatever, and the interface would roughly
look like this:

Interface IGridRenderer {
begin(GridView view);
beginRow(GridView view);
beginCell(GridView view);
endCell(GridView view);
endRow(GridView view);
end(GridView view);
}

Basically this is the same as my first post that inserted the html directly
but now its tucked away in a renderer. This way we don't have the
unnceessary row-wise views and you can even use OIR cleanly since it is
basically a dataview.



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] RE: DataView.setStartIndex() (Igor Vaynberg)

2005-08-16 Thread Igor Vaynberg
Well as I said when the new paging impl is done dataview will be able to
smartly move forward as opposed to always moving backward.

Meanwhile override the setfirstindex to throw the exception. I don't think
this functionality belongs in dataview.

-Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 2:17 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] RE: DataView.setStartIndex() (Igor 
 Vaynberg)
 
 
   Well, in my case, the underlying data is static. Images 
 are not going to be dynamically removed. If an exception is 
 thrown, I wish for it to be fatal. I'm just trying to mirror 
 the design in Hibernate: you can choose to catch 
 StaleObjectStateException or not. Either way, it only rarely 
 gets thrown if the underlying data may change and if the data 
 can't be change it never gets thrown.
 
   The reason you want to force developers to catch it is 
 because it usually indicates the original request is no 
 longer valid. That is, if the user operated on data which has 
 been changed or removed then he should be reprompted for 
 input because there is no graceful way to recover. Using my 
 image browsing gallery as an example, say the user clicks 
 next to move to the next page in the set of images, and we 
 find out some images were removed, in *my* implementation I 
 would catch the exception, find out what the last image is 
 and ensure that the user sees the last page because that's 
 what he meant to do... move forward, not back.
 
   I really think this is a domain-specific thing. You 
 can't know ahead of time what the developers will want to do.
 
 Gili
 
 Igor Vaynberg wrote:
  If we do add an exception we will be on the other side of 
 the fence, 
  the user now HAS to handle it. Personally, I wouldn't want 
 to have a 
  try catch block everytime I have a dataview for something 
 that can be 
  handled for me automatically. What else would you do inside 
 that catch 
  block other then redirect to first or last page?
  
  Last time I checked setStartIndex() is public so you are more then 
  welcome to override it.
  
  Public setStartIndex(int index) {
   if (index0||index==getItemCount()) {
  throw new IndexOutOfBoundsException();
  }
  super.setStartIndex(index);
  }
  
  -Igor
  
  
  
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 2:05 PM
 To: wicket-user@lists.sourceforge.net
 Subject: [Wicket-user] RE: DataView.setStartIndex() (Igor Vaynberg)
 
 
 Im not sure this is a good idea. For example, when using 
 pageabledataview lets say at the time of request 1 you have
 
 4 pages so
 
 the navigator will draw 4 links, use clicks page 4 and at 
 that time 
 there are only 3 pages because some rows were deleted. In this 
 situation would you like to deal with the exception or 
 just let the 
 listview default back to first page and only draw 3
 
 navigation links? 
 
 When the new navigation is done we can make it smarter and
 
 based on the index default ot the first or last page.
 
 Well, if the user wishes to catch the exception and 
 redirect to index 
 zero instead that's his choice to make but right now we're not even 
 giving people the choice.
 
 Gili
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO 
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
 Practices Agile  Plan-Driven Development * Managing 
 Projects  Teams 
 * Testing  QA Security * Process Improvement  Measurement * 
 http://www.sqe.com/bsce5sf 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
  
  
  
  
  
  ---
  SF.Net email is Sponsored by the Better Software Conference  EXPO 
  September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
  Practices Agile  Plan-Driven Development * Managing 
 Projects  Teams 
  * Testing  QA Security * Process Improvement  Measurement * 
  http://www.sqe.com/bsce5sf 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 --
 http://www.desktopbeautifier.com/
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development 
 Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * 
 Testing  QA
 Security * Process Improvement  Measurement * 
 http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 

RE: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Igor Vaynberg
Basically a table renderer would look something like this:
Class tablerenderer implements igridrenderer {
begin(...) {}
beginRow(GridView view) {
view.getResponse().write(tr);
}
beginCell(GridView view) {
view.getResponse().write(td);
}
...
}

Mmm this gives me an idea, we can have an excelrenderer or a csvrenderer,
etc.. Almost like an exporter.

-Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 2:36 PM
 To: wicket-user@lists.sourceforge.net
 Subject: RE: [Wicket-user] Re: ColumnedDataProvider 
 startIndex problems
 
 
   Looks ok I think although I'm not too familiar with 
 this whole concept of a seperate renderer. I'd have to try it 
 to see what I think :)
 
 Gili
 
  How about this idea:
  We have a gridview extends dataview. A gridview takes a render 
  interface that it uses to render the grid (instead of body 
 markup), so 
  we can have a tablerenderer or cssrenderer or whatever, and the 
  interface would roughly look like this:
  
  Interface IGridRenderer {
  begin(GridView view);
  beginRow(GridView view);
  beginCell(GridView view);
  endCell(GridView view);
  endRow(GridView view);
  end(GridView view);
  }
  
  Basically this is the same as my first post that inserted the html 
  directly but now its tucked away in a renderer. This way we 
 don't have 
  the unnceessary row-wise views and you can even use OIR 
 cleanly since 
  it is basically a dataview.
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  
 EXPO September 19-22, 2005 * San Francisco, CA * Development 
 Lifecycle Practices Agile  Plan-Driven Development * 
 Managing Projects  Teams * Testing  QA Security * Process 
 Improvement  Measurement * http://www.sqe.com/bsce5sf 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: How load a new TreeModel in a Tree

2005-08-16 Thread pepone pepone
thanks Elco with optimizeItemRemoval false all runs ok

On 8/16/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 I think I've got it... try setting optimizeItemRemoval on Tree to false.
 I'll make a fix so you don't have to do it, but that should work now.
 
 Eelco
 
 
 Eelco Hillenius wrote:
 
  I'll try to look at it. In the meanwhile, couldn't you just change the
  root node of the (default)treemodel you are using?
 
  Eelco
 
  pepone pepone wrote:
 
  can any body say me if there is any way to change the TreeModel
  attached to a wicket tree i´m using wicket-1.1-b2
 
  when i execute the next code the tree renders allways empty is this a
  bug?
 
  treeView.getTreeState().setModel(newTreeModel);
  treeView.modelChanged();
 
  treeView is a class that extend wicket.markup.html.Tree
 
 
 
  On 8/15/05, pepone pepone [EMAIL PROTECTED] wrote:
 
 
  Hello all
 
  I traying to update the TreeModel of a wicket Tree but i can´t do it
 
  what i trying is
 
  treeView.getTreeState().setModel(newTreeModel);
  treeView.modelChanged();
 
  but this allways render an empty tree
 
  if i pass the treeModel direct to Tree constructor the tree renders ok
 
  Any idea of how change the TreeModel of the tree component in
  execution time
 
  thanks all
 
 
 
 
 
  ---
  SF.Net email is Sponsored by the Better Software Conference  EXPO
  September 19-22, 2005 * San Francisco, CA * Development Lifecycle
  Practices
  Agile  Plan-Driven Development * Managing Projects  Teams * Testing
   QA
  Security * Process Improvement  Measurement *
  http://www.sqe.com/bsce5sf
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 
  ---
  SF.Net email is Sponsored by the Better Software Conference  EXPO
  September 19-22, 2005 * San Francisco, CA * Development Lifecycle
  Practices
  Agile  Plan-Driven Development * Managing Projects  Teams * Testing
   QA
  Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
 Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Christian Essl
Implementation wise this is definately better, OIR - again -, base it on 
DataView and no extra lines. If you can read the markup much better - I do 
not want to have that in the code. To which extend can you add attribute 
modifiers or other things you could add to a row dataItem?


Remains one thing with Phil's approach the Model has the final word on the 
columns count as it has now with the rows. I think we should keep this in 
parallel. Today there was this case with trip-booking where the column 
count was only determined by the model. Maybe still accept lists or 
collections in the iterator.


I think it also depends on paging Johan has asked there for some feedback.

Christian

On Tue, 16 Aug 2005 14:06:44 -0700, Igor Vaynberg [EMAIL PROTECTED] 
wrote:



Or we can use the body markup to render the inside of each cell...
-Igor



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Igor Vaynberg
Sent: Tuesday, August 16, 2005 2:00 PM
To: wicket-user@lists.sourceforge.net
Subject: RE: [Wicket-user] Re: ColumnedDataProvider
startIndex problems

How about this idea:
We have a gridview extends dataview. A gridview takes a
render interface that it uses to render the grid (instead of
body markup), so we can have a tablerenderer or cssrenderer
or whatever, and the interface would roughly look like this:

Interface IGridRenderer {
begin(GridView view);
beginRow(GridView view);
beginCell(GridView view);
endCell(GridView view);
endRow(GridView view);
end(GridView view);
}

Basically this is the same as my first post that inserted the
html directly but now its tucked away in a renderer. This way
we don't have the unnceessary row-wise views and you can even
use OIR cleanly since it is basically a dataview.

-Igor


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 1:40 PM
 To: wicket-user@lists.sourceforge.net
 Subject: RE: [Wicket-user] Re: ColumnedDataProvider startIndex
 problems

  I told you I didn't like it  :)  The whole process should
 be smoother,
  why cant the internal view simply get the iterator from the
 external
  view and use that. Why have a whole other wrapper/provider
 to implement.
 
  What is this offset? When using pageddataview you should
 use the page
  number to offset, when using a normal dataview you should
 use setfirstindex().
 
  -Igor

I also agree it's not as smooth as it should be, but I
also explained
 in the previous email why
 DataView.setFirstIndex() will not work. This should all be
refactored
 into a new component that is column-aware instead of having to use
 ColumnedDataProvider like we do now. I don't think there is
a cleaner
 way.

 Gili


 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle
 Practices Agile  Plan-Driven Development * Managing
Projects  Teams
 * Testing  QA Security * Process Improvement  Measurement *
 http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user







---
SF.Net email is Sponsored by the Better Software Conference 
EXPO September 19-22, 2005 * San Francisco, CA * Development
Lifecycle Practices Agile  Plan-Driven Development *
Managing Projects  Teams * Testing  QA Security * Process
Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user








---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  
QA

Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Christian Essl 






___ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list

Re: [Wicket-user] Re: How load a new TreeModel in a Tree

2005-08-16 Thread Eelco Hillenius
Good. Need a better fix though, but there's a couple of other issues to 
be fixed first. I'll try this week.


Eelco

pepone pepone wrote:


thanks Elco with optimizeItemRemoval false all runs ok

On 8/16/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 


I think I've got it... try setting optimizeItemRemoval on Tree to false.
I'll make a fix so you don't have to do it, but that should work now.

Eelco


Eelco Hillenius wrote:

   


I'll try to look at it. In the meanwhile, couldn't you just change the
root node of the (default)treemodel you are using?

Eelco

pepone pepone wrote:

 


can any body say me if there is any way to change the TreeModel
attached to a wicket tree i´m using wicket-1.1-b2

when i execute the next code the tree renders allways empty is this a
bug?

treeView.getTreeState().setModel(newTreeModel);
treeView.modelChanged();

treeView is a class that extend wicket.markup.html.Tree



On 8/15/05, pepone pepone [EMAIL PROTECTED] wrote:


   


Hello all

I traying to update the TreeModel of a wicket Tree but i can´t do it

what i trying is

treeView.getTreeState().setModel(newTreeModel);
treeView.modelChanged();

but this allways render an empty tree

if i pass the treeModel direct to Tree constructor the tree renders ok

Any idea of how change the TreeModel of the tree component in
execution time

thanks all


 



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing
 QA
Security * Process Improvement  Measurement *
http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


   



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing
 QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
 




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

   




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
 





---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PageableDataView and column cells

2005-08-16 Thread Christian Essl

Thanks,

I can not realy help you. I just browsed the discussion and I am not sure 
how the interface should look like:


Is it:
 getCurrentPage()
 setCurrentPage(int)
 getPageCount()

or should there be more in it?

For example the setNumberOfRows on a PageableListView or ListView (if we 
combine them)
who is calling that. Are we going to push it through a Navigator or are 
users want to set them directly on the listview...


As far as I understand the paging should be general useable and than ie a 
wizard has just one 'row' per page. So I think it realy depends on the 
component which shows the rows and therefore the numberOfRows should be 
set there, if it makes sense at all.


As said I know too little about it and certainly do not want to open this 
discussion again.


Christian


On Tue, 16 Aug 2005 11:10:02 +0200, Johan Compagner [EMAIL PROTECTED] 
wrote:



it's fine.
I do have a first impl now but i am still not totally convinced what we 
should do






johan


Christian Essl wrote:

Hi Johan,

Thank you. I did not want to press you so.
Sorry for sending this now. I wanted to send it last Friday but 
accidentially kept it in my out box and didn't think of it anymore when 
I sent the box. I do realy not want to press you.


Sorry,
Christian



On Fri, 12 Aug 2005 20:32:44 +0200, Johan Compagner 
[EMAIL PROTECTED] wrote:



i will start first impl this weekend

Christian Essl wrote:

Oh yes. This should be before 1.1 and idea?

On Fri, 12 Aug 2005 10:48:47 -0700, Igor Vaynberg 
[EMAIL PROTECTED] wrote:



Hopefully when the new paging impl is done there wont be a need for
Pageable-pairs :)

-Igor



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christian Essl
Sent: Friday, August 12, 2005 10:37 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] PageableDataView and column cells

Wow, that's a good one. I guess there are also others who
need it and facing the implementation (I couldn't have done
it this way) I think there is a need.

I was acutally thinking along the lines of implementing a
PageableOrderedRepeatingView and than nest another
OrderedRepeatingView.

What about having a default PageableOrderedRepeatingView -
glad there is autocompletition - which has a method
internalOnBeginRequest(int page, int startIndex, int size),
so you could do the above and maybe other things more easy by
hand. I don't have a real use-case - just a thought.

Christian

On Fri, 12 Aug 2005 09:08:25 -0700, Igor Vaynberg
[EMAIL PROTECTED]
wrote:

 Here is the quick and dirty solution. Is there enough interest to
 build a full blown grid component?

 final int cols=7;
 final int rowsPerPage=5;
 add(new PageableDataView(grid, new
ContactDataProvider(),
 cols*rowsPerPage) {
 protected void populateItem(final 
DataItem item)

 {
 Contact
 contact=(Contact)item.getModelObject();
 item.add(new Label(cell,
 contact.getFirstName()+ +contact.getLastName()));
 }
 protected void renderItem(Component 
item)

 {
 DataItem di=(DataItem)item;
 if 
(di.getIndex()%cols==0)

 getResponse().write(tr);
 super.renderItem(item);
 if
(di.getIndex()+1==getItemCount()) {
 if
(getItemCount()%cols!=0)
 {
 int
 needed=cols*((getItemCount()/cols)+1)-getItemCount();
 getResponse().write(td 
colspan=\+needed+\nbsp;/td);

 }
 }
 if 
((di.getIndex()+1)%cols==0)

 getResponse().write(/tr);
 }
 });

 ---

 table cellspacing=0 class=dataview border=1
 span wicket:id=grid
 tdspan wicket:id=cell[cell]/span/td
 /span
 /table


 -Igor




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

 Sent: Friday, August 12, 2005 7:44 AM
 To: [EMAIL PROTECTED]
 Subject: [Wicket-user] PageableDataView and column cells

 Hi,

 I'm trying to display a grid of images, for example 4
columns and 3
 rows of images, where each cell is a different entry
retrieved from
 the database with a different index/id.

 I took a look at the DisplayTag example and 
PageableDataView's

 source-code and they don't seem to be quite appropriate
for handling
 my use-case. In a nutshell, PageableDataView only has a concept 
of

 rows, where the
 populateItem(ListView) method allows one to add()
different views of
 the same database row. So for example, a given row will
have an id,
 name, description, etc...

 What I need is multiple columns per visual row where
each column is
 a distinct DB item, with a distinct ID.
 PageableDataView only increments the index outside the scope of
 populateItem() so I'm not sure 

Re: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Gili


Looks bad :)

	We should have external markup files (i.e. *.html) instead of doing 
this the old servlet/JSP way of manually writing out HTML.


Gili

Igor Vaynberg wrote:

Basically a table renderer would look something like this:
Class tablerenderer implements igridrenderer {
begin(...) {}
beginRow(GridView view) {
view.getResponse().write(tr);
}
beginCell(GridView view) {
view.getResponse().write(td);
}
...
}

Mmm this gives me an idea, we can have an excelrenderer or a csvrenderer,
etc.. Almost like an exporter.

-Igor
 




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

Sent: Tuesday, August 16, 2005 2:36 PM
To: wicket-user@lists.sourceforge.net
Subject: RE: [Wicket-user] Re: ColumnedDataProvider 
startIndex problems



	Looks ok I think although I'm not too familiar with 
this whole concept of a seperate renderer. I'd have to try it 
to see what I think :)


Gili



How about this idea:
We have a gridview extends dataview. A gridview takes a render 
interface that it uses to render the grid (instead of body 


markup), so 

we can have a tablerenderer or cssrenderer or whatever, and the 
interface would roughly look like this:


Interface IGridRenderer {
begin(GridView view);
beginRow(GridView view);
beginCell(GridView view);
endCell(GridView view);
endRow(GridView view);
end(GridView view);
}

Basically this is the same as my first post that inserted the html 
directly but now its tucked away in a renderer. This way we 


don't have 

the unnceessary row-wise views and you can even use OIR 


cleanly since 


it is basically a dataview.



---
SF.Net email is Sponsored by the Better Software Conference  
EXPO September 19-22, 2005 * San Francisco, CA * Development 
Lifecycle Practices Agile  Plan-Driven Development * 
Managing Projects  Teams * Testing  QA Security * Process 
Improvement  Measurement * http://www.sqe.com/bsce5sf 
___

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









---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Christian Essl
Wow cool. And if I'd want my 'traditional' approach I could maybe even add 
a renderer which makes DataViews per row?


On Tue, 16 Aug 2005 14:46:37 -0700, Igor Vaynberg [EMAIL PROTECTED] 
wrote:



Basically a table renderer would look something like this:
Class tablerenderer implements igridrenderer {
begin(...) {}
beginRow(GridView view) {
view.getResponse().write(tr);
}
beginCell(GridView view) {
view.getResponse().write(td);
}
...
}

Mmm this gives me an idea, we can have an excelrenderer or a csvrenderer,
etc.. Almost like an exporter.

-Igor



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Tuesday, August 16, 2005 2:36 PM
To: wicket-user@lists.sourceforge.net
Subject: RE: [Wicket-user] Re: ColumnedDataProvider
startIndex problems


Looks ok I think although I'm not too familiar with
this whole concept of a seperate renderer. I'd have to try it
to see what I think :)

Gili

 How about this idea:
 We have a gridview extends dataview. A gridview takes a render
 interface that it uses to render the grid (instead of body
markup), so
 we can have a tablerenderer or cssrenderer or whatever, and the
 interface would roughly look like this:

 Interface IGridRenderer {
begin(GridView view);
beginRow(GridView view);
beginCell(GridView view);
endCell(GridView view);
endRow(GridView view);
end(GridView view);
 }

 Basically this is the same as my first post that inserted the html
 directly but now its tucked away in a renderer. This way we
don't have
 the unnceessary row-wise views and you can even use OIR
cleanly since
 it is basically a dataview.


---
SF.Net email is Sponsored by the Better Software Conference 
EXPO September 19-22, 2005 * San Francisco, CA * Development
Lifecycle Practices Agile  Plan-Driven Development *
Managing Projects  Teams * Testing  QA Security * Process
Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user








---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  
QA

Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Christian Essl 






___ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Igor Vaynberg
There are plenty of components in wicket that write out html directly to the
response stream, sometimes it is the best and easiest solution.

In this case all we are interested in is generating a simple grid layout
that hosts cells. Is it easier to write your own renderer to customize your
css or whatever as opposed to having to write markup for two dataviews
everytime and making sure you get that exactly right.

With a renderer all you do is:

table wicket:id=grid cellspacing=0 cellpadding=2
[cell markup]
/table

Anyways, if you don't like it I wont implement it until I need it :)


-Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 3:23 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Re: ColumnedDataProvider 
 startIndex problems
 
 
   Looks bad :)
 
   We should have external markup files (i.e. *.html) 
 instead of doing this the old servlet/JSP way of manually 
 writing out HTML.
 
 Gili
 
 Igor Vaynberg wrote:
  Basically a table renderer would look something like this:
  Class tablerenderer implements igridrenderer {
  begin(...) {}
  beginRow(GridView view) {
  view.getResponse().write(tr);
  }
  beginCell(GridView view) {
  view.getResponse().write(td);
  }
  ...
  }
  
  Mmm this gives me an idea, we can have an excelrenderer or a 
  csvrenderer, etc.. Almost like an exporter.
  
  -Igor
   
  
  
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 2:36 PM
 To: wicket-user@lists.sourceforge.net
 Subject: RE: [Wicket-user] Re: ColumnedDataProvider startIndex 
 problems
 
 
 Looks ok I think although I'm not too familiar with this whole 
 concept of a seperate renderer. I'd have to try it to see 
 what I think 
 :)
 
 Gili
 
 
 How about this idea:
 We have a gridview extends dataview. A gridview takes a render 
 interface that it uses to render the grid (instead of body
 
 markup), so
 
 we can have a tablerenderer or cssrenderer or whatever, and the 
 interface would roughly look like this:
 
 Interface IGridRenderer {
begin(GridView view);
beginRow(GridView view);
beginCell(GridView view);
endCell(GridView view);
endRow(GridView view);
end(GridView view);
 }
 
 Basically this is the same as my first post that inserted the html 
 directly but now its tucked away in a renderer. This way we
 
 don't have
 
 the unnceessary row-wise views and you can even use OIR
 
 cleanly since
 
 it is basically a dataview.
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO 
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
 Practices Agile  Plan-Driven Development * Managing 
 Projects  Teams 
 * Testing  QA Security * Process Improvement  Measurement * 
 http://www.sqe.com/bsce5sf 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
  
  
  
  
  
  ---
  SF.Net email is Sponsored by the Better Software Conference  EXPO 
  September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
  Practices Agile  Plan-Driven Development * Managing 
 Projects  Teams 
  * Testing  QA Security * Process Improvement  Measurement * 
  http://www.sqe.com/bsce5sf 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 --
 http://www.desktopbeautifier.com/
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development 
 Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * 
 Testing  QA
 Security * Process Improvement  Measurement * 
 http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Spiral 12

2005-08-16 Thread Dzenan Ridjanovic

Hi,

I have a new version of the Urls application (Spiral 12 = urls12) that 
uses a tree.

Thanks to Eelco for making it possible.

Some interesting features:
Categories of urls can now be browsed within a tree with expandable and 
shrinkable nodes (Home:Categories Tree).
A member may now select a category of interest in the categories nested 
list simply by checking a category box (Home:Members:Interests).


Urls:

Spiral 12 introduction::
http://drdb.fsa.ulaval.ca/urls/web/spirals/spiral12/index.html

Spiral 12 in action:
http://drdb.fsa.ulaval.ca/urls12/app

Spiral 12 zip file:
http://drdb.fsa.ulaval.ca/urls/web/zip/urls12.zip

While testing the application I have discovered some strange things that 
I cannot explain.


CategoriesPage:
A category removal produces an exception (but it removes the member) ?!
Caused by: java.lang.NullPointerException
at wicket.Component.setResponsePage(Component.java:1214)
at 
org.wicket.urls.app.view.category.CategoriesPage.update(CategoriesPage.java:156) 


at java.util.Observable.notifyObservers(Observable.java:142)

Corrected in CategoriesPage by:
// NullPointerException in removal
// setResponsePage(new CategoriesPage(parentCategory));
Page categoriesPage = new CategoriesPage(parentCategory);
categoriesPage.onRedirect();

NewMemberPage:
After registering as a new member, the login is shown and not the home 
page (HomePage) ?!
If you login, the registration form is shown again with empty fields and 
validation errors.

Use the Home link to leave the form (you have been already logged in).
If you are confused (as I am with the reason for this), login as a 
regular member (dr, dr)

or an administrator (admin, admin).

Regards to all,

Dzenan




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Gili


Why can't we just do this?

table wicket:id=grid cellspacing=0 cellpadding=2
tr wicket:id=row
td wicket:id=columncell/td
/tr
/table

	I mean, this way you don't need special renderers (you just put all 
your stuff directly into the HTML file) and you can still do either old 
HTML tables or CSS or whatever. We allow developers to attach three IDs 
on the markup end (one for the grid, one for the row, one for the 
column) and they can use any tags (i.e. table, tr, td, div, span, etc) 
and put any markup before or after them.


Wouldn't this work?

Gili

Igor Vaynberg wrote:

There are plenty of components in wicket that write out html directly to the
response stream, sometimes it is the best and easiest solution.

In this case all we are interested in is generating a simple grid layout
that hosts cells. Is it easier to write your own renderer to customize your
css or whatever as opposed to having to write markup for two dataviews
everytime and making sure you get that exactly right.

With a renderer all you do is:

table wicket:id=grid cellspacing=0 cellpadding=2
[cell markup]
/table

Anyways, if you don't like it I wont implement it until I need it :)


-Igor
 




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

Sent: Tuesday, August 16, 2005 3:23 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: ColumnedDataProvider 
startIndex problems



Looks bad :)

	We should have external markup files (i.e. *.html) 
instead of doing this the old servlet/JSP way of manually 
writing out HTML.


Gili

Igor Vaynberg wrote:


Basically a table renderer would look something like this:
Class tablerenderer implements igridrenderer {
begin(...) {}
beginRow(GridView view) {
view.getResponse().write(tr);
}
beginCell(GridView view) {
view.getResponse().write(td);
}
...
}

Mmm this gives me an idea, we can have an excelrenderer or a 
csvrenderer, etc.. Almost like an exporter.


-Igor





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Tuesday, August 16, 2005 2:36 PM
To: wicket-user@lists.sourceforge.net
Subject: RE: [Wicket-user] Re: ColumnedDataProvider startIndex 
problems



	Looks ok I think although I'm not too familiar with this whole 
concept of a seperate renderer. I'd have to try it to see 


what I think 


:)

Gili




How about this idea:
We have a gridview extends dataview. A gridview takes a render 
interface that it uses to render the grid (instead of body


markup), so


we can have a tablerenderer or cssrenderer or whatever, and the 
interface would roughly look like this:


Interface IGridRenderer {
begin(GridView view);
beginRow(GridView view);
beginCell(GridView view);
endCell(GridView view);
endRow(GridView view);
end(GridView view);
}

Basically this is the same as my first post that inserted the html 
directly but now its tucked away in a renderer. This way we


don't have



the unnceessary row-wise views and you can even use OIR


cleanly since



it is basically a dataview.



---
SF.Net email is Sponsored by the Better Software Conference  EXPO 
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices Agile  Plan-Driven Development * Managing 


Projects  Teams 

* Testing  QA Security * Process Improvement  Measurement * 
http://www.sqe.com/bsce5sf 
___

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









---
SF.Net email is Sponsored by the Better Software Conference  EXPO 
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices Agile  Plan-Driven Development * Managing 


Projects  Teams 

* Testing  QA Security * Process Improvement  Measurement * 
http://www.sqe.com/bsce5sf 
___

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



--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development 
Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * 
Testing  QA
Security * Process Improvement  Measurement * 
http://www.sqe.com/bsce5sf

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









---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 

RE: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Igor Vaynberg
This is how it works with the columned data provider isnt it? The problem is
that there is an impedence mismatch between the idataprovider which provides
a flat list and the double dataview which tries to fit the flat list into a
grid. The renderer imho fixes that.

Anyways, as I said, no point further discussing this if the current approach
works for you.

-Igor


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 3:47 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Re: ColumnedDataProvider 
 startIndex problems
 
 
   Why can't we just do this?
 
 table wicket:id=grid cellspacing=0 cellpadding=2
   tr wicket:id=row
   td wicket:id=columncell/td
   /tr
 /table
 
   I mean, this way you don't need special renderers (you 
 just put all your stuff directly into the HTML file) and you 
 can still do either old HTML tables or CSS or whatever. We 
 allow developers to attach three IDs on the markup end (one 
 for the grid, one for the row, one for the
 column) and they can use any tags (i.e. table, tr, td, div, 
 span, etc) and put any markup before or after them.
 
   Wouldn't this work?
 
 Gili
 
 Igor Vaynberg wrote:
  There are plenty of components in wicket that write out 
 html directly 
  to the response stream, sometimes it is the best and 
 easiest solution.
  
  In this case all we are interested in is generating a simple grid 
  layout that hosts cells. Is it easier to write your own renderer to 
  customize your css or whatever as opposed to having to write markup 
  for two dataviews everytime and making sure you get that 
 exactly right.
  
  With a renderer all you do is:
  
  table wicket:id=grid cellspacing=0 cellpadding=2
  [cell markup]
  /table
  
  Anyways, if you don't like it I wont implement it until I need it :)
  
  
  -Igor
   
  
  
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 3:23 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Re: ColumnedDataProvider startIndex 
 problems
 
 
 Looks bad :)
 
 We should have external markup files (i.e. *.html) 
 instead of doing 
 this the old servlet/JSP way of manually writing out HTML.
 
 Gili
 
 Igor Vaynberg wrote:
 
 Basically a table renderer would look something like this:
 Class tablerenderer implements igridrenderer {
begin(...) {}
beginRow(GridView view) {
view.getResponse().write(tr);
}
beginCell(GridView view) {
view.getResponse().write(td);
}
...
 }
 
 Mmm this gives me an idea, we can have an excelrenderer or a 
 csvrenderer, etc.. Almost like an exporter.
 
 -Igor
  
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 2:36 PM
 To: wicket-user@lists.sourceforge.net
 Subject: RE: [Wicket-user] Re: ColumnedDataProvider startIndex 
 problems
 
 
   Looks ok I think although I'm not too familiar with this whole 
 concept of a seperate renderer. I'd have to try it to see
 
 what I think
 
 :)
 
 Gili
 
 
 
 How about this idea:
 We have a gridview extends dataview. A gridview takes a render 
 interface that it uses to render the grid (instead of body
 
 markup), so
 
 
 we can have a tablerenderer or cssrenderer or whatever, and the 
 interface would roughly look like this:
 
 Interface IGridRenderer {
  begin(GridView view);
  beginRow(GridView view);
  beginCell(GridView view);
  endCell(GridView view);
  endRow(GridView view);
  end(GridView view);
 }
 
 Basically this is the same as my first post that 
 inserted the html 
 directly but now its tucked away in a renderer. This way we
 
 don't have
 
 
 the unnceessary row-wise views and you can even use OIR
 
 cleanly since
 
 
 it is basically a dataview.
 
 
 ---
 SF.Net email is Sponsored by the Better Software 
 Conference  EXPO 
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
 Practices Agile  Plan-Driven Development * Managing
 
 Projects  Teams
 
 * Testing  QA Security * Process Improvement  Measurement * 
 http://www.sqe.com/bsce5sf 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 
 
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO 
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
 Practices Agile  Plan-Driven Development * Managing
 
 Projects  Teams
 
 * Testing  QA Security * Process Improvement  Measurement * 
 http://www.sqe.com/bsce5sf 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 

Re: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Christian Essl
I like the render idea. Maybe you could render in internalOnBeginRequest() 
and realy make a Renderer for lists of dataitems. For a  renderer which 
produces the html in code I think you could just record the strings and 
render them onRender and for a DataViewInDataView renderer just behave 
like always. Maybe with a bit of changing the renderer interface this 
could work?


Anyway it is quite late and thanks,

Christian

On Tue, 16 Aug 2005 15:34:18 -0700, Igor Vaynberg [EMAIL PROTECTED] 
wrote:


There are plenty of components in wicket that write out html directly to 
the

response stream, sometimes it is the best and easiest solution.

In this case all we are interested in is generating a simple grid layout
that hosts cells. Is it easier to write your own renderer to customize 
your

css or whatever as opposed to having to write markup for two dataviews
everytime and making sure you get that exactly right.

With a renderer all you do is:

table wicket:id=grid cellspacing=0 cellpadding=2
[cell markup]
/table

Anyways, if you don't like it I wont implement it until I need it :)


-Igor



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Tuesday, August 16, 2005 3:23 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: ColumnedDataProvider
startIndex problems


Looks bad :)

We should have external markup files (i.e. *.html)
instead of doing this the old servlet/JSP way of manually
writing out HTML.

Gili

Igor Vaynberg wrote:
 Basically a table renderer would look something like this:
 Class tablerenderer implements igridrenderer {
begin(...) {}
beginRow(GridView view) {
view.getResponse().write(tr);
}
beginCell(GridView view) {
view.getResponse().write(td);
}
...
 }

 Mmm this gives me an idea, we can have an excelrenderer or a
 csvrenderer, etc.. Almost like an exporter.

 -Igor



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Tuesday, August 16, 2005 2:36 PM
To: wicket-user@lists.sourceforge.net
Subject: RE: [Wicket-user] Re: ColumnedDataProvider startIndex
problems


Looks ok I think although I'm not too familiar with this whole
concept of a seperate renderer. I'd have to try it to see
what I think
:)

Gili


How about this idea:
We have a gridview extends dataview. A gridview takes a render
interface that it uses to render the grid (instead of body

markup), so

we can have a tablerenderer or cssrenderer or whatever, and the
interface would roughly look like this:

Interface IGridRenderer {
begin(GridView view);
beginRow(GridView view);
beginCell(GridView view);
endCell(GridView view);
endRow(GridView view);
end(GridView view);
}

Basically this is the same as my first post that inserted the html
directly but now its tucked away in a renderer. This way we

don't have

the unnceessary row-wise views and you can even use OIR

cleanly since

it is basically a dataview.


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices Agile  Plan-Driven Development * Managing
Projects  Teams
* Testing  QA Security * Process Improvement  Measurement *
http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user








 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle
 Practices Agile  Plan-Driven Development * Managing
Projects  Teams
 * Testing  QA Security * Process Improvement  Measurement *
 http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development
Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams *
Testing  QA
Security * Process Improvement  Measurement *
http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user








---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  
QA

Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf

Re: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Gili


	The current mechanism works, but it is not elegant. I really don't 
understand what impedence mismatch you're talking about though. We take 
the flat list and divide it into columns and rows, much like we're 
already doing using ColumnedDataProvider -- but all in one component 
instead of across multiple ones.


	Off the top of my head, I would take the DataViewer and add the concept 
of columns into it and I think that would be pretty elegant. No?


Gili

Igor Vaynberg wrote:

This is how it works with the columned data provider isnt it? The problem is
that there is an impedence mismatch between the idataprovider which provides
a flat list and the double dataview which tries to fit the flat list into a
grid. The renderer imho fixes that.

Anyways, as I said, no point further discussing this if the current approach
works for you.

-Igor




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

Sent: Tuesday, August 16, 2005 3:47 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: ColumnedDataProvider 
startIndex problems



Why can't we just do this?

table wicket:id=grid cellspacing=0 cellpadding=2
tr wicket:id=row
td wicket:id=columncell/td
/tr
/table

	I mean, this way you don't need special renderers (you 
just put all your stuff directly into the HTML file) and you 
can still do either old HTML tables or CSS or whatever. We 
allow developers to attach three IDs on the markup end (one 
for the grid, one for the row, one for the
column) and they can use any tags (i.e. table, tr, td, div, 
span, etc) and put any markup before or after them.


Wouldn't this work?

Gili

Igor Vaynberg wrote:

There are plenty of components in wicket that write out 


html directly 

to the response stream, sometimes it is the best and 


easiest solution.

In this case all we are interested in is generating a simple grid 
layout that hosts cells. Is it easier to write your own renderer to 
customize your css or whatever as opposed to having to write markup 
for two dataviews everytime and making sure you get that 


exactly right.


With a renderer all you do is:

table wicket:id=grid cellspacing=0 cellpadding=2
[cell markup]
/table

Anyways, if you don't like it I wont implement it until I need it :)


-Igor





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Tuesday, August 16, 2005 3:23 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: ColumnedDataProvider startIndex 
problems



Looks bad :)

	We should have external markup files (i.e. *.html) 


instead of doing 


this the old servlet/JSP way of manually writing out HTML.

Gili

Igor Vaynberg wrote:



Basically a table renderer would look something like this:
Class tablerenderer implements igridrenderer {
begin(...) {}
beginRow(GridView view) {
view.getResponse().write(tr);
}
beginCell(GridView view) {
view.getResponse().write(td);
}
...
}

Mmm this gives me an idea, we can have an excelrenderer or a 
csvrenderer, etc.. Almost like an exporter.


-Igor






-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Tuesday, August 16, 2005 2:36 PM
To: wicket-user@lists.sourceforge.net
Subject: RE: [Wicket-user] Re: ColumnedDataProvider startIndex 
problems



	Looks ok I think although I'm not too familiar with this whole 
concept of a seperate renderer. I'd have to try it to see


what I think



:)

Gili





How about this idea:
We have a gridview extends dataview. A gridview takes a render 
interface that it uses to render the grid (instead of body


markup), so



we can have a tablerenderer or cssrenderer or whatever, and the 
interface would roughly look like this:


Interface IGridRenderer {
begin(GridView view);
beginRow(GridView view);
beginCell(GridView view);
endCell(GridView view);
endRow(GridView view);
end(GridView view);
}

Basically this is the same as my first post that 


inserted the html 


directly but now its tucked away in a renderer. This way we


don't have




the unnceessary row-wise views and you can even use OIR


cleanly since




it is basically a dataview.



---
SF.Net email is Sponsored by the Better Software 


Conference  EXPO 

September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices Agile  Plan-Driven Development * Managing


Projects  Teams


* Testing  QA Security * Process Improvement  Measurement * 
http://www.sqe.com/bsce5sf 
___

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









---
SF.Net email is Sponsored by 

RE: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Igor Vaynberg
So why don't you do it?
Write a GridView component and check it in so we can take a look at it.
-Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 4:05 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Re: ColumnedDataProvider 
 startIndex problems
 
 
   The current mechanism works, but it is not elegant. I 
 really don't understand what impedence mismatch you're 
 talking about though. We take the flat list and divide it 
 into columns and rows, much like we're already doing using 
 ColumnedDataProvider -- but all in one component instead of 
 across multiple ones.
 
   Off the top of my head, I would take the DataViewer and 
 add the concept of columns into it and I think that would be 
 pretty elegant. No?
 
 Gili
 
 Igor Vaynberg wrote:
  This is how it works with the columned data provider isnt it? The 
  problem is that there is an impedence mismatch between the 
  idataprovider which provides a flat list and the double 
 dataview which 
  tries to fit the flat list into a grid. The renderer imho 
 fixes that.
  
  Anyways, as I said, no point further discussing this if the current 
  approach works for you.
  
  -Igor
  
  
  
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 3:47 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Re: ColumnedDataProvider startIndex 
 problems
 
 
 Why can't we just do this?
 
 table wicket:id=grid cellspacing=0 cellpadding=2
 tr wicket:id=row
 td wicket:id=columncell/td
 /tr
 /table
 
 I mean, this way you don't need special renderers (you 
 just put all 
 your stuff directly into the HTML file) and you can still do either 
 old HTML tables or CSS or whatever. We allow developers to attach 
 three IDs on the markup end (one for the grid, one for the row, one 
 for the
 column) and they can use any tags (i.e. table, tr, td, div, 
 span, etc) 
 and put any markup before or after them.
 
 Wouldn't this work?
 
 Gili
 
 Igor Vaynberg wrote:
 
 There are plenty of components in wicket that write out
 
 html directly
 
 to the response stream, sometimes it is the best and
 
 easiest solution.
 
 In this case all we are interested in is generating a simple grid 
 layout that hosts cells. Is it easier to write your own 
 renderer to 
 customize your css or whatever as opposed to having to 
 write markup 
 for two dataviews everytime and making sure you get that
 
 exactly right.
 
 With a renderer all you do is:
 
 table wicket:id=grid cellspacing=0 cellpadding=2
[cell markup]
 /table
 
 Anyways, if you don't like it I wont implement it until I 
 need it :)
 
 
 -Igor
  
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 3:23 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Re: ColumnedDataProvider startIndex 
 problems
 
 
   Looks bad :)
 
   We should have external markup files (i.e. *.html)
 
 instead of doing
 
 this the old servlet/JSP way of manually writing out HTML.
 
 Gili
 
 Igor Vaynberg wrote:
 
 
 Basically a table renderer would look something like this:
 Class tablerenderer implements igridrenderer {
  begin(...) {}
  beginRow(GridView view) {
  view.getResponse().write(tr);
  }
  beginCell(GridView view) {
  view.getResponse().write(td);
  }
  ...
 }
 
 Mmm this gives me an idea, we can have an excelrenderer or a 
 csvrenderer, etc.. Almost like an exporter.
 
 -Igor
 
 
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On 
 Behalf Of Gili
 Sent: Tuesday, August 16, 2005 2:36 PM
 To: wicket-user@lists.sourceforge.net
 Subject: RE: [Wicket-user] Re: ColumnedDataProvider startIndex 
 problems
 
 
 Looks ok I think although I'm not too familiar 
 with this whole 
 concept of a seperate renderer. I'd have to try it to see
 
 what I think
 
 
 :)
 
 Gili
 
 
 
 
 How about this idea:
 We have a gridview extends dataview. A gridview takes a render 
 interface that it uses to render the grid (instead of body
 
 markup), so
 
 
 
 we can have a tablerenderer or cssrenderer or 
 whatever, and the 
 interface would roughly look like this:
 
 Interface IGridRenderer {
begin(GridView view);
beginRow(GridView view);
beginCell(GridView view);
endCell(GridView view);
endRow(GridView view);
end(GridView view);
 }
 
 Basically this is the same as my first post that
 
 inserted the html
 
 directly but now its tucked away in a renderer. This way we
 
 don't have
 
 
 
 the unnceessary row-wise views and you can even use OIR
 
 cleanly since
 
 
 
 it is basically a dataview.
 
 
 ---
 SF.Net email is Sponsored by the Better Software
 
 Conference  EXPO
 
 

Re: [Wicket-user] Updating multiple database records with one form submit

2005-08-16 Thread Phil Kulak
If you used a PropertyModel or CompoundPropertyModel, then that's all
you have to do. When the form is submitted, the properties will be
updated if the form passes validation.

On 8/16/05, Anders Peterson [EMAIL PROTECTED] wrote:
 Beginner here!
 
 Stuck on a problem:
 
 1) I get all (4) records from a table in the database.
 2) Using a Form and a ListView I display all records simultaneously each
 with its own TextField
 3) I press the submit button after having changed any or all of the
 items in the form/list.
 
 How do I get these objects to be updated correctly?
 
 What kind of model should I feed the form, and what object should I feed
 that model?
 
 /Anders
 --
 http://ojalgo.org/
 
 Java Algorithms for Mathematics, Linear Algebra and Optimisation
 
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
 Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multiple checkboxes, table columns how-to in Wicket?

2005-08-16 Thread Gwyn Evans
Well, there's one (partial) solution like this

Html:
   table
tr
span wicket:id=freeServices
td valign=top width=10%
span wicket:id=cols
input type=checkbox
wicket:id=checks/span wicket:id=labelsDummy Item/spanbr/
/span
/td
/span
/tr
/table
Java:
int colSize = 10;
List checkboxes = new ArrayList(), column = new ArrayList();
for (int i = 0; i  services.size(); i++) {
column.add((Service) services.get(i));
if ((i+1) % colSize == 0) {
checkboxes.add(column);
column = new ArrayList();
}
}
if (!column.isEmpty()) {
checkboxes.add(column);
}

add(new ListView(freeServices, checkboxes) {
public void populateItem(final ListItem col) {
List column = (List) col.getModelObject();
col.add(new ListView(cols, column) {
protected void populateItem(final ListItem item) {
Service service = (Service) item.getModelObject();
item.add(new Label(labels, service.getName()));
item.add(new CheckBox(checks, new
Model(String.valueOf(service.isFree();
}
});
}
});

But there are still a number of issues such as the way I have to(?)
use both a CheckBox and a Label (html value attribute should be
available, making the Label unneeded) and the way (which I've not yet
confirmed but suspect) that I'll need to deal with the results
individually, rather than en-masse, even before my own issues such as
the hard-coded HTML 10% needing making dynamic.

All of this suggests to me that there's an area of form support that
could do with a closer look, in that it looks to me as if there's some
core functionality missing with regards to CheckBoxes used in groups,
rather than individually.

(I don't know if I can come up with anything, but it'll at least give
me a purpose in trying to understand the internals of what's happening
in forms...)

/Gwyn

On 16/08/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 td
 item1br item2br
 /td
 
 could be done just with a listview too:
 
 td
 span wicket:id=listspan wicket:id=label /br/span
 /td
 
 those spans shouldn't be in your way, and you could even set the
 rendering of the tags off.
 
 And you can nest listview as deep as you want.
 
 But I probably don't understand what you mean? :)
 
 Eelco
 
 Gwyn Evans wrote:
 
 I don't think so, or at least it's the step beyond that that I'm not
 seeing.  My tries with a  ListView gave me a repeated set of
 tditem/td blocks, (using a Label for the item), but I can't see
 how I can generate something like:-
 td
 item1br
 item2br
 ..
 item10br
 /tdtd
 item11br
 item12br
 ..
 /td
 
 I think that if the original 1-row format isn't kept, I might be able
 to do something similar, where the key might be to explicitly re-map
 the input list into a list of 'horizontal' lists, then use a series of
 tr's enclosing td's, each enclosing a single item, but that didn't
 seem to be all that simple/clean and I wondered if I was missing
 something obvious...  (Maybe I need to investigate extending
 ListMultipleChoice or it's parent, and see where that gets me.)
 
 /Gwyn
 
 On 16/08/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 
 
 First a Form. The a ListView. And for each row a Label and a CheckBox
 component? As the checkboxes paths are unique for each row, you should
 have no problems there.
 
 Doesn't that work for you?
 
 Eelco
 
 Gwyn Evans wrote:
 
 
 
 Hi,
   I'm currently trying to 'mirror' a quick  dirty JSP page in  Wicket
  wondering how best do a particular thing...
 
   I've got a list of Services, with basically a String ('name') and a
 boolean attribute ('free').  There are 90-odd of these, and I need to
 display them as checkboxes in a set of columns.  The QD JSP method
 puts them in a table, with a set of checkboxes making up a column in a
 td.../td, as below...
 
 String generateServiceTable(List services, int colSize, String
 listName) {
 int cols = (services.size() / colSize) + 1;
 StringBuffer sb = new StringBuffer();
 sb.append(table tr\n);
 int rows = 0;
 for (int i = 0, ; i  services.size(); i++) {
 Service service = (Service) services.get(i);
 if (rows == 0) {
 sb.append(td valign=top width=\ + 100 / cols +
 %\\n);
 }
 rows++;
 sb.append(input type=\checkbox\ name=\ + listName +
 \ value=\);
 sb.append(service.getName());
 sb.append(\);
 if (service.isFree()) {
 sb.append( checked);

[Wicket-user] Web Development Done Right

2005-08-16 Thread Dzenan Ridjanovic
And now there's Wicket http://wicket.sf.net. Talk about a mind blowing 
experience, it literally took me ten minutes to have a sample 
application up and running! ...

http://jroller.com/page/wireframe?entry=web_development_done_right


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Gili


	Actually, what I'd like to propose is actually going the other way. I 
propose we replace all references to rows in PageableDataView with 
cells. Here is what I have in mind:


Users can choose to insert as many or little columns per row (or rows at 
all) as they wish and insert tr or td as they see fit. They 
basically make use of the index of a DataItem (cell) to decide how to 
render it.


The benefit of this approach is extra flexibility so it is possible to 
implement tables where the first row contains one cell (i.e. the title) 
then the next couple of rows contain four cells (adding up some items) 
and then the final row contains two cells (total=, some value). This 
is possible in HTML but not possible to express using PageableDataView. 
While it is not used as frequently as fixed column/row layouts, I have 
seen it often enough on web pages.


I think once you introduce the concept of rows into PageableDataView you 
will get users who expect columns. Let's just avoid this entire 
conversation by rephrasing the problem in terms of *cells* per page and 
let the user decide on the layout.


I don't think this will result in much of a drop in ease-of-use but will 
go very far in increasing flexibility. Anyway, I'm curious to know what 
you think.


Gili

Igor Vaynberg wrote:

So why don't you do it?
Write a GridView component and check it in so we can take a look at it.
-Igor
 




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

Sent: Tuesday, August 16, 2005 4:05 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: ColumnedDataProvider 
startIndex problems



	The current mechanism works, but it is not elegant. I 
really don't understand what impedence mismatch you're 
talking about though. We take the flat list and divide it 
into columns and rows, much like we're already doing using 
ColumnedDataProvider -- but all in one component instead of 
across multiple ones.


	Off the top of my head, I would take the DataViewer and 
add the concept of columns into it and I think that would be 
pretty elegant. No?


Gili

Igor Vaynberg wrote:

This is how it works with the columned data provider isnt it? The 
problem is that there is an impedence mismatch between the 
idataprovider which provides a flat list and the double 


dataview which 

tries to fit the flat list into a grid. The renderer imho 


fixes that.

Anyways, as I said, no point further discussing this if the current 
approach works for you.


-Igor





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Tuesday, August 16, 2005 3:47 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: ColumnedDataProvider startIndex 
problems



Why can't we just do this?

table wicket:id=grid cellspacing=0 cellpadding=2
tr wicket:id=row
td wicket:id=columncell/td
/tr
/table

	I mean, this way you don't need special renderers (you 


just put all 

your stuff directly into the HTML file) and you can still do either 
old HTML tables or CSS or whatever. We allow developers to attach 
three IDs on the markup end (one for the grid, one for the row, one 
for the
column) and they can use any tags (i.e. table, tr, td, div, 


span, etc) 


and put any markup before or after them.

Wouldn't this work?

Gili

Igor Vaynberg wrote:



There are plenty of components in wicket that write out


html directly



to the response stream, sometimes it is the best and


easiest solution.


In this case all we are interested in is generating a simple grid 
layout that hosts cells. Is it easier to write your own 


renderer to 

customize your css or whatever as opposed to having to 


write markup 


for two dataviews everytime and making sure you get that


exactly right.



With a renderer all you do is:

table wicket:id=grid cellspacing=0 cellpadding=2
[cell markup]
/table

Anyways, if you don't like it I wont implement it until I 


need it :)



-Igor






-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Tuesday, August 16, 2005 3:23 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: ColumnedDataProvider startIndex 
problems



Looks bad :)

We should have external markup files (i.e. *.html)


instead of doing



this the old servlet/JSP way of manually writing out HTML.

Gili

Igor Vaynberg wrote:




Basically a table renderer would look something like this:
Class tablerenderer implements igridrenderer {
begin(...) {}
beginRow(GridView view) {
view.getResponse().write(tr);
}
beginCell(GridView view) {
view.getResponse().write(td);
}
...
}

Mmm this gives me an idea, we can have an excelrenderer or a 
csvrenderer, etc.. Almost like an exporter.


-Igor







-Original Message-
From: [EMAIL PROTECTED]

[Wicket-user] DataView, optimized item removal?

2005-08-16 Thread Gili


	It would be nice to have more documentation in DataView, like for 
example what is optimized item removal or what OIR stands for. 
Wicket's biggest weakness is the lack of good documentation. It would 
go a long way if developers made sure to only commit documented code. 
Please :)


Gili
--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] getParent recursively?

2005-08-16 Thread Gili


	You could try subclassing the ListView and pass in a reference to your 
Form directly...? It will probably be more reliable in the future if you 
move components around. Alternatively what I do is a while loop invoking 
getParent() until I hit the container object (Form in your case) or null.


Gili

Joshua Lim wrote:

Hi, I have a question regarding components and getting it's parent.

I have a Form which contains a ListView which contains a Button.

when a Button is clicked, in order to get the Form's model, I have to do
getParent().getParent().getParent().getModelObject() to go from the
ListView item (1st getParent) to ListView to Form...

is there another way of doing this ? not too sure if I got this right?
perhaps a recursive getParent? 
Josh



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] getParent recursively?

2005-08-16 Thread Gili


heh, that works too. But where's the fun in that? :) Good catch!

Gili

Igor Vaynberg wrote:

Button.getForm().getModel() :)
-Igor
 




-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
Joshua Lim

Sent: Tuesday, August 16, 2005 9:26 PM
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] getParent recursively?

Hi, I have a question regarding components and getting it's parent.

I have a Form which contains a ListView which contains a Button.

when a Button is clicked, in order to get the Form's model, I 
have to do
getParent().getParent().getParent().getModelObject() to go 
from the ListView item (1st getParent) to ListView to Form...


is there another way of doing this ? not too sure if I got this right?
perhaps a recursive getParent? 
Josh



---
SF.Net email is Sponsored by the Better Software Conference  
EXPO September 19-22, 2005 * San Francisco, CA * Development 
Lifecycle Practices Agile  Plan-Driven Development * 
Managing Projects  Teams * Testing  QA Security * Process 
Improvement  Measurement * http://www.sqe.com/bsce5sf 
___

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









---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] New to question on Wicket Application concept ?

2005-08-16 Thread Huy Do

Hi,

I'm brand spanking new to Wicket, but I love the concept. I just need 
some help with clarifying the use of WicketApplication class ? If I was 
creating an holiday booking system with different functions like booking 
a car, hotel, flights etc, would I create one wicket application class 
and have different webpage classes for the different functions or would 
I have an application class per function ?


Many thanks.

HD


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] DataView.clearCachedItemCount()

2005-08-16 Thread Igor Vaynberg
clearCachedItemCount() is part of an internal contract. I don't see why the
code you mentioned is part of the dataview. You can write a
LazyDataProviderDecorator that would implement the count() just like what
you described:

LazyDataProviderDecorator {
int count() {
if (delegate.count()==0) {
initializedelegate();
}
return delegate.count();
}

...

}

Does that make sense?

-igor

 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 9:38 PM
 To: [EMAIL PROTECTED]
 Subject: [Wicket-user] DataView.clearCachedItemCount()
 
 Hi Igor,
 
   I'd like clearCachedItemCount() to become protected 
 (right now it is
 private) because my code does the following:
 
 - Check the number of images in the DataProvider
 - If the image count is zero, it means we need to 
 lazily-initialize the image gallery (where the DataProvider 
 is reading from)
 - Populate the gallery, reset the itemCount and continue ...
 - Rendering process kicks in, it should see a non-zero value 
 for item count.
 
   Is this a decent use-case? Are you fine with upgrading 
 accessibility to protected?
 
 Thanks,
 Gili
 --
 http://www.desktopbeautifier.com/
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development 
 Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * 
 Testing  QA
 Security * Process Improvement  Measurement * 
 http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Spam] [Wicket-user] New to question on Wicket Application concept ?

2005-08-16 Thread Igor Vaynberg
An application class is used to store global functionality, ie there is only
one instance of the wicketapplication subclass for your entire application.
The WebPages are equivalent to indivudal jsps, so you can have a
RegisterCarPage, RegisterHotelPage, etc. 

Does that make sense?

-Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 9:39 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Spam] [Wicket-user] New to question on Wicket 
 Application concept ?
 
 
   Applications let you group application-wide settings 
 like Page aliases, HTTP redirection strategy, etc (take a 
 look at ApplicationSettings for the full list). I suggest 
 grouping all (related) pages with the same settings under the 
 same application.
 
 Gili
 
 Huy Do wrote:
  Hi,
  
  I'm brand spanking new to Wicket, but I love the concept. I 
 just need 
  some help with clarifying the use of WicketApplication class ? If I 
  was creating an holiday booking system with different 
 functions like 
  booking a car, hotel, flights etc, would I create one wicket 
  application class and have different webpage classes for 
 the different 
  functions or would I have an application class per function ?
  
  Many thanks.
  
  HD
  
  
  ---
  SF.Net email is Sponsored by the Better Software Conference  EXPO 
  September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
  Practices Agile  Plan-Driven Development * Managing 
 Projects  Teams 
  * Testing  QA Security * Process Improvement  Measurement * 
  http://www.sqe.com/bsce5sf 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 --
 http://www.desktopbeautifier.com/
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development 
 Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * 
 Testing  QA
 Security * Process Improvement  Measurement * 
 http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Spam] [Wicket-user] New to question on Wicket Application concept ?

2005-08-16 Thread Huy Do

Perfect sense. Thanks Igor and Gili for your help.

It was just a bit confusing looking at all the examples (cdapp etc) and 
seeing the way things are structured.


Regards,

HD

Igor Vaynberg wrote:


An application class is used to store global functionality, ie there is only
one instance of the wicketapplication subclass for your entire application.
The WebPages are equivalent to indivudal jsps, so you can have a
RegisterCarPage, RegisterHotelPage, etc. 


Does that make sense?

-Igor


 


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

Sent: Tuesday, August 16, 2005 9:39 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Spam] [Wicket-user] New to question on Wicket 
Application concept ?



	Applications let you group application-wide settings 
like Page aliases, HTTP redirection strategy, etc (take a 
look at ApplicationSettings for the full list). I suggest 
grouping all (related) pages with the same settings under the 
same application.


Gili

Huy Do wrote:
   


Hi,

I'm brand spanking new to Wicket, but I love the concept. I 
 

just need 
   

some help with clarifying the use of WicketApplication class ? If I 
was creating an holiday booking system with different 
 

functions like 
   

booking a car, hotel, flights etc, would I create one wicket 
application class and have different webpage classes for 
 

the different 
   


functions or would I have an application class per function ?

Many thanks.

HD


---
SF.Net email is Sponsored by the Better Software Conference  EXPO 
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices Agile  Plan-Driven Development * Managing 
 

Projects  Teams 
   

* Testing  QA Security * Process Improvement  Measurement * 
http://www.sqe.com/bsce5sf 
___

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

 


--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development 
Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * 
Testing  QA
Security * Process Improvement  Measurement * 
http://www.sqe.com/bsce5sf

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



   






---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

 





---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataView.clearCachedItemCount()

2005-08-16 Thread Gili


	Right, getting at the underlying IDataProvider is a better solution. 
Thank you :)


Gili

Igor Vaynberg wrote:

clearCachedItemCount() is part of an internal contract. I don't see why the
code you mentioned is part of the dataview. You can write a
LazyDataProviderDecorator that would implement the count() just like what
you described:

LazyDataProviderDecorator {
int count() {
if (delegate.count()==0) {
initializedelegate();
}
return delegate.count();
}

...

}

Does that make sense?

-igor

 




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

Sent: Tuesday, August 16, 2005 9:38 PM
To: [EMAIL PROTECTED]
Subject: [Wicket-user] DataView.clearCachedItemCount()

Hi Igor,

	I'd like clearCachedItemCount() to become protected 
(right now it is

private) because my code does the following:

- Check the number of images in the DataProvider
- If the image count is zero, it means we need to 
lazily-initialize the image gallery (where the DataProvider 
is reading from)

- Populate the gallery, reset the itemCount and continue ...
- Rendering process kicks in, it should see a non-zero value 
for item count.


	Is this a decent use-case? Are you fine with upgrading 
accessibility to protected?


Thanks,
Gili
--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development 
Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * 
Testing  QA
Security * Process Improvement  Measurement * 
http://www.sqe.com/bsce5sf

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









---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] DataView.clearCachedItemCount()

2005-08-16 Thread Igor Vaynberg
Err...
LazyDataProviderDecorator implements IDataProvider...
-Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Igor Vaynberg
 Sent: Tuesday, August 16, 2005 9:49 PM
 To: wicket-user@lists.sourceforge.net
 Subject: RE: [Wicket-user] DataView.clearCachedItemCount()
 
 clearCachedItemCount() is part of an internal contract. I 
 don't see why the code you mentioned is part of the dataview. 
 You can write a LazyDataProviderDecorator that would 
 implement the count() just like what you described:
 
 LazyDataProviderDecorator {
   int count() {
   if (delegate.count()==0) {
   initializedelegate();
   }
   return delegate.count();
   }
 
 ...
 
 }
 
 Does that make sense?
 
 -igor
 
  
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Gili
  Sent: Tuesday, August 16, 2005 9:38 PM
  To: [EMAIL PROTECTED]
  Subject: [Wicket-user] DataView.clearCachedItemCount()
  
  Hi Igor,
  
  I'd like clearCachedItemCount() to become protected 
 (right now it is
  private) because my code does the following:
  
  - Check the number of images in the DataProvider
  - If the image count is zero, it means we need to lazily-initialize 
  the image gallery (where the DataProvider is reading from)
  - Populate the gallery, reset the itemCount and continue ...
  - Rendering process kicks in, it should see a non-zero 
 value for item 
  count.
  
  Is this a decent use-case? Are you fine with upgrading 
 accessibility 
  to protected?
  
  Thanks,
  Gili
  --
  http://www.desktopbeautifier.com/
  
  
  ---
  SF.Net email is Sponsored by the Better Software Conference  EXPO 
  September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
  Practices Agile  Plan-Driven Development * Managing 
 Projects  Teams 
  * Testing  QA Security * Process Improvement  Measurement * 
  http://www.sqe.com/bsce5sf 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
 
 
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  
 EXPO September 19-22, 2005 * San Francisco, CA * Development 
 Lifecycle Practices Agile  Plan-Driven Development * 
 Managing Projects  Teams * Testing  QA Security * Process 
 Improvement  Measurement * http://www.sqe.com/bsce5sf 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Gili


Ok, turns out that using DataView is no good :(

The markup contains:

  div wicket:id=imageRow class=floatfix
div class=imageColumn
  cell data
/div
  /div

	and I only want to issue a imageRow once every X columns. The 
problem, I just realized, is that the imageRow tag wraps a single 
imageColumn tag and I'd really like for it to wrap multiple imageColumn 
tags. Any ideas, short of outputting multiple columns in a single call 
to populateItem()? Now I am beginning to see why it is a bad idea to 
only have a concept of cells :(


	I can see how to get this working under DataView but it will result in 
a very unelegant solution :(


Gili

Gili wrote:


Right, I think I prefer this method now. I think what is really 
missing in the end is the documentation aspect, not Javadoc but a 
full-fledged Wiki example for how to use it to produce rows and columns. 
Time-allowing, I'll try posting something to that effect in the near 
future.



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Igor Vaynberg
This would be really easy with the renderer :)

try something like this, maybe it will work

div wicket:id=maindataview
div wicket:id=rowview
[cell markup]
/div
div class=floatfix/
/div

-Igor 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 10:02 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Re: ColumnedDataProvider 
 startIndex problems
 
 
   Ok, turns out that using DataView is no good :(
 
   The markup contains:
 
div wicket:id=imageRow class=floatfix
  div class=imageColumn
cell data
  /div
/div
 
   and I only want to issue a imageRow once every X 
 columns. The problem, I just realized, is that the imageRow 
 tag wraps a single imageColumn tag and I'd really like for it 
 to wrap multiple imageColumn tags. Any ideas, short of 
 outputting multiple columns in a single call to 
 populateItem()? Now I am beginning to see why it is a bad 
 idea to only have a concept of cells :(
 
   I can see how to get this working under DataView but it 
 will result in a very unelegant solution :(
 
 Gili
 
 Gili wrote:
  
  Right, I think I prefer this method now. I think what is really 
  missing in the end is the documentation aspect, not Javadoc but a 
  full-fledged Wiki example for how to use it to produce rows 
 and columns.
  Time-allowing, I'll try posting something to that effect in 
 the near 
  future.
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development 
 Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * 
 Testing  QA
 Security * Process Improvement  Measurement * 
 http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] getParent recursively?

2005-08-16 Thread Joshua Lim
I like Igor's method a little better ;)
 but thanks for the suggestion 

On 8/17/05, Gili [EMAIL PROTECTED] wrote:
 
 heh, that works too. But where's the fun in that? :) Good catch!
 
 Gili
 
 Igor Vaynberg wrote:
  Button.getForm().getModel() :)
  -Igor
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 Joshua Lim
 Sent: Tuesday, August 16, 2005 9:26 PM
 To: wicket-user@lists.sourceforge.net
 Subject: [Wicket-user] getParent recursively?
 
 Hi, I have a question regarding components and getting it's parent.
 
 I have a Form which contains a ListView which contains a Button.
 
 when a Button is clicked, in order to get the Form's model, I
 have to do
 getParent().getParent().getParent().getModelObject() to go
 from the ListView item (1st getParent) to ListView to Form...
 
 is there another way of doing this ? not too sure if I got this right?
 perhaps a recursive getParent?
 Josh
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference 
 EXPO September 19-22, 2005 * San Francisco, CA * Development
 Lifecycle Practices Agile  Plan-Driven Development *
 Managing Projects  Teams * Testing  QA Security * Process
 Improvement  Measurement * http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 
 
 
 
  ---
  SF.Net email is Sponsored by the Better Software Conference  EXPO
  September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
  Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
  Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 --
 http://www.desktopbeautifier.com/
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
 Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
 Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Gili


	sigh I said I disliked the idea of outputting HTML from Java code 
because this is very much like plain servlets or JSP, both of which are 
notoriously ugly doing this. Well anyway, if this component is fully 
theoretical, I guess I can't very well try it.


How about this idea?

div wicket:id=row
div wicket:id=column
cell data
/div
/div

	It would sort of work like ColumnedDataProvider did but cleaner. In the 
above example you'd have two instances of the same class (similar to 
ListView, I'm going to call it MyListView) that would share the same 
state information. So, allow me to walk you through the rendering 
process chronologically:


1) Construct MyListView for row, pass in IDataProvider into constructor
2) Construct MyListView for column, pass in row MyListView into constructor
3) Now, when populateItem() is invoked for either the row or column, the 
item's getIndex() will be shared among the two... what this means is 
that the index will be relative to the original IDataProvider, not 
relative to the MyListView passed into the constructor. populateItem() 
will be passed a DataItem for both row and column.


	See what I mean? It's very flexible in that you can nested multiple 
layers but at the same time the overall state is shared so you know what 
your actual index is.


What do you think?

Gili

Igor Vaynberg wrote:

You don't, that was the concept I proposed earlier and the one you said was
bad :)

http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg04192.html

-Igor
 




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

Sent: Tuesday, August 16, 2005 10:10 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: ColumnedDataProvider 
startIndex problems



Where do I find the renderer Java class?

Gili

Igor Vaynberg wrote:


This would be really easy with the renderer :)

try something like this, maybe it will work

div wicket:id=maindataview
div wicket:id=rowview
[cell markup]
/div
div class=floatfix/
/div

-Igor




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Tuesday, August 16, 2005 10:02 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: ColumnedDataProvider startIndex 
problems



Ok, turns out that using DataView is no good :(

The markup contains:

 div wicket:id=imageRow class=floatfix
   div class=imageColumn
 cell data
   /div
 /div

	and I only want to issue a imageRow once every X columns. The 
problem, I just realized, is that the imageRow tag wraps a single 
imageColumn tag and I'd really like for it to wrap multiple 
imageColumn tags. Any ideas, short of outputting multiple 


columns in a 

single call to populateItem()? Now I am beginning to see 


why it is a 


bad idea to only have a concept of cells :(

	I can see how to get this working under DataView but it 


will result 


in a very unelegant solution :(

Gili

Gili wrote:


  Right, I think I prefer this method now. I think what 


is really 

missing in the end is the documentation aspect, not Javadoc but a 
full-fledged Wiki example for how to use it to produce rows


and columns.



Time-allowing, I'll try posting something to that effect in


the near



future.



---
SF.Net email is Sponsored by the Better Software Conference  EXPO 
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices Agile  Plan-Driven Development * Managing 


Projects  Teams 

* Testing  QA Security * Process Improvement  Measurement * 
http://www.sqe.com/bsce5sf 
___

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









---
SF.Net email is Sponsored by the Better Software Conference  EXPO 
September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
Practices Agile  Plan-Driven Development * Managing 


Projects  Teams 

* Testing  QA Security * Process Improvement  Measurement * 
http://www.sqe.com/bsce5sf 
___

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



--
http://www.desktopbeautifier.com/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development 
Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * 
Testing  QA
Security * Process Improvement  Measurement * 
http://www.sqe.com/bsce5sf

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net

RE: [Wicket-user] Re: ColumnedDataProvider startIndex problems

2005-08-16 Thread Igor Vaynberg
I don't understand what you are talking about below...share state? In order
for your markup to be nested like that you are going to have to add column
to row which will make row repeat column dataprovider.count() times.
Not sure that's what you want.

Why don't you try it and tell us if it works.

-Igor
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 10:36 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Re: ColumnedDataProvider 
 startIndex problems
 
 
   sigh I said I disliked the idea of outputting HTML 
 from Java code because this is very much like plain servlets 
 or JSP, both of which are notoriously ugly doing this. Well 
 anyway, if this component is fully theoretical, I guess I 
 can't very well try it.
 
   How about this idea?
 
 div wicket:id=row
   div wicket:id=column
   cell data
   /div
 /div
 
   It would sort of work like ColumnedDataProvider did but 
 cleaner. In the above example you'd have two instances of the 
 same class (similar to ListView, I'm going to call it 
 MyListView) that would share the same state information. So, 
 allow me to walk you through the rendering process chronologically:
 
 1) Construct MyListView for row, pass in IDataProvider into 
 constructor
 2) Construct MyListView for column, pass in row MyListView 
 into constructor
 3) Now, when populateItem() is invoked for either the row or 
 column, the item's getIndex() will be shared among the two... 
 what this means is that the index will be relative to the 
 original IDataProvider, not relative to the MyListView passed 
 into the constructor. populateItem() will be passed a 
 DataItem for both row and column.
 
   See what I mean? It's very flexible in that you can 
 nested multiple layers but at the same time the overall state 
 is shared so you know what your actual index is.
 
   What do you think?
 
 Gili
 
 Igor Vaynberg wrote:
  You don't, that was the concept I proposed earlier and the one you 
  said was bad :)
  
  
 http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg04192
  .html
  
  -Igor
   
  
  
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 10:10 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Re: ColumnedDataProvider startIndex 
 problems
 
 
 Where do I find the renderer Java class?
 
 Gili
 
 Igor Vaynberg wrote:
 
 This would be really easy with the renderer :)
 
 try something like this, maybe it will work
 
 div wicket:id=maindataview
div wicket:id=rowview
[cell markup]
/div
div class=floatfix/
 /div
 
 -Igor
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Gili
 Sent: Tuesday, August 16, 2005 10:02 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Re: ColumnedDataProvider startIndex 
 problems
 
 
   Ok, turns out that using DataView is no good :(
 
   The markup contains:
 
   div wicket:id=imageRow class=floatfix
 div class=imageColumn
   cell data
 /div
   /div
 
   and I only want to issue a imageRow once every X columns. The 
 problem, I just realized, is that the imageRow tag wraps a single 
 imageColumn tag and I'd really like for it to wrap multiple 
 imageColumn tags. Any ideas, short of outputting multiple
 
 columns in a
 
 single call to populateItem()? Now I am beginning to see
 
 why it is a
 
 bad idea to only have a concept of cells :(
 
   I can see how to get this working under DataView but it
 
 will result
 
 in a very unelegant solution :(
 
 Gili
 
 Gili wrote:
 
 
Right, I think I prefer this method now. I think what
 
 is really
 
 missing in the end is the documentation aspect, not 
 Javadoc but a 
 full-fledged Wiki example for how to use it to produce rows
 
 and columns.
 
 
 Time-allowing, I'll try posting something to that effect in
 
 the near
 
 
 future.
 
 
 ---
 SF.Net email is Sponsored by the Better Software 
 Conference  EXPO 
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
 Practices Agile  Plan-Driven Development * Managing
 
 Projects  Teams
 
 * Testing  QA Security * Process Improvement  Measurement * 
 http://www.sqe.com/bsce5sf 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 
 
 
 
 ---
 SF.Net email is Sponsored by the Better Software Conference  EXPO 
 September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
 Practices Agile  Plan-Driven Development * Managing
 
 Projects  Teams
 
 * Testing  QA Security * Process Improvement  Measurement * 
 

Re: [Wicket-user] Multiple checkboxes, table columns how-to in Wicket?

2005-08-16 Thread Eelco Hillenius



But there are still a number of issues such as the way I have to(?)
use both a CheckBox and a Label (html value attribute should be
available, making the Label unneeded)

If you want that, work with AttributeModifiers or make you custom 
CheckBox class that renders the tag in the way you want.



and the way (which I've not yet
confirmed but suspect) that I'll need to deal with the results
individually, rather than en-masse, even before my own issues such as
the hard-coded HTML 10% needing making dynamic.
 



No, that should be the beauty of it all, it can be fully automatic. Put 
the ListView with your checkboxes  in a Form and it should all work 
automatically. Provide the ListView with a List where each object has a 
boolean property (with a getter and setter) you use with your 
checkboxes. For each list item, use e.g. a PropertyModel.


Note that if you are using detachable models (e.g. your list), if you 
don't do anything in the form's submit method (like persisting your 
changes), the next time the list renders it will use the same old value, 
which could give you the idea nothing happened.



All of this suggests to me that there's an area of form support that
could do with a closer look, in that it looks to me as if there's some
core functionality missing with regards to CheckBoxes used in groups,
rather than individually.
 


Any idea that makes Wicket better is welcome :)

Eelco


(I don't know if I can come up with anything, but it'll at least give
me a purpose in trying to understand the internals of what's happening
in forms...)

/Gwyn

 





---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user