Re: Usage of Servlets in Wicket, How ?

2009-09-07 Thread Jeremy Thomerson
Maybe if you mention the specific reason(s) that you want to use Apache
Commons FileUpload API rather than Wicket's built-in forms and file upload
mechanisms, someone on the list will be able to provide you with more help.
It seems that the FileUpload API is intended to help you if you have to
write servlets to handle forms.  But with Wicket, you don't have to do
this.  And if you use ACFU API, then you lose the rest of Wicket's stateful
form handling.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Sep 8, 2009 at 1:04 AM, FaRHaN  wrote:

>
>
> I want to upload files through Commons FIleUpload API. As Commons
> FileUpload API requires HttpServletRequest for uploading files (e.g.
> fileItemsList = servletFileUpload.parseRequest(httpServletRequest)).
> Parsing HttpServletRequest is the necessary step while uploading in Commons
> FileUpload.
>
> I have got httpServletRequest from RequestCycle. e.g. ((ServletWebRequest)
> getRequest()).getHttpServletRequest() or
> ((WebRequest)requestCycle.getRequest()).getHttpServletRequest() but this
> request already being parsed automatically in RequestCycle, before reaching
> servletFileUpload.parseRequest(httpServletRequest). So, "Request is already
> been parsed..." exception occur.
>
> That's why i want to use Servlet's doGet(request, response) method for
> getting HttpServletRequest(without parsing).
>
> If not servlets, Is there any other way to handle FileUploading (through
> Apache Commons API) in wicket ?
>
> Thanks...
>
>
> 
> From: Peter Thomas 
> To: users@wicket.apache.org
> Sent: Tuesday, September 8, 2009 11:39:58 AM
> Subject: Re: Usage of Servlets in Wicket, How ?
>
> Refer this:
>
>
> http://cwiki.apache.org/WICKET/how-to-redirect-to-an-external-non-wicket-page.html
>
> If that doesn't help you should briefly explain what your requirement is.
> There may be a better way to achieve it within Wicket instead of hacking
> around with servlets.
>
> On Tue, Sep 8, 2009 at 10:57 AM, FaRHaN  wrote:
>
> > but how can we call it from our wicket web page ?
> >
> >
> >
> >
> > 
> > From: Jeremy Thomerson 
> > To: users@wicket.apache.org
> > Sent: Tuesday, September 8, 2009 11:10:49 AM
> > Subject: Re: Usage of Servlets in Wicket, How ?
> >
> > servlets are totally separate from Wicket - write a servlet and add it to
> > your web.xml.  See any servlet example on the web (non-Wicket related)
> for
> > assistance.
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
> >
> > On Mon, Sep 7, 2009 at 11:54 PM, FaRHaN  wrote:
> >
> > > Hi,
> > >
> > > Is there any example in Wicket that uses Servlets (doGet() & doPost()).
> I
> > > mean how can we configure Servlets in our wicket application and use
> > > doGet(request, response) & doPost(request, response) methods. I know
> > web.xml
> > > configuration for Servlets but how can we use doGet() & doPost()
> methods.
> > Do
> > > we need wicket:ids in Servlets ?
> > > Is there any reference for such type of example ?
> > >
> > > Thanks...
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
>
>
>
>
>


Re: Usage of Servlets in Wicket, How ?

2009-09-07 Thread FaRHaN


I want to upload files through Commons FIleUpload API. As Commons FileUpload 
API requires HttpServletRequest for uploading files (e.g. fileItemsList = 
servletFileUpload.parseRequest(httpServletRequest)). 
Parsing HttpServletRequest is the necessary step while uploading in Commons 
FileUpload.

I have got httpServletRequest from RequestCycle. e.g. ((ServletWebRequest) 
getRequest()).getHttpServletRequest() or 
((WebRequest)requestCycle.getRequest()).getHttpServletRequest() but this 
request already being parsed automatically in RequestCycle, before reaching 
servletFileUpload.parseRequest(httpServletRequest). So, "Request is already 
been parsed..." exception occur. 

That's why i want to use Servlet's doGet(request, response) method for getting 
HttpServletRequest(without parsing). 

If not servlets, Is there any other way to handle FileUploading (through Apache 
Commons API) in wicket ?

Thanks...



From: Peter Thomas 
To: users@wicket.apache.org
Sent: Tuesday, September 8, 2009 11:39:58 AM
Subject: Re: Usage of Servlets in Wicket, How ?

Refer this:

http://cwiki.apache.org/WICKET/how-to-redirect-to-an-external-non-wicket-page.html

If that doesn't help you should briefly explain what your requirement is.
There may be a better way to achieve it within Wicket instead of hacking
around with servlets.

On Tue, Sep 8, 2009 at 10:57 AM, FaRHaN  wrote:

> but how can we call it from our wicket web page ?
>
>
>
>
> 
> From: Jeremy Thomerson 
> To: users@wicket.apache.org
> Sent: Tuesday, September 8, 2009 11:10:49 AM
> Subject: Re: Usage of Servlets in Wicket, How ?
>
> servlets are totally separate from Wicket - write a servlet and add it to
> your web.xml.  See any servlet example on the web (non-Wicket related) for
> assistance.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, Sep 7, 2009 at 11:54 PM, FaRHaN  wrote:
>
> > Hi,
> >
> > Is there any example in Wicket that uses Servlets (doGet() & doPost()). I
> > mean how can we configure Servlets in our wicket application and use
> > doGet(request, response) & doPost(request, response) methods. I know
> web.xml
> > configuration for Servlets but how can we use doGet() & doPost() methods.
> Do
> > we need wicket:ids in Servlets ?
> > Is there any reference for such type of example ?
> >
> > Thanks...
> >
> >
> >
> >
>
>
>
>
>



  

Re: Usage of Servlets in Wicket, How ?

2009-09-07 Thread Peter Thomas
Refer this:

http://cwiki.apache.org/WICKET/how-to-redirect-to-an-external-non-wicket-page.html

If that doesn't help you should briefly explain what your requirement is.
There may be a better way to achieve it within Wicket instead of hacking
around with servlets.

On Tue, Sep 8, 2009 at 10:57 AM, FaRHaN  wrote:

> but how can we call it from our wicket web page ?
>
>
>
>
> 
> From: Jeremy Thomerson 
> To: users@wicket.apache.org
> Sent: Tuesday, September 8, 2009 11:10:49 AM
> Subject: Re: Usage of Servlets in Wicket, How ?
>
> servlets are totally separate from Wicket - write a servlet and add it to
> your web.xml.  See any servlet example on the web (non-Wicket related) for
> assistance.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, Sep 7, 2009 at 11:54 PM, FaRHaN  wrote:
>
> > Hi,
> >
> > Is there any example in Wicket that uses Servlets (doGet() & doPost()). I
> > mean how can we configure Servlets in our wicket application and use
> > doGet(request, response) & doPost(request, response) methods. I know
> web.xml
> > configuration for Servlets but how can we use doGet() & doPost() methods.
> Do
> > we need wicket:ids in Servlets ?
> > Is there any reference for such type of example ?
> >
> > Thanks...
> >
> >
> >
> >
>
>
>
>
>


Re: Usage of Servlets in Wicket, How ?

2009-09-07 Thread FaRHaN
but how can we call it from our wicket web page ?





From: Jeremy Thomerson 
To: users@wicket.apache.org
Sent: Tuesday, September 8, 2009 11:10:49 AM
Subject: Re: Usage of Servlets in Wicket, How ?

servlets are totally separate from Wicket - write a servlet and add it to
your web.xml.  See any servlet example on the web (non-Wicket related) for
assistance.

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Sep 7, 2009 at 11:54 PM, FaRHaN  wrote:

> Hi,
>
> Is there any example in Wicket that uses Servlets (doGet() & doPost()). I
> mean how can we configure Servlets in our wicket application and use
> doGet(request, response) & doPost(request, response) methods. I know web.xml
> configuration for Servlets but how can we use doGet() & doPost() methods. Do
> we need wicket:ids in Servlets ?
> Is there any reference for such type of example ?
>
> Thanks...
>
>
>
>



  

Re: Passing parameters from markup to panels

2009-09-07 Thread Igor Vaynberg
thats pretty strange, create a unit test and we will fix it.

-igor

On Mon, Sep 7, 2009 at 9:00 PM, Chris
Colman wrote:
>> I seemed to remember writing a post about something similar to
> this
>> here
>> it is:
>>
>> http://www.nabble.com/Wicket-and-CoC-tt20706881.html#a20715349
>
> Good post. The IComponentResolver is already used heavily in our app to
> convert wicket:id values into panel class names but I was seeking a way
> to pull in other attributes contained in the tag to affect 'visual only'
> aspects of panel - I'm doing some experimenting with
> ComponentTag.getAttributes() - it looks like the one!!
>
>> It's pretty old, but probably still works.  I was impressed at the
> time
>> with how easy it was.
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>> On Mon, Sep 7, 2009 at 9:47 PM, Chris Colman
>> wrote:
>>
>> > > officially we will not support this type of control because there
> are
>> > > plenty of other alternatives which we find more appealing. that
> said,
>> > > there are plenty of ways for you to accomplish what you want, we
> do
>> > > not slam doors on ideas just because we dont agree with them.
>> > >
>> > > eg you can use IComponentResolver and create a factory panel that
> can
>> > > create a child based on the attributes of a tag, etc.
>> >
>> > Arh, that's good to hear =) - the IComponentResolver direction was
> where
>> > my 'smoke and mirrors' approach was heading.
>> >
>> > So is it possible for the IComponentResolver to pick up other
> attributes
>> > within the tag in the container markup that instantiated a panel?
>> >
>> > Any pointers to examples of this or where I'd find the right calls
> in
>> > the API to pull in these attributes?
>> >
>> > Regards,
>> > Chris
>> >
>> > >
>> > > -igor
>> > >
>> > > On Mon, Sep 7, 2009 at 5:23 PM, Chris
>> > > Colman wrote:
>> > > >> you say it is laughable to require knowledge of code to
> configure
>> > > >> this. i agree, but i also think its laughable to require the
>> > knowledge
>> > > >> of markup, why shouldnt a sysadmin be able to change this? so
> isnt
>> > a
>> > > >> property file, or a jndi property, or a database table a better
>> > place
>> > > >> to configure this?
>> > > >>
>> > > >> -igor
>> > > >
>> > > > Property files, jndi properties and database tables are all in
> the
>> > > > programmer's domain yet control over the 'size' of something,
> which
>> > is
>> > > > what this essentially is, has always and should remain, IMHO, in
> the
>> > > > domain of the graphic art department - heck, we all know they
> are
>> > > > experts at making the eye candy.
>> > > >
>> > > > The whole object oriented component architecture on which wicket
> is
>> > > > built is all about building web pages from components to make it
>> > easy to
>> > > > create something that works but it also visually appealing.
> There's
>> > a
>> > > > lot of experimentation by graphic designers with dimensions,
> colors,
>> > > > shapes, forms etc., and they're used to being able to quickly
> and
>> > easily
>> > > > try different elements and adjust their size fairly easily.
>> > > >
>> > > > A natural extension to this would be that panels that merely
> contain
>> > a
>> > > > variable number of items (eg., songs or news items or
> interesting
>> > links)
>> > > > should be able to be 'sized' by specifying an item count in the
>> > markup
>> > > > that includes them - not via 'remote control' in a configuration
>> > file or
>> > > > database or something else that is in the domain of the
> programmer.
>> > > >
>> > > > I don't want me or other programmers to have to recompile a Java
>> > file or
>> > > > set up a value in the database each time they want to change the
>> > number
>> > > > of items appearing in a particular panel - especially when that
> same
>> > > > panel can be used differently in multiple markups.
>> > > >
>> > > > The decision as to how many items appear in a panel that is
> merely a
>> > > > container of items is a purely visual one - nothing to do with
>> > business
>> > > > rules, logic or coding. It should therefore be up to a visually
>> > oriented
>> > > > person's point of view - not a programmer's point of view (as a
>> > > > programmer I am therefore visually challenged ;) ).
>> > > >
>> > > > If anything it could be argued that the migration of the control
> of
>> > such
>> > > > a 'visual consideration' out of the model/controller (panel java
>> > class)
>> > > > and into the presentation layer (markup) is in fact move
> *towards*
>> > MVC
>> > > > rather than away from it.
>> > > >
>> > > >
>> >
> -
>> > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > > > For additional commands, e-mail: users-h...@wicket.apache.org
>> > > >
>> > > >
>> > >
>> > >
> -
>> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > > For addition

