Re: remove all behaviors of a certain type

2007-08-10 Thread Igor Vaynberg
you have getbehaviors() and removebehavior(), the rest belongs in some WicketUtil class you write. -igor On 8/10/07, Sean Sullivan <[EMAIL PROTECTED]> wrote: > > The Component class provides a method for removing a single IBehavior > object: > > public Component remove(final IBehavior behavi

remove all behaviors of a certain type

2007-08-10 Thread Sean Sullivan
The Component class provides a method for removing a single IBehavior object: public Component remove(final IBehavior behavior) Is there a similar method that will allow me to remove all IBehaviors of a certain type? I'd like to be able to do this: Panel p; ... p.removeBehaviorsW

RequestDispather.forward()

2007-08-10 Thread Joel Hill
Would the fact that wicket now uses a filter instead of a servlet have an effect on trying to forward a request. I'm trying to forward a request from the jsp/servlet portion of our app to a bookmarkable wicket page using RequestDispatcher.forward(), but no matter what sort of path I send it, I get

Re: Still need a little help putting hyperlinks in a CheckBox's label

2007-08-10 Thread Igor Vaynberg
final CheckBox cb=new CheckBox("cb"); cb.setOutputMarkupId(true); WebMarkupContainer label=new WebMarkupContainer("label") { oncomponenttag(tag) { tag.put("for", cb.getMarkupId()); } label.add(new PageLink("terms", TermsPage.class)); label.add(new PageLink("policy", PolicyPage.class)); agree t

Still need a little help putting hyperlinks in a CheckBox's label

2007-08-10 Thread Justin Morgan (Logic Sector)
Hi, I asked this question before but didn't really understand the response. I need to create a CheckBox at the bottom of a form (ordinarily this is easy enough). The tricky part is that the check box's label will contain two hyperlinks that correspond to the underlined text in the examp

Re: newbie: best practice for not rendering component?

2007-08-10 Thread Johan Maasing
On 8/9/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > As for the error-flow, and I don't really see why: > > try { > ...query the database and build the provider and dataview > } catch (SQLException e) { > feedback.error("Very bad things happened"); > // What to do here?? > } > > should gener

Re: Menu implementation?

2007-08-10 Thread Eelco Hillenius
On 8/10/07, James McLaughlin <[EMAIL PROTECTED]> wrote: > I have a functional base for this already in wicket-contrib-yui trunk. > Needs a friendlier api and a bit of polish, but all the pieces are > there. I've been very short on time, so if anyone feels like picking > it up that would be great.

Re: How Can I Implement a Dynamic Table?

2007-08-10 Thread Igor Vaynberg
see DataTable -igor On 8/10/07, Pantaleoni, Andrea (KCTU) <[EMAIL PROTECTED]> wrote: > > Hello, > I have to implement a dynamic table: depending on user choices or values > of > fields in database, the number of columns could change. > e.g. In same case I can have 3 columns containing Labels or

Re: How Can I Implement a Dynamic Table?

2007-08-10 Thread Igor Vaynberg
you can use a listview inside a listview to achieve what you want. but there is already a made component that fits the bill: datatatble. see wicket-examples under repeaters -igor On 8/10/07, code runner <[EMAIL PROTECTED]> wrote: > > > Hello, > I have to implement a dynamic table: depending on

Re: Problem with uploading files

2007-08-10 Thread Igor Vaynberg
looks like fileInputStream is a field on your page, but it isnt serializable. so dont store it as a field -igor On 8/10/07, legol <[EMAIL PROTECTED]> wrote: > > > Iam doing something like this: > > FileUpload upload = uploadField.getFileUpload(); > if(upload!=null) { >

RE: How Can I Implement a Dynamic Table?

2007-08-10 Thread Pantaleoni, Andrea (KCTU)
Thanks, this a nice workaround I mean to put component.setvisible(false) depending of some parameters value. the only not convenient thing is, I belevie, that the application load anyway a lot of useless data from database. In reality I think that in the future ListView component should be just a

Re: How Can I Implement a Dynamic Table?

2007-08-10 Thread Peter Thomas
On 8/10/07, Pantaleoni, Andrea (KCTU) <[EMAIL PROTECTED]> wrote: > > Normally you put in the wicket:id of the listview component and in > > the single component previously added in the listview > How could you manage that with two listview in the manner you indicate?? > Have you ever tried that?

Re: getting component parent

2007-08-10 Thread Martijn Dashorst
Another option is to override onBeforeRender The problem is that the component is not added to the parent in the constructor yet: add(new Foo()); First Foo constructor is called, then the add... In your case, having an explicit contract about the parent isn't too bad though. Gives an opportunit

RE: How Can I Implement a Dynamic Table?

2007-08-10 Thread Pantaleoni, Andrea (KCTU)
Normally you put in the wicket:id of the listview component and in the single component previously added in the listview How could you manage that with two listview in the manner you indicate?? Have you ever tried that? are you sure? Anyway I guess the problem of the match between components in f

Re: Menu implementation?

2007-08-10 Thread James McLaughlin
I have a functional base for this already in wicket-contrib-yui trunk. Needs a friendlier api and a bit of polish, but all the pieces are there. I've been very short on time, so if anyone feels like picking it up that would be great. On 8/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > Nope.

Re: How Can I Implement a Dynamic Table?

2007-08-10 Thread Paolo Di Tommaso
There are many ways .. For example you can have two nested ListView, for example: value The first iterate over the row as usual, and the second over the columns. The problem can be reduced to have a valid model to specify the columns. This could be done, with a simple array of bean attr

RE: getting component parent

2007-08-10 Thread Pantaleoni, Andrea (KCTU)
Actually I'm using use 1.2 -Original Message- From: Will Jaynes [mailto:[EMAIL PROTECTED] Sent: 10 August 2007 13:52 To: users@wicket.apache.org Subject: getting component parent Using 1.3. I have a panel which needs to create different internal components depending on who it's parent

getting component parent

2007-08-10 Thread Will Jaynes
Using 1.3. I have a panel which needs to create different internal components depending on who it's parent is. However, calling getParent() in the constructor gives me null. I can make a constuctor that passes in the parent. But I wonder if there is a different way. Is there some other point wh

How Can I Implement a Dynamic Table?

2007-08-10 Thread Pantaleoni, Andrea (KCTU)
Hello, I have to implement a dynamic table: depending on user choices or values of fields in database, the number of columns could change. e.g. In same case I can have 3 columns containing Labels or in other cases 5 containing Labels and form components(and so on). To do that I'm using a ListView i

How Can I Implement a Dynamic Table?

2007-08-10 Thread code runner
Hello, I have to implement a dynamic table: depending on user choices or values of fields in database, the number of columns could change. e.g. In same case I can have 3 columns containing Labels or in other cases 5 containing Labels and form components(and so on). To do that I'm using a ListView

Problem with uploading files

2007-08-10 Thread legol
Iam doing something like this: FileUpload upload = uploadField.getFileUpload(); if(upload!=null) { try { fileInputStream = upload.getInputStream(); } catch(IOException

Re: Menu implementation?

2007-08-10 Thread Ayodeji Aladejebi
i once thought of building menus but realized that the problem with menu is that there are a million types based on different styles and javascripts out there. compiling a factory of them is work indeed and the API will just swell your wicket project. :) I have a simple implementation like this da

Re: Menu implementation?

2007-08-10 Thread David Leangen
> > Is there no menu component available somewhere? I looked > > around in wicket and extensions, but didn't see one... > Nope. There was one wicket-stuff project a while ago, but that wasn't > too great (I'm guilty). Ah! That's where I met you before... in a Crappy Code prison cell... > I th