Property Models

2009-09-07 Thread Douglas Ferguson
If I have a have this:

CompoundPropertyModel(Person)

PropertyModel(Person, "name");

Would this be accurate?

  CompoundPropertyModel
PropertyModel <-assuming name is a string



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Usage of Servlets in Wicket, How ?

2009-09-07 Thread Jeremy Thomerson
servlets are totally separate from Wicket - write a servlet and add it to
your web.xml.  See any servlet example on the web (non-Wicket related) for
assistance.

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Sep 7, 2009 at 11:54 PM, FaRHaN  wrote:

> Hi,
>
> Is there any example in Wicket that uses Servlets (doGet() & doPost()). I
> mean how can we configure Servlets in our wicket application and use
> doGet(request, response) & doPost(request, response) methods. I know web.xml
> configuration for Servlets but how can we use doGet() & doPost() methods. Do
> we need wicket:ids in Servlets ?
> Is there any reference for such type of example ?
>
> Thanks...
>
>
>
>


RE: Passing parameters from markup to panels

2009-09-07 Thread Chris Colman
> -Original Message-
> Doh! It doesn't seem to work. 
> ...

Whoops! Please ignore the above!

It works like a charm when you place the parameters in the right place
;)

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Usage of Servlets in Wicket, How ?

2009-09-07 Thread FaRHaN
Hi,

Is there any example in Wicket that uses Servlets (doGet() & doPost()). I mean 
how can we configure Servlets in our wicket application and use doGet(request, 
response) & doPost(request, response) methods. I know web.xml configuration for 
Servlets but how can we use doGet() & doPost() methods. Do we need wicket:ids 
in Servlets ?
Is there any reference for such type of example ?

Thanks...



  

RE: Passing parameters from markup to panels

2009-09-07 Thread Chris Colman
> I'm doing some experimenting with ComponentTag.getAttributes() - it
looks
> like the one!!

Doh! It doesn't seem to work. No matter how many attributes I add to the
tag and no matter whether I add the wicket: namespace to them or not I
only ever see the single wicket:id attribute when I run this code in the
IComponentResolver.resolve method:

tag is the ComponentTag passed into the resolve method by wicket.

Set atSet = tag.getAttributes().keySet();

Iterator ai = atSet.iterator();

while (ai.hasNext())
{
logger.trace("key = " + ai.next());
}

Any ideas on what I'm doing wrong.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: StackOverFlow (Start.java) Jetty

2009-09-07 Thread Martin Makundi
Hi!

I did not understand a single word of what you just said :( I have
never had problems with panels.. would you mind posting some code so
we can see what you are trying to accomplish and how?

**
Martin

2009/9/8 David Brown :
> Hello Martin, converting the WebPage to Panel foments no complaints until 
> RunTime where all of the upstream markup is re-included in the downstream 
> onClick() request. the usual complains are made: cannot find the component to 
> the paired wicket markup. The component has already been fired by this point 
> in the navigation process. I tried to add instances of the classes that are 
> being complained about but this is completely ignored by the rendering. I 
> suppose I have too many downstream children hanging off of the original 
> MainMenu class that is now the target of all the complaints about no 
> component matching the markup. Is there a way to accumulate components and 
> re-use them when needed to keep the hierarchy happy? Regards, David.
>
> - Original Message -
> From: "Martin Makundi" 
> To: users@wicket.apache.org
> Sent: Monday, September 7, 2009 12:03:39 PM GMT -06:00 US/Canada Central
> Subject: Re: StackOverFlow (Start.java) Jetty
>
>>If you have any suggestions for how to replace just part of a WebPage
>>  () with a whole new WebPage please advise. Regards, David.
>
> Why not use panels? Looks like what you need is panels.
>
> **
> Martin
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Passing parameters from markup to panels

2009-09-07 Thread Chris Colman
> I seemed to remember writing a post about something similar to
this
> here
> it is:
> 
> http://www.nabble.com/Wicket-and-CoC-tt20706881.html#a20715349

Good post. The IComponentResolver is already used heavily in our app to
convert wicket:id values into panel class names but I was seeking a way
to pull in other attributes contained in the tag to affect 'visual only'
aspects of panel - I'm doing some experimenting with
ComponentTag.getAttributes() - it looks like the one!!

> It's pretty old, but probably still works.  I was impressed at the
time
> with how easy it was.
> 
> --
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 
> On Mon, Sep 7, 2009 at 9:47 PM, Chris Colman
> wrote:
> 
> > > officially we will not support this type of control because there
are
> > > plenty of other alternatives which we find more appealing. that
said,
> > > there are plenty of ways for you to accomplish what you want, we
do
> > > not slam doors on ideas just because we dont agree with them.
> > >
> > > eg you can use IComponentResolver and create a factory panel that
can
> > > create a child based on the attributes of a tag, etc.
> >
> > Arh, that's good to hear =) - the IComponentResolver direction was
where
> > my 'smoke and mirrors' approach was heading.
> >
> > So is it possible for the IComponentResolver to pick up other
attributes
> > within the tag in the container markup that instantiated a panel?
> >
> > Any pointers to examples of this or where I'd find the right calls
in
> > the API to pull in these attributes?
> >
> > Regards,
> > Chris
> >
> > >
> > > -igor
> > >
> > > On Mon, Sep 7, 2009 at 5:23 PM, Chris
> > > Colman wrote:
> > > >> you say it is laughable to require knowledge of code to
configure
> > > >> this. i agree, but i also think its laughable to require the
> > knowledge
> > > >> of markup, why shouldnt a sysadmin be able to change this? so
isnt
> > a
> > > >> property file, or a jndi property, or a database table a better
> > place
> > > >> to configure this?
> > > >>
> > > >> -igor
> > > >
> > > > Property files, jndi properties and database tables are all in
the
> > > > programmer's domain yet control over the 'size' of something,
which
> > is
> > > > what this essentially is, has always and should remain, IMHO, in
the
> > > > domain of the graphic art department - heck, we all know they
are
> > > > experts at making the eye candy.
> > > >
> > > > The whole object oriented component architecture on which wicket
is
> > > > built is all about building web pages from components to make it
> > easy to
> > > > create something that works but it also visually appealing.
There's
> > a
> > > > lot of experimentation by graphic designers with dimensions,
colors,
> > > > shapes, forms etc., and they're used to being able to quickly
and
> > easily
> > > > try different elements and adjust their size fairly easily.
> > > >
> > > > A natural extension to this would be that panels that merely
contain
> > a
> > > > variable number of items (eg., songs or news items or
interesting
> > links)
> > > > should be able to be 'sized' by specifying an item count in the
> > markup
> > > > that includes them - not via 'remote control' in a configuration
> > file or
> > > > database or something else that is in the domain of the
programmer.
> > > >
> > > > I don't want me or other programmers to have to recompile a Java
> > file or
> > > > set up a value in the database each time they want to change the
> > number
> > > > of items appearing in a particular panel - especially when that
same
> > > > panel can be used differently in multiple markups.
> > > >
> > > > The decision as to how many items appear in a panel that is
merely a
> > > > container of items is a purely visual one - nothing to do with
> > business
> > > > rules, logic or coding. It should therefore be up to a visually
> > oriented
> > > > person's point of view - not a programmer's point of view (as a
> > > > programmer I am therefore visually challenged ;) ).
> > > >
> > > > If anything it could be argued that the migration of the control
of
> > such
> > > > a 'visual consideration' out of the model/controller (panel java
> > class)
> > > > and into the presentation layer (markup) is in fact move
*towards*
> > MVC
> > > > rather than away from it.
> > > >
> > > >
> >
-
> > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > >
> > > >
> > >
> > >
-
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> > > No virus found in this incoming message.
> > > Checked by AVG - www.avg.com
> > > Version: 8.5.409 / Virus Database: 270.13.82/2351 - Release Date:
> > 09/07/09
> > > 18:03:00
> >
> >

Re: Passing parameters from markup to panels

2009-09-07 Thread Jeremy Thomerson
I seemed to remember writing a post about something similar to this here
it is:

http://www.nabble.com/Wicket-and-CoC-tt20706881.html#a20715349

It's pretty old, but probably still works.  I was impressed at the time with
how easy it was.

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Sep 7, 2009 at 9:47 PM, Chris Colman
wrote:

> > officially we will not support this type of control because there are
> > plenty of other alternatives which we find more appealing. that said,
> > there are plenty of ways for you to accomplish what you want, we do
> > not slam doors on ideas just because we dont agree with them.
> >
> > eg you can use IComponentResolver and create a factory panel that can
> > create a child based on the attributes of a tag, etc.
>
> Arh, that's good to hear =) - the IComponentResolver direction was where
> my 'smoke and mirrors' approach was heading.
>
> So is it possible for the IComponentResolver to pick up other attributes
> within the tag in the container markup that instantiated a panel?
>
> Any pointers to examples of this or where I'd find the right calls in
> the API to pull in these attributes?
>
> Regards,
> Chris
>
> >
> > -igor
> >
> > On Mon, Sep 7, 2009 at 5:23 PM, Chris
> > Colman wrote:
> > >> you say it is laughable to require knowledge of code to configure
> > >> this. i agree, but i also think its laughable to require the
> knowledge
> > >> of markup, why shouldnt a sysadmin be able to change this? so isnt
> a
> > >> property file, or a jndi property, or a database table a better
> place
> > >> to configure this?
> > >>
> > >> -igor
> > >
> > > Property files, jndi properties and database tables are all in the
> > > programmer's domain yet control over the 'size' of something, which
> is
> > > what this essentially is, has always and should remain, IMHO, in the
> > > domain of the graphic art department - heck, we all know they are
> > > experts at making the eye candy.
> > >
> > > The whole object oriented component architecture on which wicket is
> > > built is all about building web pages from components to make it
> easy to
> > > create something that works but it also visually appealing. There's
> a
> > > lot of experimentation by graphic designers with dimensions, colors,
> > > shapes, forms etc., and they're used to being able to quickly and
> easily
> > > try different elements and adjust their size fairly easily.
> > >
> > > A natural extension to this would be that panels that merely contain
> a
> > > variable number of items (eg., songs or news items or interesting
> links)
> > > should be able to be 'sized' by specifying an item count in the
> markup
> > > that includes them - not via 'remote control' in a configuration
> file or
> > > database or something else that is in the domain of the programmer.
> > >
> > > I don't want me or other programmers to have to recompile a Java
> file or
> > > set up a value in the database each time they want to change the
> number
> > > of items appearing in a particular panel - especially when that same
> > > panel can be used differently in multiple markups.
> > >
> > > The decision as to how many items appear in a panel that is merely a
> > > container of items is a purely visual one - nothing to do with
> business
> > > rules, logic or coding. It should therefore be up to a visually
> oriented
> > > person's point of view - not a programmer's point of view (as a
> > > programmer I am therefore visually challenged ;) ).
> > >
> > > If anything it could be argued that the migration of the control of
> such
> > > a 'visual consideration' out of the model/controller (panel java
> class)
> > > and into the presentation layer (markup) is in fact move *towards*
> MVC
> > > rather than away from it.
> > >
> > >
> -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG - www.avg.com
> > Version: 8.5.409 / Virus Database: 270.13.82/2351 - Release Date:
> 09/07/09
> > 18:03:00
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: The alternative to: HeaderContributor.forCss

2009-09-07 Thread Jeremy Thomerson
The replacement for the deprecated method is written in the JavaDocs.

http://wicket.apache.org/docs/1.4/org/apache/wicket/behavior/HeaderContributor.html

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Sep 7, 2009 at 10:18 PM, David Brown
wrote:

> Hello, something I have been ignoring for a long time is in the subject
> line. Though my IDE tells me it is deprecated I have not see a good
> alternative anywhere (wicketstuff, google, etc.). All of my CSS is in
> several files and directories under one directory named: style. What is a
> good WebPage class by WebPage class way of including the path to the CSS
> files. I would prefer something that easily references the resources
> directory. The entire app gets the same CSS applied. Regards and please
> advise, David.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


The alternative to: HeaderContributor.forCss

2009-09-07 Thread David Brown
Hello, something I have been ignoring for a long time is in the subject line. 
Though my IDE tells me it is deprecated I have not see a good alternative 
anywhere (wicketstuff, google, etc.). All of my CSS is in several files and 
directories under one directory named: style. What is a good WebPage class by 
WebPage class way of including the path to the CSS files. I would prefer 
something that easily references the resources directory. The entire app gets 
the same CSS applied. Regards and please advise, David.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Passing parameters from markup to panels

2009-09-07 Thread Chris Colman
> officially we will not support this type of control because there are
> plenty of other alternatives which we find more appealing. that said,
> there are plenty of ways for you to accomplish what you want, we do
> not slam doors on ideas just because we dont agree with them.
> 
> eg you can use IComponentResolver and create a factory panel that can
> create a child based on the attributes of a tag, etc.

Arh, that's good to hear =) - the IComponentResolver direction was where
my 'smoke and mirrors' approach was heading. 

So is it possible for the IComponentResolver to pick up other attributes
within the tag in the container markup that instantiated a panel? 

Any pointers to examples of this or where I'd find the right calls in
the API to pull in these attributes?

Regards,
Chris

> 
> -igor
> 
> On Mon, Sep 7, 2009 at 5:23 PM, Chris
> Colman wrote:
> >> you say it is laughable to require knowledge of code to configure
> >> this. i agree, but i also think its laughable to require the
knowledge
> >> of markup, why shouldnt a sysadmin be able to change this? so isnt
a
> >> property file, or a jndi property, or a database table a better
place
> >> to configure this?
> >>
> >> -igor
> >
> > Property files, jndi properties and database tables are all in the
> > programmer's domain yet control over the 'size' of something, which
is
> > what this essentially is, has always and should remain, IMHO, in the
> > domain of the graphic art department - heck, we all know they are
> > experts at making the eye candy.
> >
> > The whole object oriented component architecture on which wicket is
> > built is all about building web pages from components to make it
easy to
> > create something that works but it also visually appealing. There's
a
> > lot of experimentation by graphic designers with dimensions, colors,
> > shapes, forms etc., and they're used to being able to quickly and
easily
> > try different elements and adjust their size fairly easily.
> >
> > A natural extension to this would be that panels that merely contain
a
> > variable number of items (eg., songs or news items or interesting
links)
> > should be able to be 'sized' by specifying an item count in the
markup
> > that includes them - not via 'remote control' in a configuration
file or
> > database or something else that is in the domain of the programmer.
> >
> > I don't want me or other programmers to have to recompile a Java
file or
> > set up a value in the database each time they want to change the
number
> > of items appearing in a particular panel - especially when that same
> > panel can be used differently in multiple markups.
> >
> > The decision as to how many items appear in a panel that is merely a
> > container of items is a purely visual one - nothing to do with
business
> > rules, logic or coding. It should therefore be up to a visually
oriented
> > person's point of view - not a programmer's point of view (as a
> > programmer I am therefore visually challenged ;) ).
> >
> > If anything it could be argued that the migration of the control of
such
> > a 'visual consideration' out of the model/controller (panel java
class)
> > and into the presentation layer (markup) is in fact move *towards*
MVC
> > rather than away from it.
> >
> >
-
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.409 / Virus Database: 270.13.82/2351 - Release Date:
09/07/09
> 18:03:00

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Using java.util.Date class with CompoundPropertyModel

2009-09-07 Thread Igor Vaynberg
i believe the default converter will format the date to time only, you
can override getconverter() on the label and return your own, or
install your own converter globally.

-igor

On Mon, Sep 7, 2009 at 6:48 PM, Steve Hiller wrote:
> Hi All,
>
> I have created a very simple class that includes a property based on the 
> java.util.Date class.
> This model is used with a simple WebPage and a Label component is used to 
> present the
> date. For some reason, only the time part of the underlying Date object is 
> being displayed.
> I'm using v1.3.7 of Wicket. Any ideas on what I am doing wrong?
>
> Thanks,
> Steve

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Passing parameters from markup to panels

2009-09-07 Thread Igor Vaynberg
right, and the next logical extension is controlling visibility, or
maybe which panel variant to display. why should the developer be
involved if the designer wants panel A vs panel B, thats silly. so
next step is wicket:if and wicket:else based on some condition
expressed through some type of EL. once you go down this path you will
end up with the mess that is jsps.

officially we will not support this type of control because there are
plenty of other alternatives which we find more appealing. that said,
there are plenty of ways for you to accomplish what you want, we do
not slam doors on ideas just because we dont agree with them.

eg you can use IComponentResolver and create a factory panel that can
create a child based on the attributes of a tag, etc.

-igor

On Mon, Sep 7, 2009 at 5:23 PM, Chris
Colman wrote:
>> you say it is laughable to require knowledge of code to configure
>> this. i agree, but i also think its laughable to require the knowledge
>> of markup, why shouldnt a sysadmin be able to change this? so isnt a
>> property file, or a jndi property, or a database table a better place
>> to configure this?
>>
>> -igor
>
> Property files, jndi properties and database tables are all in the
> programmer's domain yet control over the 'size' of something, which is
> what this essentially is, has always and should remain, IMHO, in the
> domain of the graphic art department - heck, we all know they are
> experts at making the eye candy.
>
> The whole object oriented component architecture on which wicket is
> built is all about building web pages from components to make it easy to
> create something that works but it also visually appealing. There's a
> lot of experimentation by graphic designers with dimensions, colors,
> shapes, forms etc., and they're used to being able to quickly and easily
> try different elements and adjust their size fairly easily.
>
> A natural extension to this would be that panels that merely contain a
> variable number of items (eg., songs or news items or interesting links)
> should be able to be 'sized' by specifying an item count in the markup
> that includes them - not via 'remote control' in a configuration file or
> database or something else that is in the domain of the programmer.
>
> I don't want me or other programmers to have to recompile a Java file or
> set up a value in the database each time they want to change the number
> of items appearing in a particular panel - especially when that same
> panel can be used differently in multiple markups.
>
> The decision as to how many items appear in a panel that is merely a
> container of items is a purely visual one - nothing to do with business
> rules, logic or coding. It should therefore be up to a visually oriented
> person's point of view - not a programmer's point of view (as a
> programmer I am therefore visually challenged ;) ).
>
> If anything it could be argued that the migration of the control of such
> a 'visual consideration' out of the model/controller (panel java class)
> and into the presentation layer (markup) is in fact move *towards* MVC
> rather than away from it.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Using java.util.Date class with CompoundPropertyModel

2009-09-07 Thread Steve Hiller
Hi All,

I have created a very simple class that includes a property based on the 
java.util.Date class.
This model is used with a simple WebPage and a Label component is used to 
present the
date. For some reason, only the time part of the underlying Date object is 
being displayed.
I'm using v1.3.7 of Wicket. Any ideas on what I am doing wrong?

Thanks,
Steve

RE: Passing parameters from markup to panels

2009-09-07 Thread Chris Colman
> Then why not just create a configuration panel so your designer can
> configure the number of items to display?

Scenario: 
Let's say 8 different pages use the same SongChartPanel and each wants
to list a different number of songs.

Providing a configuration panel for the web designer to configure a
'count' value for each instance where the panel is used is more work and
it adds presentation domain stuff to the database.

It also has the requirement of associating the 'count' parameter with
each 'usage' of the panel in the model. Whenever they want to add
another panel to a markup a new configuration property needs to be made
available for configuration in the configuration panel and somehow
specify 'which' panel instance in 'which' markup they are configuring.

Seems much more simple and quicker and more MVC if they could simply
specify that presentation oriented information right there in the
presentation layer (markup) in which they use the instance:



I've thought of a very ugly way of doing it with the current version of
wicket but it relies on quite a lot of smoke and mirrors and hooking
into the component creation process. I'll give that a go for now.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Passing parameters from markup to panels

2009-09-07 Thread David Leangen


Then why not just create a configuration panel so your designer can  
configure the number of items to display?



On Sep 8, 2009, at 9:23 AM, Chris Colman wrote:


you say it is laughable to require knowledge of code to configure
this. i agree, but i also think its laughable to require the  
knowledge

of markup, why shouldnt a sysadmin be able to change this? so isnt a
property file, or a jndi property, or a database table a better place
to configure this?

-igor


Property files, jndi properties and database tables are all in the
programmer's domain yet control over the 'size' of something, which is
what this essentially is, has always and should remain, IMHO, in the
domain of the graphic art department - heck, we all know they are
experts at making the eye candy.

The whole object oriented component architecture on which wicket is
built is all about building web pages from components to make it  
easy to

create something that works but it also visually appealing. There's a
lot of experimentation by graphic designers with dimensions, colors,
shapes, forms etc., and they're used to being able to quickly and  
easily

try different elements and adjust their size fairly easily.

A natural extension to this would be that panels that merely contain a
variable number of items (eg., songs or news items or interesting  
links)

should be able to be 'sized' by specifying an item count in the markup
that includes them - not via 'remote control' in a configuration  
file or

database or something else that is in the domain of the programmer.

I don't want me or other programmers to have to recompile a Java  
file or
set up a value in the database each time they want to change the  
number

of items appearing in a particular panel - especially when that same
panel can be used differently in multiple markups.

The decision as to how many items appear in a panel that is merely a
container of items is a purely visual one - nothing to do with  
business
rules, logic or coding. It should therefore be up to a visually  
oriented

person's point of view - not a programmer's point of view (as a
programmer I am therefore visually challenged ;) ).

If anything it could be argued that the migration of the control of  
such
a 'visual consideration' out of the model/controller (panel java  
class)

and into the presentation layer (markup) is in fact move *towards* MVC
rather than away from it.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Passing parameters from markup to panels

2009-09-07 Thread Chris Colman
> you say it is laughable to require knowledge of code to configure
> this. i agree, but i also think its laughable to require the knowledge
> of markup, why shouldnt a sysadmin be able to change this? so isnt a
> property file, or a jndi property, or a database table a better place
> to configure this?
> 
> -igor

Property files, jndi properties and database tables are all in the
programmer's domain yet control over the 'size' of something, which is
what this essentially is, has always and should remain, IMHO, in the
domain of the graphic art department - heck, we all know they are
experts at making the eye candy.

The whole object oriented component architecture on which wicket is
built is all about building web pages from components to make it easy to
create something that works but it also visually appealing. There's a
lot of experimentation by graphic designers with dimensions, colors,
shapes, forms etc., and they're used to being able to quickly and easily
try different elements and adjust their size fairly easily.

A natural extension to this would be that panels that merely contain a
variable number of items (eg., songs or news items or interesting links)
should be able to be 'sized' by specifying an item count in the markup
that includes them - not via 'remote control' in a configuration file or
database or something else that is in the domain of the programmer.

I don't want me or other programmers to have to recompile a Java file or
set up a value in the database each time they want to change the number
of items appearing in a particular panel - especially when that same
panel can be used differently in multiple markups.

The decision as to how many items appear in a panel that is merely a
container of items is a purely visual one - nothing to do with business
rules, logic or coding. It should therefore be up to a visually oriented
person's point of view - not a programmer's point of view (as a
programmer I am therefore visually challenged ;) ).

If anything it could be argued that the migration of the control of such
a 'visual consideration' out of the model/controller (panel java class)
and into the presentation layer (markup) is in fact move *towards* MVC
rather than away from it.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Passing parameters from markup to panels

2009-09-07 Thread Igor Vaynberg
this is a matter of what is configurable externally and what is
configurable internally in code. you want to reuse the markup as the
external configuration medium by adding this information there, but it
can just as easily live in an external property file or in a database
table. the philosophy of wicket is that markup is for generation of
display, not for configuring the behavior of your application. another
problem is that the component hierarchy is dynamic so there is no easy
way to figure out what exact tag in markup a component is bound to -
this information is evaluated last and is only available during render
time.

you say it is laughable to require knowledge of code to configure
this. i agree, but i also think its laughable to require the knowledge
of markup, why shouldnt a sysadmin be able to change this? so isnt a
property file, or a jndi property, or a database table a better place
to configure this?

-igor

On Mon, Sep 7, 2009 at 4:10 PM, Chris
Colman wrote:
> When my web designer guy wants control over whether he wants to place
> either 10 songs or 50 songs into the 'top of the charts' panel I
> consider that to be something that should definitely not be something we
> have to make separate .java panel classes and markup to achieve.
>
> To have to get a programmer to adjust code to change the number of items
> displayed in a list would be the subject of thunderous laughter in any
> desktop app development environment - but yet I see that web app
> development changes all the rules about what's funny and what's not =)
>
> In every other aspect of OO coding since 1990 a scenario like this would
> cause a big light bulb in my head to go off and the word
> 'parameterization' would start blinking at me incessantly.
>
> We programmer propeller heads can do all the smarts on the Java side to
> use a single 'SongChartPanel' to display any number of songs from a list
> based on a single parameter - so long as we can get that parameter
> somehow. It's still MVC because NO code exists in the presentation layer
> - only a parameter is now able to be passed in.
>
> The value of that parameter is not considered code. Setting up a
> parameter  is something a web design guy can 'understand' (they set
> parameter/attribute values on HTML tags all day long) and it's something
> that directly affects the presentation side that he would want control
> over. That gives him power.
>
> Without this power I have to get the programmers to create a different
> panel and markup for each different song chart panel even though the
> code will be exactly the same except for the terminating condition of a
> for loop. That's not OO and it's not reusability. It would be funny if
> it wasn't true!
>
> Let's say we make
>
> SongChartTop10Panel and SongChartTop50Panel
>
> (with .java and .html markup for each)
>
> Now he says he wants to make a top 20 list for one page and a top 40
> list for another page... the inefficiency and non OO nature of this
> approach becomes apparent.
>
> If a simple parameter were able to be passed to the panel we could reuse
> that panel code to show anywhere from 1 to n songs.
>
> Please don't confuse a parameter (numbers, identifiers etc.,) with logic
> (algorithms, conditional statements etc.,). No one is suggesting we put
> logic into the presentation layer - the pain of JSP is much too firmly
> burnt into my brain to ever step away from MVC again ;)
>
>
>> -Original Message-
>> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
>> Sent: Tuesday, 8 September 2009 8:19 AM
>> To: users@wicket.apache.org
>> Subject: Re: Passing parameters from markup to panels
>>
>> Put simply, no.  In Wicket, this is considered code.  And code goes in
>> Java
>> files.  Configure it in the YourPage.java file - where you have access
> to
>> data sources, session attributes, the user, etc
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>> On Mon, Sep 7, 2009 at 5:09 PM, Chris Colman
>> wrote:
>>
>> > I apologize in advance if there is a completely obvious solution to
> this
>> > that I have missed...
>> >
>> > Is it possible to "pass in" parameters to a panel via the markup?
>> >
>> > Eg., Let's say that there are number of different ways that a
> particular
>> > panel could be rendered and that these ways are largely determined
> by
>> > the choice of data source or perhaps even the amount of data to
> display
>> > (from a collection for example).
>> >
>> > Now let's say that I wanted to provide some level of control over
> which
>> > data source is chosen by allowing the user to pass in an extra
>> > 'parameter' in the markup when declaring the panel in the source
> markup
>> > like:
>> >
>> > 
>> >
>> > So for example we might have a panel that displays the 'top 10
> songs' or
>> > the 'top 50 songs' on a music site. The panel is exactly the same in
>> > each instance but the markup container that uses that panel can
> control
>> > how many songs are displayed via specif

Re: Passing parameters from markup to panels

2009-09-07 Thread Matej Knopp
Slight problem here is that onComponentTag is called during render.
You can't modify component hierarchy at that point.

Only way around this is to find component's markup index in
onBeforeRender and then get the tag from markup stream. But this will
fail in many cases (borders, transparent resolvers). So it's not a
very good way.

-Matej

On Tue, Sep 8, 2009 at 1:38 AM, Jeremy
Thomerson wrote:
> It could be done.  I'm pretty sure that if you used onComponentTag (can't
> remember exact name this second - and just walking out the door) - you could
> read any attribute from the tag.  Then hold that number in your component
> and let your model that reads the songs read that number to determine how
> many.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, Sep 7, 2009 at 6:10 PM, Chris Colman
> wrote:
>
>> When my web designer guy wants control over whether he wants to place
>> either 10 songs or 50 songs into the 'top of the charts' panel I
>> consider that to be something that should definitely not be something we
>> have to make separate .java panel classes and markup to achieve.
>>
>> To have to get a programmer to adjust code to change the number of items
>> displayed in a list would be the subject of thunderous laughter in any
>> desktop app development environment - but yet I see that web app
>> development changes all the rules about what's funny and what's not =)
>>
>> In every other aspect of OO coding since 1990 a scenario like this would
>> cause a big light bulb in my head to go off and the word
>> 'parameterization' would start blinking at me incessantly.
>>
>> We programmer propeller heads can do all the smarts on the Java side to
>> use a single 'SongChartPanel' to display any number of songs from a list
>> based on a single parameter - so long as we can get that parameter
>> somehow. It's still MVC because NO code exists in the presentation layer
>> - only a parameter is now able to be passed in.
>>
>> The value of that parameter is not considered code. Setting up a
>> parameter  is something a web design guy can 'understand' (they set
>> parameter/attribute values on HTML tags all day long) and it's something
>> that directly affects the presentation side that he would want control
>> over. That gives him power.
>>
>> Without this power I have to get the programmers to create a different
>> panel and markup for each different song chart panel even though the
>> code will be exactly the same except for the terminating condition of a
>> for loop. That's not OO and it's not reusability. It would be funny if
>> it wasn't true!
>>
>> Let's say we make
>>
>> SongChartTop10Panel and SongChartTop50Panel
>>
>> (with .java and .html markup for each)
>>
>> Now he says he wants to make a top 20 list for one page and a top 40
>> list for another page... the inefficiency and non OO nature of this
>> approach becomes apparent.
>>
>> If a simple parameter were able to be passed to the panel we could reuse
>> that panel code to show anywhere from 1 to n songs.
>>
>> Please don't confuse a parameter (numbers, identifiers etc.,) with logic
>> (algorithms, conditional statements etc.,). No one is suggesting we put
>> logic into the presentation layer - the pain of JSP is much too firmly
>> burnt into my brain to ever step away from MVC again ;)
>>
>>
>> > -Original Message-
>> > From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
>> > Sent: Tuesday, 8 September 2009 8:19 AM
>> > To: users@wicket.apache.org
>> > Subject: Re: Passing parameters from markup to panels
>> >
>> > Put simply, no.  In Wicket, this is considered code.  And code goes in
>> > Java
>> > files.  Configure it in the YourPage.java file - where you have access
>> to
>> > data sources, session attributes, the user, etc
>> >
>> > --
>> > Jeremy Thomerson
>> > http://www.wickettraining.com
>> >
>> >
>> >
>> > On Mon, Sep 7, 2009 at 5:09 PM, Chris Colman
>> > wrote:
>> >
>> > > I apologize in advance if there is a completely obvious solution to
>> this
>> > > that I have missed...
>> > >
>> > > Is it possible to "pass in" parameters to a panel via the markup?
>> > >
>> > > Eg., Let's say that there are number of different ways that a
>> particular
>> > > panel could be rendered and that these ways are largely determined
>> by
>> > > the choice of data source or perhaps even the amount of data to
>> display
>> > > (from a collection for example).
>> > >
>> > > Now let's say that I wanted to provide some level of control over
>> which
>> > > data source is chosen by allowing the user to pass in an extra
>> > > 'parameter' in the markup when declaring the panel in the source
>> markup
>> > > like:
>> > >
>> > > 
>> > >
>> > > So for example we might have a panel that displays the 'top 10
>> songs' or
>> > > the 'top 50 songs' on a music site. The panel is exactly the same in
>> > > each instance but the markup container that uses that panel can
>> control
>> > > how many songs are displayed via specification o

Re: Passing parameters from markup to panels

2009-09-07 Thread Edward Zarecor
You don't need multiple versions of the panel, you simply need a constructor
that takes an argument, the number of items you want to include.  This
doesn't fully fulfill your use case as your site-devs or portal-devs cannot
pass that argument in.
You could arrange that using iframes and passed parameters.

Ed.

On Mon, Sep 7, 2009 at 7:10 PM, Chris Colman
wrote:

> When my web designer guy wants control over whether he wants to place
> either 10 songs or 50 songs into the 'top of the charts' panel I
> consider that to be something that should definitely not be something we
> have to make separate .java panel classes and markup to achieve.
>
> To have to get a programmer to adjust code to change the number of items
> displayed in a list would be the subject of thunderous laughter in any
> desktop app development environment - but yet I see that web app
> development changes all the rules about what's funny and what's not =)
>
> In every other aspect of OO coding since 1990 a scenario like this would
> cause a big light bulb in my head to go off and the word
> 'parameterization' would start blinking at me incessantly.
>
> We programmer propeller heads can do all the smarts on the Java side to
> use a single 'SongChartPanel' to display any number of songs from a list
> based on a single parameter - so long as we can get that parameter
> somehow. It's still MVC because NO code exists in the presentation layer
> - only a parameter is now able to be passed in.
>
> The value of that parameter is not considered code. Setting up a
> parameter  is something a web design guy can 'understand' (they set
> parameter/attribute values on HTML tags all day long) and it's something
> that directly affects the presentation side that he would want control
> over. That gives him power.
>
> Without this power I have to get the programmers to create a different
> panel and markup for each different song chart panel even though the
> code will be exactly the same except for the terminating condition of a
> for loop. That's not OO and it's not reusability. It would be funny if
> it wasn't true!
>
> Let's say we make
>
> SongChartTop10Panel and SongChartTop50Panel
>
> (with .java and .html markup for each)
>
> Now he says he wants to make a top 20 list for one page and a top 40
> list for another page... the inefficiency and non OO nature of this
> approach becomes apparent.
>
> If a simple parameter were able to be passed to the panel we could reuse
> that panel code to show anywhere from 1 to n songs.
>
> Please don't confuse a parameter (numbers, identifiers etc.,) with logic
> (algorithms, conditional statements etc.,). No one is suggesting we put
> logic into the presentation layer - the pain of JSP is much too firmly
> burnt into my brain to ever step away from MVC again ;)
>
>
> > -Original Message-
> > From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> > Sent: Tuesday, 8 September 2009 8:19 AM
> > To: users@wicket.apache.org
> > Subject: Re: Passing parameters from markup to panels
> >
> > Put simply, no.  In Wicket, this is considered code.  And code goes in
> > Java
> > files.  Configure it in the YourPage.java file - where you have access
> to
> > data sources, session attributes, the user, etc
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
> >
> > On Mon, Sep 7, 2009 at 5:09 PM, Chris Colman
> > wrote:
> >
> > > I apologize in advance if there is a completely obvious solution to
> this
> > > that I have missed...
> > >
> > > Is it possible to "pass in" parameters to a panel via the markup?
> > >
> > > Eg., Let's say that there are number of different ways that a
> particular
> > > panel could be rendered and that these ways are largely determined
> by
> > > the choice of data source or perhaps even the amount of data to
> display
> > > (from a collection for example).
> > >
> > > Now let's say that I wanted to provide some level of control over
> which
> > > data source is chosen by allowing the user to pass in an extra
> > > 'parameter' in the markup when declaring the panel in the source
> markup
> > > like:
> > >
> > > 
> > >
> > > So for example we might have a panel that displays the 'top 10
> songs' or
> > > the 'top 50 songs' on a music site. The panel is exactly the same in
> > > each instance but the markup container that uses that panel can
> control
> > > how many songs are displayed via specification of an extra parameter
> > > ('count' in the following example).
> > >
> > > Eg.,
> > >
> > > One page could have a lot of space and so decide to show the top 50:
> > >
> > > 
> > >
> > > However another page that is more dense might only have room to
> display
> > > the top 10 songs
> > >
> > > 
> > >
> > > But in each case the markup and code for the panel itself does not
> need
> > > to change.
> > >
> > >
> -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional 

Re: Passing parameters from markup to panels

2009-09-07 Thread Jeremy Thomerson
It could be done.  I'm pretty sure that if you used onComponentTag (can't
remember exact name this second - and just walking out the door) - you could
read any attribute from the tag.  Then hold that number in your component
and let your model that reads the songs read that number to determine how
many.

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Sep 7, 2009 at 6:10 PM, Chris Colman
wrote:

> When my web designer guy wants control over whether he wants to place
> either 10 songs or 50 songs into the 'top of the charts' panel I
> consider that to be something that should definitely not be something we
> have to make separate .java panel classes and markup to achieve.
>
> To have to get a programmer to adjust code to change the number of items
> displayed in a list would be the subject of thunderous laughter in any
> desktop app development environment - but yet I see that web app
> development changes all the rules about what's funny and what's not =)
>
> In every other aspect of OO coding since 1990 a scenario like this would
> cause a big light bulb in my head to go off and the word
> 'parameterization' would start blinking at me incessantly.
>
> We programmer propeller heads can do all the smarts on the Java side to
> use a single 'SongChartPanel' to display any number of songs from a list
> based on a single parameter - so long as we can get that parameter
> somehow. It's still MVC because NO code exists in the presentation layer
> - only a parameter is now able to be passed in.
>
> The value of that parameter is not considered code. Setting up a
> parameter  is something a web design guy can 'understand' (they set
> parameter/attribute values on HTML tags all day long) and it's something
> that directly affects the presentation side that he would want control
> over. That gives him power.
>
> Without this power I have to get the programmers to create a different
> panel and markup for each different song chart panel even though the
> code will be exactly the same except for the terminating condition of a
> for loop. That's not OO and it's not reusability. It would be funny if
> it wasn't true!
>
> Let's say we make
>
> SongChartTop10Panel and SongChartTop50Panel
>
> (with .java and .html markup for each)
>
> Now he says he wants to make a top 20 list for one page and a top 40
> list for another page... the inefficiency and non OO nature of this
> approach becomes apparent.
>
> If a simple parameter were able to be passed to the panel we could reuse
> that panel code to show anywhere from 1 to n songs.
>
> Please don't confuse a parameter (numbers, identifiers etc.,) with logic
> (algorithms, conditional statements etc.,). No one is suggesting we put
> logic into the presentation layer - the pain of JSP is much too firmly
> burnt into my brain to ever step away from MVC again ;)
>
>
> > -Original Message-
> > From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> > Sent: Tuesday, 8 September 2009 8:19 AM
> > To: users@wicket.apache.org
> > Subject: Re: Passing parameters from markup to panels
> >
> > Put simply, no.  In Wicket, this is considered code.  And code goes in
> > Java
> > files.  Configure it in the YourPage.java file - where you have access
> to
> > data sources, session attributes, the user, etc
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
> >
> > On Mon, Sep 7, 2009 at 5:09 PM, Chris Colman
> > wrote:
> >
> > > I apologize in advance if there is a completely obvious solution to
> this
> > > that I have missed...
> > >
> > > Is it possible to "pass in" parameters to a panel via the markup?
> > >
> > > Eg., Let's say that there are number of different ways that a
> particular
> > > panel could be rendered and that these ways are largely determined
> by
> > > the choice of data source or perhaps even the amount of data to
> display
> > > (from a collection for example).
> > >
> > > Now let's say that I wanted to provide some level of control over
> which
> > > data source is chosen by allowing the user to pass in an extra
> > > 'parameter' in the markup when declaring the panel in the source
> markup
> > > like:
> > >
> > > 
> > >
> > > So for example we might have a panel that displays the 'top 10
> songs' or
> > > the 'top 50 songs' on a music site. The panel is exactly the same in
> > > each instance but the markup container that uses that panel can
> control
> > > how many songs are displayed via specification of an extra parameter
> > > ('count' in the following example).
> > >
> > > Eg.,
> > >
> > > One page could have a lot of space and so decide to show the top 50:
> > >
> > > 
> > >
> > > However another page that is more dense might only have room to
> display
> > > the top 10 songs
> > >
> > > 
> > >
> > > But in each case the markup and code for the panel itself does not
> need
> > > to change.
> > >
> > >
> -
> > > To unsubscribe, e-mail: users-unsub

Re: StackOverFlow (Start.java) Jetty

2009-09-07 Thread David Brown
Hello Martin, converting the WebPage to Panel foments no complaints until 
RunTime where all of the upstream markup is re-included in the downstream 
onClick() request. the usual complains are made: cannot find the component to 
the paired wicket markup. The component has already been fired by this point in 
the navigation process. I tried to add instances of the classes that are being 
complained about but this is completely ignored by the rendering. I suppose I 
have too many downstream children hanging off of the original MainMenu class 
that is now the target of all the complaints about no component matching the 
markup. Is there a way to accumulate components and re-use them when needed to 
keep the hierarchy happy? Regards, David.

- Original Message -
From: "Martin Makundi" 
To: users@wicket.apache.org
Sent: Monday, September 7, 2009 12:03:39 PM GMT -06:00 US/Canada Central
Subject: Re: StackOverFlow (Start.java) Jetty

>If you have any suggestions for how to replace just part of a WebPage
>  () with a whole new WebPage please advise. Regards, David.

Why not use panels? Looks like what you need is panels.

**
Martin

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Passing parameters from markup to panels

2009-09-07 Thread Chris Colman
When my web designer guy wants control over whether he wants to place
either 10 songs or 50 songs into the 'top of the charts' panel I
consider that to be something that should definitely not be something we
have to make separate .java panel classes and markup to achieve.

To have to get a programmer to adjust code to change the number of items
displayed in a list would be the subject of thunderous laughter in any
desktop app development environment - but yet I see that web app
development changes all the rules about what's funny and what's not =)

In every other aspect of OO coding since 1990 a scenario like this would
cause a big light bulb in my head to go off and the word
'parameterization' would start blinking at me incessantly. 

We programmer propeller heads can do all the smarts on the Java side to
use a single 'SongChartPanel' to display any number of songs from a list
based on a single parameter - so long as we can get that parameter
somehow. It's still MVC because NO code exists in the presentation layer
- only a parameter is now able to be passed in.

The value of that parameter is not considered code. Setting up a
parameter  is something a web design guy can 'understand' (they set
parameter/attribute values on HTML tags all day long) and it's something
that directly affects the presentation side that he would want control
over. That gives him power.

Without this power I have to get the programmers to create a different
panel and markup for each different song chart panel even though the
code will be exactly the same except for the terminating condition of a
for loop. That's not OO and it's not reusability. It would be funny if
it wasn't true!

Let's say we make

SongChartTop10Panel and SongChartTop50Panel

(with .java and .html markup for each)

Now he says he wants to make a top 20 list for one page and a top 40
list for another page... the inefficiency and non OO nature of this
approach becomes apparent.

If a simple parameter were able to be passed to the panel we could reuse
that panel code to show anywhere from 1 to n songs.

Please don't confuse a parameter (numbers, identifiers etc.,) with logic
(algorithms, conditional statements etc.,). No one is suggesting we put
logic into the presentation layer - the pain of JSP is much too firmly
burnt into my brain to ever step away from MVC again ;)


> -Original Message-
> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Sent: Tuesday, 8 September 2009 8:19 AM
> To: users@wicket.apache.org
> Subject: Re: Passing parameters from markup to panels
> 
> Put simply, no.  In Wicket, this is considered code.  And code goes in
> Java
> files.  Configure it in the YourPage.java file - where you have access
to
> data sources, session attributes, the user, etc
> 
> --
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 
> On Mon, Sep 7, 2009 at 5:09 PM, Chris Colman
> wrote:
> 
> > I apologize in advance if there is a completely obvious solution to
this
> > that I have missed...
> >
> > Is it possible to "pass in" parameters to a panel via the markup?
> >
> > Eg., Let's say that there are number of different ways that a
particular
> > panel could be rendered and that these ways are largely determined
by
> > the choice of data source or perhaps even the amount of data to
display
> > (from a collection for example).
> >
> > Now let's say that I wanted to provide some level of control over
which
> > data source is chosen by allowing the user to pass in an extra
> > 'parameter' in the markup when declaring the panel in the source
markup
> > like:
> >
> > 
> >
> > So for example we might have a panel that displays the 'top 10
songs' or
> > the 'top 50 songs' on a music site. The panel is exactly the same in
> > each instance but the markup container that uses that panel can
control
> > how many songs are displayed via specification of an extra parameter
> > ('count' in the following example).
> >
> > Eg.,
> >
> > One page could have a lot of space and so decide to show the top 50:
> >
> > 
> >
> > However another page that is more dense might only have room to
display
> > the top 10 songs
> >
> > 
> >
> > But in each case the markup and code for the panel itself does not
need
> > to change.
> >
> >
-
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.409 / Virus Database: 270.13.82/2351 - Release Date:
09/07/09
> 06:40:00

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Passing parameters from markup to panels

2009-09-07 Thread Jeremy Thomerson
Put simply, no.  In Wicket, this is considered code.  And code goes in Java
files.  Configure it in the YourPage.java file - where you have access to
data sources, session attributes, the user, etc

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Sep 7, 2009 at 5:09 PM, Chris Colman
wrote:

> I apologize in advance if there is a completely obvious solution to this
> that I have missed...
>
> Is it possible to "pass in" parameters to a panel via the markup?
>
> Eg., Let's say that there are number of different ways that a particular
> panel could be rendered and that these ways are largely determined by
> the choice of data source or perhaps even the amount of data to display
> (from a collection for example).
>
> Now let's say that I wanted to provide some level of control over which
> data source is chosen by allowing the user to pass in an extra
> 'parameter' in the markup when declaring the panel in the source markup
> like:
>
> 
>
> So for example we might have a panel that displays the 'top 10 songs' or
> the 'top 50 songs' on a music site. The panel is exactly the same in
> each instance but the markup container that uses that panel can control
> how many songs are displayed via specification of an extra parameter
> ('count' in the following example).
>
> Eg.,
>
> One page could have a lot of space and so decide to show the top 50:
>
> 
>
> However another page that is more dense might only have room to display
> the top 10 songs
>
> 
>
> But in each case the markup and code for the panel itself does not need
> to change.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Passing parameters from markup to panels

2009-09-07 Thread Chris Colman
I apologize in advance if there is a completely obvious solution to this
that I have missed...

Is it possible to "pass in" parameters to a panel via the markup?

Eg., Let's say that there are number of different ways that a particular
panel could be rendered and that these ways are largely determined by
the choice of data source or perhaps even the amount of data to display
(from a collection for example).

Now let's say that I wanted to provide some level of control over which
data source is chosen by allowing the user to pass in an extra
'parameter' in the markup when declaring the panel in the source markup
like:



So for example we might have a panel that displays the 'top 10 songs' or
the 'top 50 songs' on a music site. The panel is exactly the same in
each instance but the markup container that uses that panel can control
how many songs are displayed via specification of an extra parameter
('count' in the following example).

Eg.,

One page could have a lot of space and so decide to show the top 50:



However another page that is more dense might only have room to display
the top 10 songs



But in each case the markup and code for the panel itself does not need
to change.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Mount different page for second parameter

2009-09-07 Thread Igor Vaynberg
you will have to roll your own, this is not supported in 1.4 but
should be in 1.5

-igor

On Mon, Sep 7, 2009 at 11:27 AM, Vit Rozkovec wrote:
> Hallo,
> which encoding strategy should one use if one would like to achieve this:
>
> http://somesite/somepath/user1/products --> mounted on ProductsPage.class
> http://somesite/somepath/user1/profile --> mounted on ProfilePage.class
>
> http://somesite/somepath/user2/products --> mounted on ProductsPage.class
> http://somesite/somepath/user2/profile --> mounted on ProfilePage.class
>
> on ProductsPage.class and ProfilePage.class you know which user acesses the
> page.
>
> Thank you for any hints.
>
> Vit
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Mount different page for second parameter

2009-09-07 Thread Vit Rozkovec

Hallo,
which encoding strategy should one use if one would like to achieve this:

http://somesite/somepath/user1/products --> mounted on ProductsPage.class
http://somesite/somepath/user1/profile --> mounted on ProfilePage.class

http://somesite/somepath/user2/products --> mounted on ProductsPage.class
http://somesite/somepath/user2/profile --> mounted on ProfilePage.class

on ProductsPage.class and ProfilePage.class you know which user acesses 
the page.


Thank you for any hints.

Vit

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Column which orders by display value

2009-09-07 Thread Igor Vaynberg
you can enter whatever expression/key you want into the sortable
property of the column and then use that to sort however you want. the
idea is that sort should be performed in the database, not in the ui.

-igor

On Mon, Sep 7, 2009 at 8:14 AM, Matthias Keller wrote:
> Hi
>
> We have a DataTable with some sortable columns. Unfortunately, they often
> don't match a simple property but are assembled using multiple properties.
> Unfortunately, a column seems only sortable by a single property :-(
> Is there a possibility to sort a DataTable using the effectively displayed
> values instead of a fixed property?
>
> Thanks
>
> Matt
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Form FileUploadField maxSize does not work

2009-09-07 Thread Igor Vaynberg
sounds like a bug, open a jira issue.

-igor

On Mon, Sep 7, 2009 at 1:10 AM, nytrus wrote:
>
> Yes the issue is that, the form being submitted is the outer (which has no
> maxsize set, so default is used).
> When I submit upload0, Form.handleMultiPart() is called on the outer form
> (form0).
> When I submit upload1, Form.handleMultiPart() is called on simpleUpload.
>
> I'm missing something or doing something wrong?
>
>
> igor.vaynberg wrote:
>>
>> so is the problem that the form being submitted is the outer form and
>> it doesnt support the inner form's maxsize?
>>
>> -igor
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Form-FileUploadField-maxSize-does-not-work-tp25293039p25326577.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: StackOverFlow (Start.java) Jetty

2009-09-07 Thread Martin Makundi
>If you have any suggestions for how to replace just part of a WebPage
>  () with a whole new WebPage please advise. Regards, David.

Why not use panels? Looks like what you need is panels.

**
Martin

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: StackOverFlow (Start.java) Jetty

2009-09-07 Thread David Brown
Hello Martin, thanks for the reply. The AjaxFallbackLinkExtension is a private 
method created by Eclipse wizardry to unwind an anonymous class. I have since 
fixed this issue in that the WebPage link is displayed within the 
 tags but now it removes the horizontal list of WebPage links 
that navigate the user to the target link in question. I am looking at the WIA 
Panel swap example as a possible solution. If you have any suggestions for how 
to replace just part of a WebPage () with a whole new WebPage 
please advise. Regards, David.

- Original Message -
From: "Martin Makundi" 
To: users@wicket.apache.org
Sent: Sunday, September 6, 2009 10:54:47 PM GMT -06:00 US/Canada Central
Subject: Re: StackOverFlow (Start.java) Jetty

What is AjaxFallbackLinkExtension?

**
Martin

2009/9/6 David Brown :
> Hello, I have class (a.java) that extends WebPage and has the usual Wicket 
> HTML counterpart (a.html). The extended WebPage class' constructor, a(), 
> creates a WebMarkupContainer wrapper instance transparent resolver with the 
> name: wrapper. Before I add(wrapper) I add an AjaxFallBackLink:
>
> add(new AjaxFallbackLinkExtension("myLink"));
>
> In the HTML page: a.html I reference the link within the tag: 
>
> My Link
>
> When I navigate to the page with this link the link is displayed but when I 
> click the link the only evidence that shows the link was clicked is in the 
> log file: RESPONSE 200.
>
> What is missing?
>
> Regards, David.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxButton onSubmit and Submit Form order...

2009-09-07 Thread Dipu
have a look at AjaxLazyLoadPanel, looks like thats what you are looking for

-dipu





On Mon, Sep 7, 2009 at 4:10 PM, Arnaud Garcia wrote:
> Hi List,
>
> I want to add a custom anim gif while the page is rendering...
> To do this, I created an AjaxButton and a Form
> - In the AjaxButton submit method I setVisible my anim gif
> - In the form submit metho I call the setResponsePage
>
> If I remove the setResponsePage and I log something on the form submit
> method => it works
>
> If I had the setResponsePage on the form submit, the ajax step is
> bypassed...the priority is to render the new page...
>
> How can I first do the Ajax call back (to display the gif anim) THEN
> going to the next page ?
>
> Thanks for help !!
>
> Arnaud
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Column which orders by display value

2009-09-07 Thread Matthias Keller

Hi

We have a DataTable with some sortable columns. Unfortunately, they 
often don't match a simple property but are assembled using multiple 
properties.

Unfortunately, a column seems only sortable by a single property :-(
Is there a possibility to sort a DataTable using the effectively 
displayed values instead of a fixed property?


Thanks

Matt


smime.p7s
Description: S/MIME Cryptographic Signature


AjaxButton onSubmit and Submit Form order...

2009-09-07 Thread Arnaud Garcia
Hi List,

I want to add a custom anim gif while the page is rendering...
To do this, I created an AjaxButton and a Form
- In the AjaxButton submit method I setVisible my anim gif
- In the form submit metho I call the setResponsePage

If I remove the setResponsePage and I log something on the form submit
method => it works

If I had the setResponsePage on the form submit, the ajax step is
bypassed...the priority is to render the new page...

How can I first do the Ajax call back (to display the gif anim) THEN
going to the next page ?

Thanks for help !!

Arnaud

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



wicket and apache turbine

2009-09-07 Thread mischa

Hi,

has anybody experience in inserting the wicket framework into apache  
turbine. And if so how did you insert wicket into the turbine web.xml  
or is there another way?


If not is there a general way to insert the wicket framework into  
other frameworks.


Any help is appreciated!

thx,

Mischa

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Form and PageParameters

2009-09-07 Thread Eyal Golan
back to my original question, do you actually need this page to have a
constructor with PageParameters?
hint - if you want a user to get it with nice URL, then yes.

You can call one constructor to the other (sometimes tricky in situation
like yours), or you can have an init() method that does everything and call
it from each constructor.

everything
Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Mon, Sep 7, 2009 at 4:34 PM, cmoulliard  wrote:

>
> Many thanks for your help.
>
> With the modifications you propose, everything works fine
>
> Here is what I changed in the onSubmit method of the button
>
> public void onSubmit() {
>  setResponsePage(new RequestPage((RequestModel)
> this.getForm().getModelObject()));
> }
>
> Question : Do I have need to duplicate the code between the two
> constructors
> ? I mean Do I need to have in double ?
>
>final FeedbackPanel feedback = new FeedbackPanel("feedback");
>add(feedback);
>RequestForm requestForm = new RequestForm("requestForm");
>add(requestForm);
>.
>
>
> egolan74 wrote:
> >
> > You can have two constructors in your page.
> > If you work 'internally' then you can use the one that accepts a pojo. If
> > you work with URL, then the one that accepts PageParameters will be used.
> >
> > the setResponsePage can accept a Page and not only a class, so what you
> > can
> > do is create your page: new RequestPage(myPojoModelObject), and then put
> > it
> > in the setResponsePage parameter.
> >
> > IllegalArgumentException: A child with id 'requestList' already
> > means that you added it already to your page. AFAICS you don't go to a
> new
> > page in the button submit so you add the list over and over again.
> >
> > if you want to update a list, use a dynamic model for the content and
> > update
> > it.
> >
> > Eyal Golan
> > egola...@gmail.com
> >
> > Visit: http://jvdrums.sourceforge.net/
> > LinkedIn: http://www.linkedin.com/in/egolan74
> >
> > P  Save a tree. Please don't print this e-mail unless it's really
> > necessary
> >
> >
> > On Mon, Sep 7, 2009 at 1:58 PM, cmoulliard  wrote:
> >
> >>
> >> Thx for the reply.
> >>
> >> You are right, it is not a must to use PageParameters but as this is my
> >> first Wicket project, I have started to work with simple things.
> >>
> >> In the meantime, I have had a look to the formInput example where a
> >> CompoundPropertyModel is used. I have adapted the Form to work with it.
> >>
> >> My question is now :
> >>
> >> When I call the first time my page, the url is :
> >> http://localhost/request.
> >> Wicket receives this request and the constructor
> >> RequestPage(PageParameter
> >> pageParameter) is called. Next, after filling my form in the page and
> >> clicking on the onSubmit button, the request is submitted to the same
> >> page.
> >>
> >> How can I retrieve the values of the CompoundPropertyModel from my form
> >> in
> >> this case ? Do I have to do something particular in the
> >> setResponsePage(RequestPage.Class) to pass the compoundPropertyModel ?
> Do
> >> I
> >> need to create two different constructors : one for PageParameters and
> >> the
> >> other to handle CompoundPropertyModel ?
> >>
> >> Regards,
> >>
> >> Charles
> >>
> >>
> >> egolan74 wrote:
> >> >
> >> > Is it a must that you use PageParameters for RequestPage?
> >> > Do you need an access to it also from a URL (after mounting it in your
> >> > Application).
> >> >
> >> > I think that a nicer way is to add a constructor that accepts the
> >> values.
> >> > Even better, I would have created a POJO model.
> >> > Use a CompoundPropertyModel with the form, and pass this object to the
> >> > RequestPage.
> >> >
> >> > Eyal Golan
> >> > egola...@gmail.com
> >> >
> >> > Visit: http://jvdrums.sourceforge.net/
> >> > LinkedIn: http://www.linkedin.com/in/egolan74
> >> >
> >> > P  Save a tree. Please don't print this e-mail unless it's really
> >> > necessary
> >> >
> >> >
> >> > On Mon, Sep 7, 2009 at 11:38 AM, Charles Moulliard
> >> > wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> I have created a "RequestPage" html page containing a form (= search
> >> >> criteria) and a list (= Data View where the result set of data
> >> retrieved
> >> >> in
> >> >> a DB according to search criteria is displayed). When the user clicks
> >> on
> >> >> the
> >> >> "search criteria" button of this page, the request is redirected to
> >> the
> >> >> RequestPage where we extract the search criteria values and pass them
> >> to
> >> >> the
> >> >> service in charge to retrieve the data. In the java class
> accompagning
> >> >> this
> >> >> page, I have overrided the onSubmit method of the "submit button" to
> >> pass
> >> >> the value of the form fields
> >> >>
> >> >>public RequestPage(final PageParameters parameters) {
> >> >> ...
> >> >>   Form form = new Form("searchCriteriaReque

Re: Form and PageParameters

2009-09-07 Thread cmoulliard

Many thanks for your help.

With the modifications you propose, everything works fine

Here is what I changed in the onSubmit method of the button

public void onSubmit() {
 setResponsePage(new RequestPage((RequestModel)
this.getForm().getModelObject()));
}

Question : Do I have need to duplicate the code between the two constructors
? I mean Do I need to have in double ?

final FeedbackPanel feedback = new FeedbackPanel("feedback");
add(feedback);
RequestForm requestForm = new RequestForm("requestForm");
add(requestForm);
.


egolan74 wrote:
> 
> You can have two constructors in your page.
> If you work 'internally' then you can use the one that accepts a pojo. If
> you work with URL, then the one that accepts PageParameters will be used.
> 
> the setResponsePage can accept a Page and not only a class, so what you
> can
> do is create your page: new RequestPage(myPojoModelObject), and then put
> it
> in the setResponsePage parameter.
> 
> IllegalArgumentException: A child with id 'requestList' already
> means that you added it already to your page. AFAICS you don't go to a new
> page in the button submit so you add the list over and over again.
> 
> if you want to update a list, use a dynamic model for the content and
> update
> it.
> 
> Eyal Golan
> egola...@gmail.com
> 
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
> 
> P  Save a tree. Please don't print this e-mail unless it's really
> necessary
> 
> 
> On Mon, Sep 7, 2009 at 1:58 PM, cmoulliard  wrote:
> 
>>
>> Thx for the reply.
>>
>> You are right, it is not a must to use PageParameters but as this is my
>> first Wicket project, I have started to work with simple things.
>>
>> In the meantime, I have had a look to the formInput example where a
>> CompoundPropertyModel is used. I have adapted the Form to work with it.
>>
>> My question is now :
>>
>> When I call the first time my page, the url is :
>> http://localhost/request.
>> Wicket receives this request and the constructor
>> RequestPage(PageParameter
>> pageParameter) is called. Next, after filling my form in the page and
>> clicking on the onSubmit button, the request is submitted to the same
>> page.
>>
>> How can I retrieve the values of the CompoundPropertyModel from my form
>> in
>> this case ? Do I have to do something particular in the
>> setResponsePage(RequestPage.Class) to pass the compoundPropertyModel ? Do
>> I
>> need to create two different constructors : one for PageParameters and
>> the
>> other to handle CompoundPropertyModel ?
>>
>> Regards,
>>
>> Charles
>>
>>
>> egolan74 wrote:
>> >
>> > Is it a must that you use PageParameters for RequestPage?
>> > Do you need an access to it also from a URL (after mounting it in your
>> > Application).
>> >
>> > I think that a nicer way is to add a constructor that accepts the
>> values.
>> > Even better, I would have created a POJO model.
>> > Use a CompoundPropertyModel with the form, and pass this object to the
>> > RequestPage.
>> >
>> > Eyal Golan
>> > egola...@gmail.com
>> >
>> > Visit: http://jvdrums.sourceforge.net/
>> > LinkedIn: http://www.linkedin.com/in/egolan74
>> >
>> > P  Save a tree. Please don't print this e-mail unless it's really
>> > necessary
>> >
>> >
>> > On Mon, Sep 7, 2009 at 11:38 AM, Charles Moulliard
>> > wrote:
>> >
>> >> Hi,
>> >>
>> >> I have created a "RequestPage" html page containing a form (= search
>> >> criteria) and a list (= Data View where the result set of data
>> retrieved
>> >> in
>> >> a DB according to search criteria is displayed). When the user clicks
>> on
>> >> the
>> >> "search criteria" button of this page, the request is redirected to
>> the
>> >> RequestPage where we extract the search criteria values and pass them
>> to
>> >> the
>> >> service in charge to retrieve the data. In the java class accompagning
>> >> this
>> >> page, I have overrided the onSubmit method of the "submit button" to
>> pass
>> >> the value of the form fields
>> >>
>> >>public RequestPage(final PageParameters parameters) {
>> >> ...
>> >>   Form form = new Form("searchCriteriaRequest");
>> >>
>> >>// Add fields
>> >>fRequestId = new TextField("fRequestId", new Model(""));
>> >>fFileName = new TextField("fFileName", new Model(""));
>> >>form.add(fRequestId);
>> >>form.add(fFileName);
>> >>
>> >>// Add buttons
>> >>button = new Button("button") {
>> >>@Override
>> >>public void onSubmit() {
>> >>parameters.add("requestId", fRequestId.getValue());
>> >>parameters.add("fileName", fFileName.getValue());
>> >>setResponsePage(RequestPage.class, parameters);
>> >>}
>> >>};
>> >>form.add(button);
>> >>add(form);
>> >>
>> >> In the constructor of this RequestPage, I call a populate method with
>> >> PageParameters
>> >>
>> >>// Populate list with search criteri

Re: Form and PageParameters

2009-09-07 Thread Eyal Golan
You can have two constructors in your page.
If you work 'internally' then you can use the one that accepts a pojo. If
you work with URL, then the one that accepts PageParameters will be used.

the setResponsePage can accept a Page and not only a class, so what you can
do is create your page: new RequestPage(myPojoModelObject), and then put it
in the setResponsePage parameter.

IllegalArgumentException: A child with id 'requestList' already
means that you added it already to your page. AFAICS you don't go to a new
page in the button submit so you add the list over and over again.

if you want to update a list, use a dynamic model for the content and update
it.

Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Mon, Sep 7, 2009 at 1:58 PM, cmoulliard  wrote:

>
> Thx for the reply.
>
> You are right, it is not a must to use PageParameters but as this is my
> first Wicket project, I have started to work with simple things.
>
> In the meantime, I have had a look to the formInput example where a
> CompoundPropertyModel is used. I have adapted the Form to work with it.
>
> My question is now :
>
> When I call the first time my page, the url is : http://localhost/request.
> Wicket receives this request and the constructor RequestPage(PageParameter
> pageParameter) is called. Next, after filling my form in the page and
> clicking on the onSubmit button, the request is submitted to the same page.
>
> How can I retrieve the values of the CompoundPropertyModel from my form in
> this case ? Do I have to do something particular in the
> setResponsePage(RequestPage.Class) to pass the compoundPropertyModel ? Do I
> need to create two different constructors : one for PageParameters and the
> other to handle CompoundPropertyModel ?
>
> Regards,
>
> Charles
>
>
> egolan74 wrote:
> >
> > Is it a must that you use PageParameters for RequestPage?
> > Do you need an access to it also from a URL (after mounting it in your
> > Application).
> >
> > I think that a nicer way is to add a constructor that accepts the values.
> > Even better, I would have created a POJO model.
> > Use a CompoundPropertyModel with the form, and pass this object to the
> > RequestPage.
> >
> > Eyal Golan
> > egola...@gmail.com
> >
> > Visit: http://jvdrums.sourceforge.net/
> > LinkedIn: http://www.linkedin.com/in/egolan74
> >
> > P  Save a tree. Please don't print this e-mail unless it's really
> > necessary
> >
> >
> > On Mon, Sep 7, 2009 at 11:38 AM, Charles Moulliard
> > wrote:
> >
> >> Hi,
> >>
> >> I have created a "RequestPage" html page containing a form (= search
> >> criteria) and a list (= Data View where the result set of data retrieved
> >> in
> >> a DB according to search criteria is displayed). When the user clicks on
> >> the
> >> "search criteria" button of this page, the request is redirected to the
> >> RequestPage where we extract the search criteria values and pass them to
> >> the
> >> service in charge to retrieve the data. In the java class accompagning
> >> this
> >> page, I have overrided the onSubmit method of the "submit button" to
> pass
> >> the value of the form fields
> >>
> >>public RequestPage(final PageParameters parameters) {
> >> ...
> >>   Form form = new Form("searchCriteriaRequest");
> >>
> >>// Add fields
> >>fRequestId = new TextField("fRequestId", new Model(""));
> >>fFileName = new TextField("fFileName", new Model(""));
> >>form.add(fRequestId);
> >>form.add(fFileName);
> >>
> >>// Add buttons
> >>button = new Button("button") {
> >>@Override
> >>public void onSubmit() {
> >>parameters.add("requestId", fRequestId.getValue());
> >>parameters.add("fileName", fFileName.getValue());
> >>setResponsePage(RequestPage.class, parameters);
> >>}
> >>};
> >>form.add(button);
> >>add(form);
> >>
> >> In the constructor of this RequestPage, I call a populate method with
> >> PageParameters
> >>
> >>// Populate list with search criteria values
> >>populateList(parameters.getKey("requestId"),
> >> parameters.getKey("fileName"));
> >>
> >> Questions :
> >> 1) Is it the good way to handle PageParameters and Form in Wicket ? If
> >> this
> >> is not the case, can someone point me to a good example ?
> >> 2) The fields filled in the previous post of my page are not removed
> when
> >> I
> >> repost a new request on my page. How can I reset these fields from the
> >> request of the new post ?
> >>
> >> Regards,
> >>
> >> Charles Moulliard
> >> Senior Enterprise Architect
> >> Apache Camel Committer
> >>
> >> *
> >> blog : http://cmoulliard.blogspot.com
> >>
> >
> >
> > -
> > Eyal Golan
> > egola...@gmail.com
> >
> > Visit: JVDrums
> > LinkedIn: LinkedIn
> >
>
>
> -

Re: Form and PageParameters

2009-09-07 Thread cmoulliard

According to what you propose, I have added in the onSubmit() method of my
form class, the following method :

public void onSubmit() {
   
// Populate list using search Criteria
populateList((RequestModel) this.getModelObject());
   
}

populateList calls a service returning from my DB the records. The result (=
records) are put in a LoadableDetachableModel which is used by the DataView
to display the result in a DataView.

private void populateList(RequestModel requestModel) {
// Generate Data View to display requests in a table
final DataView dataView = new DataView("requestList", new
RequestProvider(requestModel)) {

public void populateItem(final Item item) {
final Request request = (Request) item.getModelObject();


Unfortunately, when onSubmit (of my form) is called, Wicket generates the
following error :

WicketMessage: Method onFormSubmitted of interface
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component
[MarkupContainer [Component id = requestForm]] threw an exception

Root cause:

java.lang.IllegalArgumentException: A child with id 'requestList' already
exists:

How can I avoid this ?


Dipu-3 wrote:
> 
> you can call YourForm.this.getModelObject() in your forms onSubmit or
> the buttons onSubmit method.
> that would return the model object bound to your CompoundPropertyModel
> and you model object would have all the updated values
> 
> -dipu
> 
> 
> 
> 
> 
> On Mon, Sep 7, 2009 at 11:58 AM, cmoulliard wrote:
>>
>> Thx for the reply.
>>
>> You are right, it is not a must to use PageParameters but as this is my
>> first Wicket project, I have started to work with simple things.
>>
>> In the meantime, I have had a look to the formInput example where a
>> CompoundPropertyModel is used. I have adapted the Form to work with it.
>>
>> My question is now :
>>
>> When I call the first time my page, the url is :
>> http://localhost/request.
>> Wicket receives this request and the constructor
>> RequestPage(PageParameter
>> pageParameter) is called. Next, after filling my form in the page and
>> clicking on the onSubmit button, the request is submitted to the same
>> page.
>>
>> How can I retrieve the values of the CompoundPropertyModel from my form
>> in
>> this case ? Do I have to do something particular in the
>> setResponsePage(RequestPage.Class) to pass the compoundPropertyModel ? Do
>> I
>> need to create two different constructors : one for PageParameters and
>> the
>> other to handle CompoundPropertyModel ?
>>
>> Regards,
>>
>> Charles
>>
>>
>> egolan74 wrote:
>>>
>>> Is it a must that you use PageParameters for RequestPage?
>>> Do you need an access to it also from a URL (after mounting it in your
>>> Application).
>>>
>>> I think that a nicer way is to add a constructor that accepts the
>>> values.
>>> Even better, I would have created a POJO model.
>>> Use a CompoundPropertyModel with the form, and pass this object to the
>>> RequestPage.
>>>
>>> Eyal Golan
>>> egola...@gmail.com
>>>
>>> Visit: http://jvdrums.sourceforge.net/
>>> LinkedIn: http://www.linkedin.com/in/egolan74
>>>
>>> P  Save a tree. Please don't print this e-mail unless it's really
>>> necessary
>>>
>>>
>>> On Mon, Sep 7, 2009 at 11:38 AM, Charles Moulliard
>>> wrote:
>>>
 Hi,

 I have created a "RequestPage" html page containing a form (= search
 criteria) and a list (= Data View where the result set of data
 retrieved
 in
 a DB according to search criteria is displayed). When the user clicks
 on
 the
 "search criteria" button of this page, the request is redirected to the
 RequestPage where we extract the search criteria values and pass them
 to
 the
 service in charge to retrieve the data. In the java class accompagning
 this
 page, I have overrided the onSubmit method of the "submit button" to
 pass
 the value of the form fields

    public RequestPage(final PageParameters parameters) {
 ...
       Form form = new Form("searchCriteriaRequest");

        // Add fields
        fRequestId = new TextField("fRequestId", new Model(""));
        fFileName = new TextField("fFileName", new Model(""));
        form.add(fRequestId);
        form.add(fFileName);

        // Add buttons
        button = new Button("button") {
           �...@override
            public void onSubmit() {
                parameters.add("requestId", fRequestId.getValue());
                parameters.add("fileName", fFileName.getValue());
                setResponsePage(RequestPage.class, parameters);
            }
        };
        form.add(button);
        add(form);

 In the constructor of this RequestPage, I call a populate method with
 PageParameters

        // Populate list with search criteria values
        populateList

Re: Form and PageParameters

2009-09-07 Thread Dipu
you can call YourForm.this.getModelObject() in your forms onSubmit or
the buttons onSubmit method.
that would return the model object bound to your CompoundPropertyModel
and you model object would have all the updated values

-dipu





On Mon, Sep 7, 2009 at 11:58 AM, cmoulliard wrote:
>
> Thx for the reply.
>
> You are right, it is not a must to use PageParameters but as this is my
> first Wicket project, I have started to work with simple things.
>
> In the meantime, I have had a look to the formInput example where a
> CompoundPropertyModel is used. I have adapted the Form to work with it.
>
> My question is now :
>
> When I call the first time my page, the url is : http://localhost/request.
> Wicket receives this request and the constructor RequestPage(PageParameter
> pageParameter) is called. Next, after filling my form in the page and
> clicking on the onSubmit button, the request is submitted to the same page.
>
> How can I retrieve the values of the CompoundPropertyModel from my form in
> this case ? Do I have to do something particular in the
> setResponsePage(RequestPage.Class) to pass the compoundPropertyModel ? Do I
> need to create two different constructors : one for PageParameters and the
> other to handle CompoundPropertyModel ?
>
> Regards,
>
> Charles
>
>
> egolan74 wrote:
>>
>> Is it a must that you use PageParameters for RequestPage?
>> Do you need an access to it also from a URL (after mounting it in your
>> Application).
>>
>> I think that a nicer way is to add a constructor that accepts the values.
>> Even better, I would have created a POJO model.
>> Use a CompoundPropertyModel with the form, and pass this object to the
>> RequestPage.
>>
>> Eyal Golan
>> egola...@gmail.com
>>
>> Visit: http://jvdrums.sourceforge.net/
>> LinkedIn: http://www.linkedin.com/in/egolan74
>>
>> P  Save a tree. Please don't print this e-mail unless it's really
>> necessary
>>
>>
>> On Mon, Sep 7, 2009 at 11:38 AM, Charles Moulliard
>> wrote:
>>
>>> Hi,
>>>
>>> I have created a "RequestPage" html page containing a form (= search
>>> criteria) and a list (= Data View where the result set of data retrieved
>>> in
>>> a DB according to search criteria is displayed). When the user clicks on
>>> the
>>> "search criteria" button of this page, the request is redirected to the
>>> RequestPage where we extract the search criteria values and pass them to
>>> the
>>> service in charge to retrieve the data. In the java class accompagning
>>> this
>>> page, I have overrided the onSubmit method of the "submit button" to pass
>>> the value of the form fields
>>>
>>>    public RequestPage(final PageParameters parameters) {
>>> ...
>>>       Form form = new Form("searchCriteriaRequest");
>>>
>>>        // Add fields
>>>        fRequestId = new TextField("fRequestId", new Model(""));
>>>        fFileName = new TextField("fFileName", new Model(""));
>>>        form.add(fRequestId);
>>>        form.add(fFileName);
>>>
>>>        // Add buttons
>>>        button = new Button("button") {
>>>           �...@override
>>>            public void onSubmit() {
>>>                parameters.add("requestId", fRequestId.getValue());
>>>                parameters.add("fileName", fFileName.getValue());
>>>                setResponsePage(RequestPage.class, parameters);
>>>            }
>>>        };
>>>        form.add(button);
>>>        add(form);
>>>
>>> In the constructor of this RequestPage, I call a populate method with
>>> PageParameters
>>>
>>>        // Populate list with search criteria values
>>>        populateList(parameters.getKey("requestId"),
>>> parameters.getKey("fileName"));
>>>
>>> Questions :
>>> 1) Is it the good way to handle PageParameters and Form in Wicket ? If
>>> this
>>> is not the case, can someone point me to a good example ?
>>> 2) The fields filled in the previous post of my page are not removed when
>>> I
>>> repost a new request on my page. How can I reset these fields from the
>>> request of the new post ?
>>>
>>> Regards,
>>>
>>> Charles Moulliard
>>> Senior Enterprise Architect
>>> Apache Camel Committer
>>>
>>> *
>>> blog : http://cmoulliard.blogspot.com
>>>
>>
>>
>> -
>> Eyal Golan
>> egola...@gmail.com
>>
>> Visit: JVDrums
>> LinkedIn: LinkedIn
>>
>
>
> -
> Charles Moulliard
> SOA Architect
>
> My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
> --
> View this message in context: 
> http://www.nabble.com/Form-and-PageParameters-tp25326933p25328647.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Form and PageParameters

2009-09-07 Thread cmoulliard

Thx for the reply. 

You are right, it is not a must to use PageParameters but as this is my
first Wicket project, I have started to work with simple things.

In the meantime, I have had a look to the formInput example where a
CompoundPropertyModel is used. I have adapted the Form to work with it.

My question is now :

When I call the first time my page, the url is : http://localhost/request.
Wicket receives this request and the constructor RequestPage(PageParameter
pageParameter) is called. Next, after filling my form in the page and
clicking on the onSubmit button, the request is submitted to the same page. 

How can I retrieve the values of the CompoundPropertyModel from my form in
this case ? Do I have to do something particular in the
setResponsePage(RequestPage.Class) to pass the compoundPropertyModel ? Do I
need to create two different constructors : one for PageParameters and the
other to handle CompoundPropertyModel ?

Regards,

Charles


egolan74 wrote:
> 
> Is it a must that you use PageParameters for RequestPage?
> Do you need an access to it also from a URL (after mounting it in your
> Application).
> 
> I think that a nicer way is to add a constructor that accepts the values.
> Even better, I would have created a POJO model.
> Use a CompoundPropertyModel with the form, and pass this object to the
> RequestPage.
> 
> Eyal Golan
> egola...@gmail.com
> 
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
> 
> P  Save a tree. Please don't print this e-mail unless it's really
> necessary
> 
> 
> On Mon, Sep 7, 2009 at 11:38 AM, Charles Moulliard
> wrote:
> 
>> Hi,
>>
>> I have created a "RequestPage" html page containing a form (= search
>> criteria) and a list (= Data View where the result set of data retrieved
>> in
>> a DB according to search criteria is displayed). When the user clicks on
>> the
>> "search criteria" button of this page, the request is redirected to the
>> RequestPage where we extract the search criteria values and pass them to
>> the
>> service in charge to retrieve the data. In the java class accompagning
>> this
>> page, I have overrided the onSubmit method of the "submit button" to pass
>> the value of the form fields
>>
>>public RequestPage(final PageParameters parameters) {
>> ...
>>   Form form = new Form("searchCriteriaRequest");
>>
>>// Add fields
>>fRequestId = new TextField("fRequestId", new Model(""));
>>fFileName = new TextField("fFileName", new Model(""));
>>form.add(fRequestId);
>>form.add(fFileName);
>>
>>// Add buttons
>>button = new Button("button") {
>>@Override
>>public void onSubmit() {
>>parameters.add("requestId", fRequestId.getValue());
>>parameters.add("fileName", fFileName.getValue());
>>setResponsePage(RequestPage.class, parameters);
>>}
>>};
>>form.add(button);
>>add(form);
>>
>> In the constructor of this RequestPage, I call a populate method with
>> PageParameters
>>
>>// Populate list with search criteria values
>>populateList(parameters.getKey("requestId"),
>> parameters.getKey("fileName"));
>>
>> Questions :
>> 1) Is it the good way to handle PageParameters and Form in Wicket ? If
>> this
>> is not the case, can someone point me to a good example ?
>> 2) The fields filled in the previous post of my page are not removed when
>> I
>> repost a new request on my page. How can I reset these fields from the
>> request of the new post ?
>>
>> Regards,
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *
>> blog : http://cmoulliard.blogspot.com
>>
> 
> 
> -
> Eyal Golan
> egola...@gmail.com
> 
> Visit: JVDrums 
> LinkedIn: LinkedIn 
> 


-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/Form-and-PageParameters-tp25326933p25328647.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Form and PageParameters

2009-09-07 Thread Eyal Golan
Is it a must that you use PageParameters for RequestPage?
Do you need an access to it also from a URL (after mounting it in your
Application).

I think that a nicer way is to add a constructor that accepts the values.
Even better, I would have created a POJO model.
Use a CompoundPropertyModel with the form, and pass this object to the
RequestPage.

Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Mon, Sep 7, 2009 at 11:38 AM, Charles Moulliard wrote:

> Hi,
>
> I have created a "RequestPage" html page containing a form (= search
> criteria) and a list (= Data View where the result set of data retrieved in
> a DB according to search criteria is displayed). When the user clicks on
> the
> "search criteria" button of this page, the request is redirected to the
> RequestPage where we extract the search criteria values and pass them to
> the
> service in charge to retrieve the data. In the java class accompagning this
> page, I have overrided the onSubmit method of the "submit button" to pass
> the value of the form fields
>
>public RequestPage(final PageParameters parameters) {
> ...
>   Form form = new Form("searchCriteriaRequest");
>
>// Add fields
>fRequestId = new TextField("fRequestId", new Model(""));
>fFileName = new TextField("fFileName", new Model(""));
>form.add(fRequestId);
>form.add(fFileName);
>
>// Add buttons
>button = new Button("button") {
>@Override
>public void onSubmit() {
>parameters.add("requestId", fRequestId.getValue());
>parameters.add("fileName", fFileName.getValue());
>setResponsePage(RequestPage.class, parameters);
>}
>};
>form.add(button);
>add(form);
>
> In the constructor of this RequestPage, I call a populate method with
> PageParameters
>
>// Populate list with search criteria values
>populateList(parameters.getKey("requestId"),
> parameters.getKey("fileName"));
>
> Questions :
> 1) Is it the good way to handle PageParameters and Form in Wicket ? If this
> is not the case, can someone point me to a good example ?
> 2) The fields filled in the previous post of my page are not removed when I
> repost a new request on my page. How can I reset these fields from the
> request of the new post ?
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *
> blog : http://cmoulliard.blogspot.com
>


Form and PageParameters

2009-09-07 Thread Charles Moulliard
Hi,

I have created a "RequestPage" html page containing a form (= search
criteria) and a list (= Data View where the result set of data retrieved in
a DB according to search criteria is displayed). When the user clicks on the
"search criteria" button of this page, the request is redirected to the
RequestPage where we extract the search criteria values and pass them to the
service in charge to retrieve the data. In the java class accompagning this
page, I have overrided the onSubmit method of the "submit button" to pass
the value of the form fields

public RequestPage(final PageParameters parameters) {
...
   Form form = new Form("searchCriteriaRequest");

// Add fields
fRequestId = new TextField("fRequestId", new Model(""));
fFileName = new TextField("fFileName", new Model(""));
form.add(fRequestId);
form.add(fFileName);

// Add buttons
button = new Button("button") {
@Override
public void onSubmit() {
parameters.add("requestId", fRequestId.getValue());
parameters.add("fileName", fFileName.getValue());
setResponsePage(RequestPage.class, parameters);
}
};
form.add(button);
add(form);

In the constructor of this RequestPage, I call a populate method with
PageParameters

// Populate list with search criteria values
populateList(parameters.getKey("requestId"),
parameters.getKey("fileName"));

Questions :
1) Is it the good way to handle PageParameters and Form in Wicket ? If this
is not the case, can someone point me to a good example ?
2) The fields filled in the previous post of my page are not removed when I
repost a new request on my page. How can I reset these fields from the
request of the new post ?

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*
blog : http://cmoulliard.blogspot.com


Re: Article in german Javamagazin

2009-09-07 Thread Michael Plöd
Hi Jonathan,
I was one of the guys writing the title story. I contacted the Java
Magazin Team regarding a copy for you!

Unfortunately we can't put the articles online for free since they
were written for a commercial print magazine.

Regards,
Michael

On Thu, Sep 3, 2009 at 8:13 PM, Jonathan Locke wrote:
>
>
> if anyone from javamagazin is reading this list, would love to add a copy of
> this to my growing collection of wicket publications.
>
>
> RaBe wrote:
>>
>> yes, it is.
>>
>> http://it-republik.de/jaxenter/java-magazin-ausgaben/Wicket-000321.html
>>
>> could not find a online version of this article ..
>>
>> On Thu, Sep 3, 2009 at 18:19, Jonathan Locke
>> wrote:
>>>
>>>
>>> btw, is this a print magazine?
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Article-in-german-Javamagazin-tp25255240p25281388.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Update ListView using ajax

2009-09-07 Thread freak182

Hello,

thank you for your. i already make it work. (need to adjust some markup
thing :) )

thanks a lot.
cheers.


michael mosmann wrote:
> 
> Hmm,..
> 
> can you post your markup? this code does work with my own markup..
> 
> did you use  or did you use
>  .. do you see something
> in wicket-ajax-debug panel? any error-message? any ajax-response?
> 
>> ...and im pretty sure that i already some code in previous version of
>> wicket
>> and it work..but i dont know what im missing right now. maybe worst case
>> i
>> will do is to go back to old version of wicket but i want the latest
>> version.
> 
> if this does not work with wicket 1.4.1, then it does not work with any
> wicket version.. 
> 
> mm:)
> 
> -- 
> Michael Mosmann - http://www.wicket-praxis.de/blog 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Update-ListView-using-ajax-tp25310457p25326735.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Form FileUploadField maxSize does not work

2009-09-07 Thread nytrus

Yes the issue is that, the form being submitted is the outer (which has no
maxsize set, so default is used).
When I submit upload0, Form.handleMultiPart() is called on the outer form
(form0).
When I submit upload1, Form.handleMultiPart() is called on simpleUpload.

I'm missing something or doing something wrong? 


igor.vaynberg wrote:
> 
> so is the problem that the form being submitted is the outer form and
> it doesnt support the inner form's maxsize?
> 
> -igor
> 

-- 
View this message in context: 
http://www.nabble.com/Form-FileUploadField-maxSize-does-not-work-tp25293039p25326577.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Update ListView using ajax

2009-09-07 Thread freak182

Hello,

my markup:


List of Files


Date Uploaded
Name










...ajax response:

first result:



next time i hit the button:



...seems right...but in display in firefox:

http://www.nabble.com/file/p25326096/Screenshot-Mozilla%2BFirefox.png 

thanks a lot.
cheers.


michael mosmann wrote:
> 
> Hmm,..
> 
> can you post your markup? this code does work with my own markup..
> 
> did you use  or did you use
>  .. do you see something
> in wicket-ajax-debug panel? any error-message? any ajax-response?
> 
>> ...and im pretty sure that i already some code in previous version of
>> wicket
>> and it work..but i dont know what im missing right now. maybe worst case
>> i
>> will do is to go back to old version of wicket but i want the latest
>> version.
> 
> if this does not work with wicket 1.4.1, then it does not work with any
> wicket version.. 
> 
> mm:)
> 
> -- 
> Michael Mosmann - http://www.wicket-praxis.de/blog 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Update-ListView-using-ajax-tp25310457p25326096.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org