Re: [8.3] Nested Forms within a table?

2019-04-26 Thread Sven Meier
 
 
Thanks, good to know.
 

 
Sven
 
 
 

 
 
 
 
 
>  
> On 26.04.2019 at 07:33,wrote:
>  
>  
>  until next version comes out, this lump of code seems to be working: Form 
> actionForm=new Form<>("actionForm"){ @Override protected void 
> onComponentTag(ComponentTag tag) { super.onComponentTag(tag); 
> tag.setName("tr"); } } ; On Wed, Apr 24, 2019 at 10:28 AM Sven Meier wrote:  
> >   >   >  Hi Nino,  >   >   >   >  I've taken the liberty of improving this 
> with WICKET-6658:  >   >  No need to let Form enforce a 
>  
> -tag when it's changed into a div  >  afterwards (in case of nested forms).  
> >   >   >   >  Have fun  >   >  Sven  >   >   >   >   >   >   >   >   >   >   
> >   >   >   >   >   >  On 24.04.2019 at 08:45, wrote:  >   >   >   >   >   >  
> normally I would agree.. But when our designer gives us the html, and  >  
> there are tables in it we need to change that stuff.. I do not like the  >  
> idea that the web framework forces you to change markup so that it can  >  
> work.. One thing are to teach the devs that there are some quirks with the  > 
>  web framework (thats completely expected). But to have to teach the  >  
> designer about a web framework so they can avoid the quirky parts seems  >  
> wrong. Its not part of Wickets statement anyhow.  >  Just Java  &  HTML  >   
> >   >  Leverage what you know about Java or your favourite HTML editor to  >  
> write  >  Wicket applications. With pure Java code and HTML markup Wicket  >  
> is the  >  go-to web framework for purists.  >  /rant off :) On Wed, Apr  >  2
4, 2019 at 8:24 AM Maxim Solodovnik wrote:  >  if something "look like a  >  
duck, walk like a duck and sound like a duck" -  >  it is duck :)  >  CSS  >  
table are tables, but with no HTML '' tags :)  >   >  On Wed, 24 Apr 2019  >  
at 13:22, nino martinez wael  <   >  nino.martinez.  >  w...@gmail.com>  wrote: 
 >   >   >  if its CSS its not a table right?  >   >   >   >   >   >   >   >   
>  On Wed, Apr 24, 2019 at 7:25 AM Maxim  >  Solodovnik  >   >  wrote:  >   >   
>   >   >  Actually you can :)  >   >   >   >  But you need CSS tables for this 
:)  >   >   >   >   >   >  On Wed, 24  >  Apr 2019 at 11:53, nino martinez wael 
 <   >   >   >   >  nino.martinez.w...@gmail.com>  wrote:  >   >   >   >   >   
>   >  I agree  >  with Maxim, but I do not know the side effects, im going to  
>  try  >   >   >   >   >  it.. As it is now (out of the box), we cannot have 
nested forms in  >   >   >  tables  >   >   >   >  (for example on form per ) 
without breaking  >  html.  >   >   >   >   >   >  
 >   >  -Nino  >   >   >   >   >   >   >   >   >  On Wed, Apr 24, 2019 at 3:24 
 > AM Maxim Solodovnik  <   >   >  solomax...@gmail.com  >   >   >   >   >   >  
 >  >  wrote:  >   >   >   >   >   >   >   >   >   >  I would say we can create 
 > overridable method so users  >  can specify  >   >  which  >   >   >   >  
 > tag  >   >   >   >   >  to use  >   >   >   >   >   >  it will help with ``  
 > >   >   >   >   >   >   >   >   >   >   >  On Wed, 24 Apr 2019 at 01:39, 
 > Sven Meier wrote:  >   >   >   >   >   >   >   >   >   >   >   >  Hi,  >   > 
 >   >   >   >   >   >   >   >   >   >   >  I  >  think we could improve nested 
 > Forms so that only  >   >   >   >  tags  >  are  >   >   >   >   >   >  
 > turned into a  >   >   >   >  , but anything else stays as it is.  >   >   > 
 >   >   >   >   >   >   >   >   >   >   >  WDYT?  >   >   >   >   >   >  Sven  
 > >   >   >   >   >   >   >   >   >   >   >   >   >  Am 23.04.19 um 10:01 
 > schrieb nino martinez wael:  >   >   >   >   >   >   >   >  Hi  >   >   >   
 > >   >   >   >
   >   >   >   >   >   >   >   >  When nesting forms, the form tag are changed 
to an div and it  >   >  is  >   >   >  hard  >   >   >   >   >   >  coded:  >  
 >   >   >   >   >   >   >  org/apache/wicket/markup/html/form/Form.java:1597  
>   >   >

Re: [8.3] Nested Forms within a table?

2019-04-25 Thread nino martinez wael
until next version comes out, this lump of code seems to be working:

Form actionForm=new Form<>("actionForm"){
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.setName("tr");
}
}
;


On Wed, Apr 24, 2019 at 10:28 AM Sven Meier  wrote:

>
>
> Hi Nino,
>
>
>
> I've taken the liberty of improving this with WICKET-6658:
>
> No need to let Form enforce a  -tag when it's changed into a div
> afterwards (in case of nested forms).
>
>
>
> Have fun
>
> Sven
>
>
>
>
>
>
>
>
>
>
>
>
> >
> > On 24.04.2019 at 08:45,wrote:
> >
> >
> >  normally I would agree.. But when our designer gives us the html, and
> there are tables in it we need to change that stuff.. I do not like the
> idea that the web framework forces you to change markup so that it can
> work.. One thing are to teach the devs that there are some quirks with the
> web framework (thats completely expected). But to have to teach the
> designer about a web framework so they can avoid the quirky parts seems
> wrong. Its not part of Wickets statement anyhow.  >  Just Java  &  HTML  >
>  >  Leverage what you know about Java or your favourite HTML editor to
> write  >  Wicket applications. With pure Java code and HTML markup Wicket
> is the  >  go-to web framework for purists.  >  /rant off :) On Wed, Apr
> 24, 2019 at 8:24 AM Maxim Solodovnik wrote:  >  if something "look like a
> duck, walk like a duck and sound like a duck" -  >  it is duck :)  >  CSS
> table are tables, but with no HTML '' tags :)  >   >  On Wed, 24 Apr 2019
> at 13:22, nino martinez wael  <   >  nino.martinez.
> w...@gmail.com>  wrote:  >   >   >  if its CSS its not a table right?  >
>  >   >   >   >   >   >   >  On Wed, Apr 24, 2019 at 7:25 AM Maxim
> Solodovnik  >   >  wrote:  >   >   >   >   >  Actually you can :)  >   >
>  >  But you need CSS tables for this :)  >   >   >   >   >   >  On Wed, 24
> Apr 2019 at 11:53, nino martinez wael  <   >   >   >
> nino.martinez.w...@gmail.com>  wrote:  >   >   >   >   >   >   >  I agree
> with Maxim, but I do not know the side effects, im going to  >  try  >   >
>  >   >  it.. As it is now (out of the box), we cannot have nested forms in
> >   >  tables  >   >   >   >  (for example on form per ) without breaking
> html.  >   >   >   >   >   >   >   >  -Nino  >   >   >   >   >   >   >   >
> On Wed, Apr 24, 2019 at 3:24 AM Maxim Solodovnik  <   >
> solomax...@gmail.com  >   >   >   >   >   >   >  wrote:  >   >   >   >
>  >   >   >   >   >  I would say we can create overridable method so users
> can specify  >   >  which  >   >   >   >  tag  >   >   >   >   >  to use  >
>   >   >   >   >  it will help with ``  >   >   >   >   >   >   >   >   >
>  >  On Wed, 24 Apr 2019 at 01:39, Sven Meier wrote:  >   >   >   >   >   >
>  >   >   >   >   >  Hi,  >   >   >   >   >   >   >   >   >   >   >   >  I
> think we could improve nested Forms so that only
> >
> >  tags  >  are  >   >   >   >   >   >  turned into a
> >
> > , but anything else stays as it is.  >   >   >   >   >   >   >   >   >
>  >   >   >  WDYT?  >   >   >   >   >   >  Sven  >   >   >   >   >   >   >
>  >   >   >   >   >  Am 23.04.19 um 10:01 schrieb nino martinez wael:  >
>  >   >   >   >   >   >  Hi  >   >   >   >   >   >   >   >   >   >   >   >
>  >   >  When nesting forms, the form tag are changed to an div and it  >
> is  >   >   >  hard  >   >   >   >   >   >  coded:  >   >   >   >   >   >
>  >  org/apache/wicket/markup/html/form/Form.java:1597  >   >   >   >   >
>  >   >  ...  >   >   >   >   >   >   >   >   >   >   >   >   >   >
> tag.setName("div");  >   >   >   >   >   >   >   >   >   >   >   >   >   >
> ...  >   >   >   >   >   >   >   >   >   >   >   >   >   >  If only I could
> change the tag to be tr, it would produce valid  >   >   >  html.  >   >
>  >   >   >  Are  >   >   >   >   >   >   >  it deliberate to be hardcoded?
> >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >
>  >   >  -
>   >   >   >   >   >   >  To
> unsubscribe, e-mail: users-unsubscr...@wicket.apache.org  >   >   >   >
>  >   >  For additional commands, e-mail: users-h...@wicket.apache.org  >
>  >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >
>  >   >  --  >   >   >   >   >  WBR  >   >   >   >   >  Maxim aka solomax
> >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >  --  >
>  >   >   >  Best regards / Med venlig hilsen  >   >   >   >  Nino Martinez
> >   >   >   >   >   >   >   >   >   >   >   >   >  --  >   >   >  WBR  >
>  >   >  Maxim aka solomax  >   >   >   >   >   >   >   >   >  --  >   >
> Best regards / Med venlig hilsen  >   >  Nino Martinez  >   >   >   >   >
> --  >  WBR  >  Maxim aka solomax  >  -- Best regards / Med venlig hilsen
> Nino Martinez
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>



-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: [8.3] Nested Forms within a table?

2019-04-24 Thread Sven Meier
 
 
Hi Nino,
 

 
I've taken the liberty of improving this with WICKET-6658:
 
No need to let Form enforce a  -tag when it's changed into a div 
afterwards (in case of nested forms).
 

 
Have fun
 
Sven
 

 

 
 

 
 
 
 
 
>  
> On 24.04.2019 at 08:45,wrote:
>  
>  
>  normally I would agree.. But when our designer gives us the html, and there 
> are tables in it we need to change that stuff.. I do not like the idea that 
> the web framework forces you to change markup so that it can work.. One thing 
> are to teach the devs that there are some quirks with the web framework 
> (thats completely expected). But to have to teach the designer about a web 
> framework so they can avoid the quirky parts seems wrong. Its not part of 
> Wickets statement anyhow.  >  Just Java  &  HTML  >   >  Leverage what you 
> know about Java or your favourite HTML editor to write  >  Wicket 
> applications. With pure Java code and HTML markup Wicket is the  >  go-to web 
> framework for purists.  >  /rant off :) On Wed, Apr 24, 2019 at 8:24 AM Maxim 
> Solodovnik wrote:  >  if something "look like a duck, walk like a duck and 
> sound like a duck" -  >  it is duck :)  >  CSS table are tables, but with no 
> HTML '' tags :)  >   >  On Wed, 24 Apr 2019 at 13:22, nino martinez wael  <   
> >  nino.martinez.
w...@gmail.com>  wrote:  >   >   >  if its CSS its not a table right?  >   >   
>   >   >   >   >   >  On Wed, Apr 24, 2019 at 7:25 AM Maxim Solodovnik  >   >  
wrote:  >   >   >   >   >  Actually you can :)  >   >   >  But you need CSS 
tables for this :)  >   >   >   >   >   >  On Wed, 24 Apr 2019 at 11:53, nino 
martinez wael  <   >   >   >  nino.martinez.w...@gmail.com>  wrote:  >   >   >  
 >   >   >   >  I agree with Maxim, but I do not know the side effects, im 
going to  >  try  >   >   >   >  it.. As it is now (out of the box), we cannot 
have nested forms in  >   >  tables  >   >   >   >  (for example on form per ) 
without breaking html.  >   >   >   >   >   >   >   >  -Nino  >   >   >   >   > 
  >   >   >  On Wed, Apr 24, 2019 at 3:24 AM Maxim Solodovnik  <   >  
solomax...@gmail.com  >   >   >   >   >   >   >  wrote:  >   >   >   >   >   >  
 >   >   >  I would say we can create overridable method so users can specify  
>   >  which  >   >   >   >  tag  >   >   >   >   >  to use  > 
  >   >   >   >  it will help with ``  >   >   >   >   >   >   >   >   >   >  
On Wed, 24 Apr 2019 at 01:39, Sven Meier wrote:  >   >   >   >   >   >   >   >  
 >   >   >  Hi,  >   >   >   >   >   >   >   >   >   >   >   >  I think we 
could improve nested Forms so that only 
>  
>  tags  >  are  >   >   >   >   >   >  turned into a 
>  
> , but anything else stays as it is.  >   >   >   >   >   >   >   >   >   >   
> >   >  WDYT?  >   >   >   >   >   >  Sven  >   >   >   >   >   >   >   >   >  
>  >   >   >  Am 23.04.19 um 10:01 schrieb nino martinez wael:  >   >   >   >   
> >   >   >  Hi  >   >   >   >   >   >   >   >   >   >   >   >   >   >  When 
> nesting forms, the form tag are changed to an div and it  >  is  >   >   >  
> hard  >   >   >   >   >   >  coded:  >   >   >   >   >   >   >  
> org/apache/wicket/markup/html/form/Form.java:1597  >   >   >   >   >   >   >  
> ...  >   >   >   >   >   >   >   >   >   >   >   >   >   >  
> tag.setName("div");  >   >   >   >   >   >   >   >   >   >   >   >   >   >  
> ...  >   >   >   >   >   >   >   >   >   >   >   >   >   >  If only I could 
> change the tag to be tr, it would produce valid  >   >   >  html.  >   >   >  
>  >   >  Are  >   >   >   >   >   >   >  it deliberate to be hardcoded?  >   > 
>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >  
> -
  >   >   >   >   >   >  To 
unsubscribe, e-mail: users-unsubscr...@wicket.apache.org  >   >   >   >   >   > 
 For additional commands, e-mail: users-h...@wicket.apache.org  >   >   >   >   
>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >  --  >   
>   >   >   >  WBR  >   >   >   >   >  Maxim aka solomax  >   >   >   >   >   > 
  >   >   >   >   >   >   >   >   >   >   >  --  >   >   >   >  Best regards / 
Med venlig hilsen  >   >   >   >  Nino Martinez  >   >   >   >   >   >   >   >  
 >   >   >   >   >  --  >   >   >  WBR  >   >   >  Maxim aka solomax  >   >   > 
  >   >   >   >   >   >  --  >   >  Best regards / Med venlig hilsen  >   >  
Nino Martinez  >   >   >   >   >  --  >  WBR  >  Maxim aka solomax  >  -- Best 
regards / Med venlig hilsen Nino Martinez
>  
>  
>  
>  
>
>  
>  
>  
>
>  
>  
>  
>  
 
 
 

Re: [8.3] Nested Forms within a table?

2019-04-24 Thread Maxim Solodovnik
I totally agree,
It should be user choice :)

On Wed, 24 Apr 2019 at 13:45, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> normally I would agree.. But when our designer gives us the html, and there
> are tables in it we need to change that stuff.. I do not like the idea that
> the web framework forces you to change markup so that it can work.. One
> thing are to teach the devs that there are some quirks with the web
> framework (thats completely expected). But to have to teach the designer
> about a web framework so they can avoid the quirky parts seems wrong.
>
> Its not part of Wickets statement anyhow.
>
> > Just Java & HTML
> >
> > Leverage what you know about Java or your favourite HTML editor to write
> > Wicket applications. With pure Java code and HTML markup Wicket is the
> > go-to web framework for purists.
> >
>
> /rant off :)
>
> On Wed, Apr 24, 2019 at 8:24 AM Maxim Solodovnik 
> wrote:
>
> > if something "look like a duck, walk like a duck and sound like a duck" -
> > it is duck :)
> > CSS table are tables, but with no HTML '' tags :)
> >
> > On Wed, 24 Apr 2019 at 13:22, nino martinez wael <
> > nino.martinez.w...@gmail.com> wrote:
> >
> > > if its CSS its not a table right?
> > >
> > >
> > >
> > > On Wed, Apr 24, 2019 at 7:25 AM Maxim Solodovnik  >
> > > wrote:
> > >
> > > > Actually you can :)
> > > > But you need CSS tables for this :)
> > > >
> > > > On Wed, 24 Apr 2019 at 11:53, nino martinez wael <
> > > > nino.martinez.w...@gmail.com> wrote:
> > > >
> > > > > I agree with Maxim, but I do not know the side effects, im going to
> > try
> > > > > it.. As it is now (out of the box), we cannot have nested forms in
> > > tables
> > > > > (for example on form per ) without breaking html.
> > > > >
> > > > > -Nino
> > > > >
> > > > > On Wed, Apr 24, 2019 at 3:24 AM Maxim Solodovnik <
> > solomax...@gmail.com
> > > >
> > > > > wrote:
> > > > >
> > > > > > I would say we can create overridable method so users can specify
> > > which
> > > > > tag
> > > > > > to use
> > > > > > it will help with ``
> > > > > >
> > > > > > On Wed, 24 Apr 2019 at 01:39, Sven Meier 
> wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I think we could improve nested Forms so that only  tags
> > are
> > > > > > > turned into a , but anything else stays as it is.
> > > > > > >
> > > > > > > WDYT?
> > > > > > > Sven
> > > > > > >
> > > > > > > Am 23.04.19 um 10:01 schrieb nino martinez wael:
> > > > > > > > Hi
> > > > > > > >
> > > > > > > > When nesting forms, the form tag are changed to an div and it
> > is
> > > > hard
> > > > > > > coded:
> > > > > > > > org/apache/wicket/markup/html/form/Form.java:1597
> > > > > > > > ...
> > > > > > > >
> > > > > > > > tag.setName("div");
> > > > > > > >
> > > > > > > > ...
> > > > > > > >
> > > > > > > > If only I could change the tag to be tr, it would produce
> valid
> > > > html.
> > > > > > Are
> > > > > > > > it deliberate to be hardcoded?
> > > > > > > >
> > > > > > >
> > > > > > >
> > > -
> > > > > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > WBR
> > > > > > Maxim aka solomax
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Best regards / Med venlig hilsen
> > > > > Nino Martinez
> > > > >
> > > >
> > > >
> > > > --
> > > > WBR
> > > > Maxim aka solomax
> > > >
> > >
> > >
> > > --
> > > Best regards / Med venlig hilsen
> > > Nino Martinez
> > >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>


-- 
WBR
Maxim aka solomax


Re: [8.3] Nested Forms within a table?

2019-04-24 Thread nino martinez wael
normally I would agree.. But when our designer gives us the html, and there
are tables in it we need to change that stuff.. I do not like the idea that
the web framework forces you to change markup so that it can work.. One
thing are to teach the devs that there are some quirks with the web
framework (thats completely expected). But to have to teach the designer
about a web framework so they can avoid the quirky parts seems wrong.

Its not part of Wickets statement anyhow.

> Just Java & HTML
>
> Leverage what you know about Java or your favourite HTML editor to write
> Wicket applications. With pure Java code and HTML markup Wicket is the
> go-to web framework for purists.
>

/rant off :)

On Wed, Apr 24, 2019 at 8:24 AM Maxim Solodovnik 
wrote:

> if something "look like a duck, walk like a duck and sound like a duck" -
> it is duck :)
> CSS table are tables, but with no HTML '' tags :)
>
> On Wed, 24 Apr 2019 at 13:22, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
>
> > if its CSS its not a table right?
> >
> >
> >
> > On Wed, Apr 24, 2019 at 7:25 AM Maxim Solodovnik 
> > wrote:
> >
> > > Actually you can :)
> > > But you need CSS tables for this :)
> > >
> > > On Wed, 24 Apr 2019 at 11:53, nino martinez wael <
> > > nino.martinez.w...@gmail.com> wrote:
> > >
> > > > I agree with Maxim, but I do not know the side effects, im going to
> try
> > > > it.. As it is now (out of the box), we cannot have nested forms in
> > tables
> > > > (for example on form per ) without breaking html.
> > > >
> > > > -Nino
> > > >
> > > > On Wed, Apr 24, 2019 at 3:24 AM Maxim Solodovnik <
> solomax...@gmail.com
> > >
> > > > wrote:
> > > >
> > > > > I would say we can create overridable method so users can specify
> > which
> > > > tag
> > > > > to use
> > > > > it will help with ``
> > > > >
> > > > > On Wed, 24 Apr 2019 at 01:39, Sven Meier  wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I think we could improve nested Forms so that only  tags
> are
> > > > > > turned into a , but anything else stays as it is.
> > > > > >
> > > > > > WDYT?
> > > > > > Sven
> > > > > >
> > > > > > Am 23.04.19 um 10:01 schrieb nino martinez wael:
> > > > > > > Hi
> > > > > > >
> > > > > > > When nesting forms, the form tag are changed to an div and it
> is
> > > hard
> > > > > > coded:
> > > > > > > org/apache/wicket/markup/html/form/Form.java:1597
> > > > > > > ...
> > > > > > >
> > > > > > > tag.setName("div");
> > > > > > >
> > > > > > > ...
> > > > > > >
> > > > > > > If only I could change the tag to be tr, it would produce valid
> > > html.
> > > > > Are
> > > > > > > it deliberate to be hardcoded?
> > > > > > >
> > > > > >
> > > > > >
> > -
> > > > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > WBR
> > > > > Maxim aka solomax
> > > > >
> > > >
> > > >
> > > > --
> > > > Best regards / Med venlig hilsen
> > > > Nino Martinez
> > > >
> > >
> > >
> > > --
> > > WBR
> > > Maxim aka solomax
> > >
> >
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
> --
> WBR
> Maxim aka solomax
>


-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: [8.3] Nested Forms within a table?

2019-04-24 Thread Maxim Solodovnik
if something "look like a duck, walk like a duck and sound like a duck" -
it is duck :)
CSS table are tables, but with no HTML '' tags :)

On Wed, 24 Apr 2019 at 13:22, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> if its CSS its not a table right?
>
>
>
> On Wed, Apr 24, 2019 at 7:25 AM Maxim Solodovnik 
> wrote:
>
> > Actually you can :)
> > But you need CSS tables for this :)
> >
> > On Wed, 24 Apr 2019 at 11:53, nino martinez wael <
> > nino.martinez.w...@gmail.com> wrote:
> >
> > > I agree with Maxim, but I do not know the side effects, im going to try
> > > it.. As it is now (out of the box), we cannot have nested forms in
> tables
> > > (for example on form per ) without breaking html.
> > >
> > > -Nino
> > >
> > > On Wed, Apr 24, 2019 at 3:24 AM Maxim Solodovnik  >
> > > wrote:
> > >
> > > > I would say we can create overridable method so users can specify
> which
> > > tag
> > > > to use
> > > > it will help with ``
> > > >
> > > > On Wed, 24 Apr 2019 at 01:39, Sven Meier  wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I think we could improve nested Forms so that only  tags are
> > > > > turned into a , but anything else stays as it is.
> > > > >
> > > > > WDYT?
> > > > > Sven
> > > > >
> > > > > Am 23.04.19 um 10:01 schrieb nino martinez wael:
> > > > > > Hi
> > > > > >
> > > > > > When nesting forms, the form tag are changed to an div and it is
> > hard
> > > > > coded:
> > > > > > org/apache/wicket/markup/html/form/Form.java:1597
> > > > > > ...
> > > > > >
> > > > > > tag.setName("div");
> > > > > >
> > > > > > ...
> > > > > >
> > > > > > If only I could change the tag to be tr, it would produce valid
> > html.
> > > > Are
> > > > > > it deliberate to be hardcoded?
> > > > > >
> > > > >
> > > > >
> -
> > > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > > >
> > > > >
> > > >
> > > > --
> > > > WBR
> > > > Maxim aka solomax
> > > >
> > >
> > >
> > > --
> > > Best regards / Med venlig hilsen
> > > Nino Martinez
> > >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>


-- 
WBR
Maxim aka solomax


Re: [8.3] Nested Forms within a table?

2019-04-24 Thread nino martinez wael
if its CSS its not a table right?



On Wed, Apr 24, 2019 at 7:25 AM Maxim Solodovnik 
wrote:

> Actually you can :)
> But you need CSS tables for this :)
>
> On Wed, 24 Apr 2019 at 11:53, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
>
> > I agree with Maxim, but I do not know the side effects, im going to try
> > it.. As it is now (out of the box), we cannot have nested forms in tables
> > (for example on form per ) without breaking html.
> >
> > -Nino
> >
> > On Wed, Apr 24, 2019 at 3:24 AM Maxim Solodovnik 
> > wrote:
> >
> > > I would say we can create overridable method so users can specify which
> > tag
> > > to use
> > > it will help with ``
> > >
> > > On Wed, 24 Apr 2019 at 01:39, Sven Meier  wrote:
> > >
> > > > Hi,
> > > >
> > > > I think we could improve nested Forms so that only  tags are
> > > > turned into a , but anything else stays as it is.
> > > >
> > > > WDYT?
> > > > Sven
> > > >
> > > > Am 23.04.19 um 10:01 schrieb nino martinez wael:
> > > > > Hi
> > > > >
> > > > > When nesting forms, the form tag are changed to an div and it is
> hard
> > > > coded:
> > > > > org/apache/wicket/markup/html/form/Form.java:1597
> > > > > ...
> > > > >
> > > > > tag.setName("div");
> > > > >
> > > > > ...
> > > > >
> > > > > If only I could change the tag to be tr, it would produce valid
> html.
> > > Are
> > > > > it deliberate to be hardcoded?
> > > > >
> > > >
> > > > -
> > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > >
> > > >
> > >
> > > --
> > > WBR
> > > Maxim aka solomax
> > >
> >
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
> --
> WBR
> Maxim aka solomax
>


-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: [8.3] Nested Forms within a table?

2019-04-23 Thread Maxim Solodovnik
Actually you can :)
But you need CSS tables for this :)

On Wed, 24 Apr 2019 at 11:53, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> I agree with Maxim, but I do not know the side effects, im going to try
> it.. As it is now (out of the box), we cannot have nested forms in tables
> (for example on form per ) without breaking html.
>
> -Nino
>
> On Wed, Apr 24, 2019 at 3:24 AM Maxim Solodovnik 
> wrote:
>
> > I would say we can create overridable method so users can specify which
> tag
> > to use
> > it will help with ``
> >
> > On Wed, 24 Apr 2019 at 01:39, Sven Meier  wrote:
> >
> > > Hi,
> > >
> > > I think we could improve nested Forms so that only  tags are
> > > turned into a , but anything else stays as it is.
> > >
> > > WDYT?
> > > Sven
> > >
> > > Am 23.04.19 um 10:01 schrieb nino martinez wael:
> > > > Hi
> > > >
> > > > When nesting forms, the form tag are changed to an div and it is hard
> > > coded:
> > > > org/apache/wicket/markup/html/form/Form.java:1597
> > > > ...
> > > >
> > > > tag.setName("div");
> > > >
> > > > ...
> > > >
> > > > If only I could change the tag to be tr, it would produce valid html.
> > Are
> > > > it deliberate to be hardcoded?
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>


-- 
WBR
Maxim aka solomax


Re: [8.3] Nested Forms within a table?

2019-04-23 Thread nino martinez wael
I agree with Maxim, but I do not know the side effects, im going to try
it.. As it is now (out of the box), we cannot have nested forms in tables
(for example on form per ) without breaking html.

-Nino

On Wed, Apr 24, 2019 at 3:24 AM Maxim Solodovnik 
wrote:

> I would say we can create overridable method so users can specify which tag
> to use
> it will help with ``
>
> On Wed, 24 Apr 2019 at 01:39, Sven Meier  wrote:
>
> > Hi,
> >
> > I think we could improve nested Forms so that only  tags are
> > turned into a , but anything else stays as it is.
> >
> > WDYT?
> > Sven
> >
> > Am 23.04.19 um 10:01 schrieb nino martinez wael:
> > > Hi
> > >
> > > When nesting forms, the form tag are changed to an div and it is hard
> > coded:
> > > org/apache/wicket/markup/html/form/Form.java:1597
> > > ...
> > >
> > > tag.setName("div");
> > >
> > > ...
> > >
> > > If only I could change the tag to be tr, it would produce valid html.
> Are
> > > it deliberate to be hardcoded?
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> --
> WBR
> Maxim aka solomax
>


-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: [8.3] Nested Forms within a table?

2019-04-23 Thread Maxim Solodovnik
I would say we can create overridable method so users can specify which tag
to use
it will help with ``

On Wed, 24 Apr 2019 at 01:39, Sven Meier  wrote:

> Hi,
>
> I think we could improve nested Forms so that only  tags are
> turned into a , but anything else stays as it is.
>
> WDYT?
> Sven
>
> Am 23.04.19 um 10:01 schrieb nino martinez wael:
> > Hi
> >
> > When nesting forms, the form tag are changed to an div and it is hard
> coded:
> > org/apache/wicket/markup/html/form/Form.java:1597
> > ...
> >
> > tag.setName("div");
> >
> > ...
> >
> > If only I could change the tag to be tr, it would produce valid html. Are
> > it deliberate to be hardcoded?
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-- 
WBR
Maxim aka solomax


Re: [8.3] Nested Forms within a table?

2019-04-23 Thread Sven Meier

Hi,

I think we could improve nested Forms so that only  tags are 
turned into a , but anything else stays as it is.


WDYT?
Sven

Am 23.04.19 um 10:01 schrieb nino martinez wael:

Hi

When nesting forms, the form tag are changed to an div and it is hard coded:
org/apache/wicket/markup/html/form/Form.java:1597
...

tag.setName("div");

...

If only I could change the tag to be tr, it would produce valid html. Are
it deliberate to be hardcoded?



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



[8.3] Nested Forms within a table?

2019-04-23 Thread nino martinez wael
Hi

When nesting forms, the form tag are changed to an div and it is hard coded:
org/apache/wicket/markup/html/form/Form.java:1597
...

tag.setName("div");

...

If only I could change the tag to be tr, it would produce valid html. Are
it deliberate to be hardcoded?

-- 
Best regards / Med venlig hilsen
Nino Martinez


Re: AW: Nested forms in WizardStep

2017-11-20 Thread Dirk Forchel
Thank you for your hints. I think I go for the last solution but I will have
a glance at the IFormVisitorParticipant though.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



AW: Nested forms in WizardStep

2017-11-20 Thread Patrick Davids
Hi Dirk,
on selecting your radio choice, do an ajax request and disable your inner Login 
Form depending on the chosen value.

In this case, it won't be part of the form submit, which is executed by the 
wizard next click.

This also should happen after your login is done by your ajax button.
After login succeeded, just disable the inner login form, and the user should 
be able to proceed.

Patrick


Health AG| Patrick Davids | Softwareentwickler
Tel. +49 40 524 709-258 | p.dav...@healthag.de
Fax +49 40 524 709-258 |  www.healthag.de


EOS Health IT-Concept GmbH | Lübeckertordamm 1–3 | 20099 Hamburg | GmbH mit 
Sitz in Hamburg
HRB 127591, Amtsgericht Hamburg | Ust-IdNr.: DE289113521 | Geschäftsführer: 
Jens Törper, Uwe Schäfer

Save a tree – think before you print.
-Ursprüngliche Nachricht-
Von: Dirk Forchel [mailto:dirk.forc...@exedio.com]
Gesendet: Donnerstag, 16. November 2017 18:19
An: users@wicket.apache.org
Betreff: Nested forms in WizardStep

Currently we use the Wizard/WizardStep classes from wicket-extensions to set 
required data for an object (in our case a checkout process with some user 
Information, e.g. addresses etc.).
The first step contains a Login form with two "required" input components for 
the credentials and a separate "Login" button and a Panel with two ratio 
buttons where the user must decide whether to go on without login
(anonymous) or to register a new user account.
Only the values for the ratio buttons should be triggered by this step with the 
"next" button.
The Login itself should be triggered with the additional "login" button which 
is not part of the ButtonBar.

As far as I know it's not good to have nested forms. We don't need to have 
forms inside our steps actually, since the Wizard itself has a form already.
I've noticed that if the user hits the "next" button, the form validation for 
the login form ist triggered as well, but it should not. The form processing 
for the login form should actually not part of step, but the "login container" 
must be part of the view.

What is the best solution to implement this scenario? I implemented the step 
without an additional form component and used an AjaxButton. In 
AjaxButton#onSubmit I implemented the authentication stuff.  But further on I 
got some problems with updating the current state and how to go on to the next 
step.
Also I've noticed, that pressing the "next" button would require some input for 
the credentials. So I'm a bit confused now.
I hope, I could express myself clearly.

Could someone give me some hint? Thank you very much.


--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Nested forms in WizardStep

2017-11-17 Thread Sven Meier

Hi,

I never had to build such a scenario, but IFormVisitorParticipant can 
help you?


Let your nested Form (or its parent) implement the interface and return 
false from #processChildren().


Have fun
Sven


Am 17.11.2017 um 09:18 schrieb Dirk Forchel:

No, I was not searching for a solution how to "disabling nested form
validation" as I was unsure whether it's a proper solution to use nested
forms in a WizardStep.
To get an impression how the checkout should look like have a look at
http://demo.designing-world.com/bigshop-aa/bigshop/checkout-1.html.
Exists a best practice solution how to deal with those scenarios? I'm just
curious.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

-
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: Nested forms in WizardStep

2017-11-17 Thread Dirk Forchel
No, I was not searching for a solution how to "disabling nested form
validation" as I was unsure whether it's a proper solution to use nested
forms in a WizardStep. 
To get an impression how the checkout should look like have a look at
http://demo.designing-world.com/bigshop-aa/bigshop/checkout-1.html. 
Exists a best practice solution how to deal with those scenarios? I'm just
curious.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Nested forms in WizardStep

2017-11-16 Thread Sven Meier
Have you tried 
https://stackoverflow.com/questions/26502864/disabling-nested-form-validation-in-wicket 
?


Have fun
sven


Am 16.11.2017 um 18:19 schrieb Dirk Forchel:

Currently we use the Wizard/WizardStep classes from wicket-extensions to set
required data for an object (in our case a checkout process with some user
Information, e.g. addresses etc.).
The first step contains a Login form with two "required" input components
for the credentials and a separate "Login" button and a Panel with two ratio
buttons where the user must decide whether to go on without login
(anonymous) or to register a new user account.
Only the values for the ratio buttons should be triggered by this step with
the "next" button.
The Login itself should be triggered with the additional "login" button
which is not part of the ButtonBar.

As far as I know it's not good to have nested forms. We don't need to have
forms inside our steps actually, since the Wizard itself has a form already.
I've noticed that if the user hits the "next" button, the form validation
for the login form ist triggered as well, but it should not. The form
processing for the login form should actually not part of step, but the
"login container" must be part of the view.

What is the best solution to implement this scenario? I implemented the step
without an additional form component and used an AjaxButton. In
AjaxButton#onSubmit I implemented the authentication stuff.  But further on
I got some problems with updating the current state and how to go on to the
next step.
Also I've noticed, that pressing the "next" button would require some input
for the credentials. So I'm a bit confused now.
I hope, I could express myself clearly.

Could someone give me some hint? Thank you very much.


--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

-
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



Nested forms in WizardStep

2017-11-16 Thread Dirk Forchel
Currently we use the Wizard/WizardStep classes from wicket-extensions to set
required data for an object (in our case a checkout process with some user
Information, e.g. addresses etc.).
The first step contains a Login form with two "required" input components
for the credentials and a separate "Login" button and a Panel with two ratio
buttons where the user must decide whether to go on without login
(anonymous) or to register a new user account. 
Only the values for the ratio buttons should be triggered by this step with
the "next" button.
The Login itself should be triggered with the additional "login" button
which is not part of the ButtonBar.

As far as I know it's not good to have nested forms. We don't need to have
forms inside our steps actually, since the Wizard itself has a form already.
I've noticed that if the user hits the "next" button, the form validation
for the login form ist triggered as well, but it should not. The form
processing for the login form should actually not part of step, but the
"login container" must be part of the view.

What is the best solution to implement this scenario? I implemented the step
without an additional form component and used an AjaxButton. In
AjaxButton#onSubmit I implemented the authentication stuff.  But further on
I got some problems with updating the current state and how to go on to the
next step.
Also I've noticed, that pressing the "next" button would require some input
for the credentials. So I'm a bit confused now.
I hope, I could express myself clearly.

Could someone give me some hint? Thank you very much.


--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



AW: AW: nested forms with modal window

2017-02-24 Thread Christoph.Manig
I close the window in the onSubmit method of the modal window form, you see 
this below. How can I notify the Button of the mother form that he can execute 
the other statements because the window is closed?

I don't want to update an component what should I put in the 
WindowClosedCallback?


Mit freundlichen Grüßen
Christoph Manig


-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net] 
Gesendet: Freitag, 24. Februar 2017 10:58
An: users@wicket.apache.org
Betreff: Re: AW: nested forms with modal window

Hi,

it's your code which closes the ModalWindow, you can notify other parts of your 
project that the window will be closed.

Or use a WindowClosedCallback.

Have fun
Sven


On 24.02.2017 10:00, christoph.ma...@t-systems.com wrote:
> Hello,
>
> what can I do to realize it that the loop will be executed after the modal 
> window was closed? I need the data which adds the modal window to the message 
> objects.
>
>
> Mit freundlichen Grüßen
> Christoph Manig
>
> -Ursprüngliche Nachricht-
> Von: Sven Meier [mailto:s...@meiers.net]
> Gesendet: Donnerstag, 23. Februar 2017 16:36
> An: users@wicket.apache.org
> Betreff: Re: nested forms with modal window
>
> Hi,
>
>> public void onSubmit(AjaxRequestTarget target, Form form) {
>>   remarkModalWindow.show(target);
>>   for(FaultModel fm : selectedModel.getObject()) {
>> System.out.println("ActionButton Remark: " + fm.getFaultRemark());
>>   }
>> }
>> the submit of my modal window will be executed ... after he runs through the 
>> selectedModel.
> Wicket's modal window isn't 'modal' in that it holds processing until it is 
> closed again.
> So of course your loop will execute immediately after telling the model 
> window to be shown - it will not be shown until the current thread has 
> finished request processing.
>
> Regards
> Sven
>
>
> On 23.02.2017 16:20, christoph.ma...@t-systems.com wrote:
>> Hello,
>>
>> I have a form which contains a modal window. The submit button of this form 
>> is an AjaxButton and should first open the modal window. This form contains 
>> a collection of message object which should be changed by the modal window.
>>
>> The modal window also contains a form and a AjaxButton to submit the form. 
>> Here the user can write something into a textfield and submit this form of 
>> the modal window. So the message objects will be changed by the users input 
>> and then the modal window will be closed by modalWindow.close(target).
>>
>> This is the submit of the mother form:
>> @Override
>> public void onSubmit(AjaxRequestTarget target, Form form) {
>>   remarkModalWindow.show(target);
>>   for(FaultModel fm : selectedModel.getObject()) {
>>   System.out.println("ActionButton Remark: " + 
>> fm.getFaultRemark());
>>   }
>> }
>>
>> The selected model is a collection of messages which should be changed by 
>> the modal window. Therefore I will show the submit of the form of the modal 
>> window:
>> @Override
>> protected void onSubmit(AjaxRequestTarget target, Form form) {
>>   RemarkForm remarkForm = (RemarkForm)form;
>>   for(FaultModel faultModel : 
>> remarkForm.getSelectedModel().getObject()) {
>>   System.out.println("Sets the old remark " + 
>> faultModel.getFaultRemark() + " to " + 
>> remarkForm.getModelObject().getFaultRemark());
>>   
>> faultModel.setFaultRemark(remarkForm.getModelObject().getFaultRemark());
>>   }
>>   remarkForm.getRemarkModalWindow().close(target);
>> }
>>
>> The change of the remark is successful and the window will be closed fine. 
>> But on my console I see the output:
>>
>> ActionButton Remark: null
>> Sets the old remark null to testen
>>
>> So it says the submit of my modal window will be executed to late. It will 
>> be triggered after he runs through the selectedModel. But first I want to 
>> change the selectedModel by the modal window and close it and then I want to 
>> write the output in the mother submit to the console. Why did he trigger the 
>> next steps after calling modalWindow.show? I thought the inner form have to 
>> be submitted before the next steps of the mother submit will be called.
>>
>> What can I do here?
>>
>>
>> Mit freundlichen Grüßen
>> Christoph Manig
>>
>>
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For add

Re: AW: nested forms with modal window

2017-02-24 Thread Sven Meier

Hi,

it's your code which closes the ModalWindow, you can notify other parts 
of your project that the window will be closed.


Or use a WindowClosedCallback.

Have fun
Sven


On 24.02.2017 10:00, christoph.ma...@t-systems.com wrote:

Hello,

what can I do to realize it that the loop will be executed after the modal 
window was closed? I need the data which adds the modal window to the message 
objects.


Mit freundlichen Grüßen
Christoph Manig

-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net]
Gesendet: Donnerstag, 23. Februar 2017 16:36
An: users@wicket.apache.org
Betreff: Re: nested forms with modal window

Hi,


public void onSubmit(AjaxRequestTarget target, Form form) {
  remarkModalWindow.show(target);
  for(FaultModel fm : selectedModel.getObject()) {
System.out.println("ActionButton Remark: " + fm.getFaultRemark());
  }
}
the submit of my modal window will be executed ... after he runs through the 
selectedModel.

Wicket's modal window isn't 'modal' in that it holds processing until it is 
closed again.
So of course your loop will execute immediately after telling the model window 
to be shown - it will not be shown until the current thread has finished 
request processing.

Regards
Sven


On 23.02.2017 16:20, christoph.ma...@t-systems.com wrote:

Hello,

I have a form which contains a modal window. The submit button of this form is 
an AjaxButton and should first open the modal window. This form contains a 
collection of message object which should be changed by the modal window.

The modal window also contains a form and a AjaxButton to submit the form. Here 
the user can write something into a textfield and submit this form of the modal 
window. So the message objects will be changed by the users input and then the 
modal window will be closed by modalWindow.close(target).

This is the submit of the mother form:
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
  remarkModalWindow.show(target);
  for(FaultModel fm : selectedModel.getObject()) {
  System.out.println("ActionButton Remark: " + 
fm.getFaultRemark());
  }
}

The selected model is a collection of messages which should be changed by the 
modal window. Therefore I will show the submit of the form of the modal window:
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
  RemarkForm remarkForm = (RemarkForm)form;
  for(FaultModel faultModel : 
remarkForm.getSelectedModel().getObject()) {
  System.out.println("Sets the old remark " + faultModel.getFaultRemark() 
+ " to " + remarkForm.getModelObject().getFaultRemark());
  
faultModel.setFaultRemark(remarkForm.getModelObject().getFaultRemark());
  }
  remarkForm.getRemarkModalWindow().close(target);
}

The change of the remark is successful and the window will be closed fine. But 
on my console I see the output:

ActionButton Remark: null
Sets the old remark null to testen

So it says the submit of my modal window will be executed to late. It will be 
triggered after he runs through the selectedModel. But first I want to change 
the selectedModel by the modal window and close it and then I want to write the 
output in the mother submit to the console. Why did he trigger the next steps 
after calling modalWindow.show? I thought the inner form have to be submitted 
before the next steps of the mother submit will be called.

What can I do here?


Mit freundlichen Grüßen
Christoph Manig






-
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



AW: nested forms with modal window

2017-02-24 Thread Christoph.Manig
Hello,

what can I do to realize it that the loop will be executed after the modal 
window was closed? I need the data which adds the modal window to the message 
objects.


Mit freundlichen Grüßen
Christoph Manig

-Ursprüngliche Nachricht-
Von: Sven Meier [mailto:s...@meiers.net] 
Gesendet: Donnerstag, 23. Februar 2017 16:36
An: users@wicket.apache.org
Betreff: Re: nested forms with modal window

Hi,

>public void onSubmit(AjaxRequestTarget target, Form form) {
>  remarkModalWindow.show(target);
>  for(FaultModel fm : selectedModel.getObject()) {
>System.out.println("ActionButton Remark: " + fm.getFaultRemark());
>  }
>}
> the submit of my modal window will be executed ... after he runs through the 
> selectedModel.

Wicket's modal window isn't 'modal' in that it holds processing until it is 
closed again.
So of course your loop will execute immediately after telling the model window 
to be shown - it will not be shown until the current thread has finished 
request processing.

Regards
Sven


On 23.02.2017 16:20, christoph.ma...@t-systems.com wrote:
> Hello,
>
> I have a form which contains a modal window. The submit button of this form 
> is an AjaxButton and should first open the modal window. This form contains a 
> collection of message object which should be changed by the modal window.
>
> The modal window also contains a form and a AjaxButton to submit the form. 
> Here the user can write something into a textfield and submit this form of 
> the modal window. So the message objects will be changed by the users input 
> and then the modal window will be closed by modalWindow.close(target).
>
> This is the submit of the mother form:
> @Override
> public void onSubmit(AjaxRequestTarget target, Form form) {
>  remarkModalWindow.show(target);
>  for(FaultModel fm : selectedModel.getObject()) {
>  System.out.println("ActionButton Remark: " + 
> fm.getFaultRemark());
>  }
> }
>
> The selected model is a collection of messages which should be changed by the 
> modal window. Therefore I will show the submit of the form of the modal 
> window:
> @Override
> protected void onSubmit(AjaxRequestTarget target, Form form) {
>  RemarkForm remarkForm = (RemarkForm)form;
>  for(FaultModel faultModel : 
> remarkForm.getSelectedModel().getObject()) {
>  System.out.println("Sets the old remark " + 
> faultModel.getFaultRemark() + " to " + 
> remarkForm.getModelObject().getFaultRemark());
>  
> faultModel.setFaultRemark(remarkForm.getModelObject().getFaultRemark());
>  }
>  remarkForm.getRemarkModalWindow().close(target);
> }
>
> The change of the remark is successful and the window will be closed fine. 
> But on my console I see the output:
>
> ActionButton Remark: null
> Sets the old remark null to testen
>
> So it says the submit of my modal window will be executed to late. It will be 
> triggered after he runs through the selectedModel. But first I want to change 
> the selectedModel by the modal window and close it and then I want to write 
> the output in the mother submit to the console. Why did he trigger the next 
> steps after calling modalWindow.show? I thought the inner form have to be 
> submitted before the next steps of the mother submit will be called.
>
> What can I do here?
>
>
> Mit freundlichen Grüßen
> Christoph Manig
>
>
>
>


-
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: nested forms with modal window

2017-02-23 Thread Sven Meier

Hi,


public void onSubmit(AjaxRequestTarget target, Form form) {
 remarkModalWindow.show(target);
 for(FaultModel fm : selectedModel.getObject()) {
   System.out.println("ActionButton Remark: " + fm.getFaultRemark());
 }
}
the submit of my modal window will be executed ... after he runs through the 
selectedModel.


Wicket's modal window isn't 'modal' in that it holds processing until it is 
closed again.
So of course your loop will execute immediately after telling the model window 
to be shown - it will not be shown until the current thread has finished 
request processing.

Regards
Sven


On 23.02.2017 16:20, christoph.ma...@t-systems.com wrote:

Hello,

I have a form which contains a modal window. The submit button of this form is 
an AjaxButton and should first open the modal window. This form contains a 
collection of message object which should be changed by the modal window.

The modal window also contains a form and a AjaxButton to submit the form. Here 
the user can write something into a textfield and submit this form of the modal 
window. So the message objects will be changed by the users input and then the 
modal window will be closed by modalWindow.close(target).

This is the submit of the mother form:
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
 remarkModalWindow.show(target);
 for(FaultModel fm : selectedModel.getObject()) {
 System.out.println("ActionButton Remark: " + 
fm.getFaultRemark());
 }
}

The selected model is a collection of messages which should be changed by the 
modal window. Therefore I will show the submit of the form of the modal window:
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
 RemarkForm remarkForm = (RemarkForm)form;
 for(FaultModel faultModel : remarkForm.getSelectedModel().getObject()) 
{
 System.out.println("Sets the old remark " + faultModel.getFaultRemark() 
+ " to " + remarkForm.getModelObject().getFaultRemark());
 
faultModel.setFaultRemark(remarkForm.getModelObject().getFaultRemark());
 }
 remarkForm.getRemarkModalWindow().close(target);
}

The change of the remark is successful and the window will be closed fine. But 
on my console I see the output:

ActionButton Remark: null
Sets the old remark null to testen

So it says the submit of my modal window will be executed to late. It will be 
triggered after he runs through the selectedModel. But first I want to change 
the selectedModel by the modal window and close it and then I want to write the 
output in the mother submit to the console. Why did he trigger the next steps 
after calling modalWindow.show? I thought the inner form have to be submitted 
before the next steps of the mother submit will be called.

What can I do here?


Mit freundlichen Grüßen
Christoph Manig







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



nested forms with modal window

2017-02-23 Thread Christoph.Manig
Hello,

I have a form which contains a modal window. The submit button of this form is 
an AjaxButton and should first open the modal window. This form contains a 
collection of message object which should be changed by the modal window.

The modal window also contains a form and a AjaxButton to submit the form. Here 
the user can write something into a textfield and submit this form of the modal 
window. So the message objects will be changed by the users input and then the 
modal window will be closed by modalWindow.close(target).

This is the submit of the mother form:
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
remarkModalWindow.show(target);
for(FaultModel fm : selectedModel.getObject()) {
System.out.println("ActionButton Remark: " + 
fm.getFaultRemark());
}
}

The selected model is a collection of messages which should be changed by the 
modal window. Therefore I will show the submit of the form of the modal window:
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
RemarkForm remarkForm = (RemarkForm)form;
for(FaultModel faultModel : remarkForm.getSelectedModel().getObject()) {
System.out.println("Sets the old remark " + 
faultModel.getFaultRemark() + " to " + 
remarkForm.getModelObject().getFaultRemark());

faultModel.setFaultRemark(remarkForm.getModelObject().getFaultRemark());
}
remarkForm.getRemarkModalWindow().close(target);
}

The change of the remark is successful and the window will be closed fine. But 
on my console I see the output:

ActionButton Remark: null
Sets the old remark null to testen

So it says the submit of my modal window will be executed to late. It will be 
triggered after he runs through the selectedModel. But first I want to change 
the selectedModel by the modal window and close it and then I want to write the 
output in the mother submit to the console. Why did he trigger the next steps 
after calling modalWindow.show? I thought the inner form have to be submitted 
before the next steps of the mother submit will be called.

What can I do here?


Mit freundlichen Grüßen
Christoph Manig





Re: AjaxFormSubmitBehavior, FileUploadField and nested forms.

2016-06-17 Thread Fabio Fioretti
; > >> > form1, Wicket looks up for "form1.uploadTooLarge" instead.
> > >> >
> > >> > I also noticed that there is a new fileMaxSize property in Form that
> > >> wasn't
> > >> > there in 6.17.0. Should I use that one instead of maxSize? It has no
> > >> setter
> > >> > though...
> > >> >
> > >>
> > >> This is related to https://issues.apache.org/jira/browse/WICKET-5735
> > >>
> > >>
> > >> >
> > >> > Any clarification would be much appreciated.
> > >> >
> > >> > Many thanks,
> > >> > Fabio
> > >> >
> > >> > On Thu, May 26, 2016 at 7:18 PM, Martin Grigorov <
> > mgrigo...@apache.org>
> > >> > wrote:
> > >> >
> > >> > > Hi,
> > >> > >
> > >> > > I believe there is/was another ticket describing exactly your
> > problem
> > >> > but I
> > >> > > cannot find it now.
> > >> > >
> > >> > > The form id in the property key is not really needed.
> > >> > > You could use it to give Wicket a more specific message for
> > particular
> > >> > > component.
> > >> > > You can remove it if this message should/could be used for any
> other
> > >> Form
> > >> > > in you application/package/page/panel (depending in which
> > .properties
> > >> > file
> > >> > > you have it).
> > >> > >
> > >> > > Martin Grigorov
> > >> > > Wicket Training and Consulting
> > >> > > https://twitter.com/mtgrigorov
> > >> > >
> > >> > > On Thu, May 26, 2016 at 6:46 PM, Fabio Fioretti <
> > >> > > windom.macroso...@gmail.com
> > >> > > > wrote:
> > >> > >
> > >> > > > Hello everybody,
> > >> > > >
> > >> > > > I recently migrated an application from Wicket 6.17.0 to 6.23.0
> > and
> > >> I'm
> > >> > > > experiencing the following problem.
> > >> > > >
> > >> > > > I have 2 nested forms. The inner one, form0, contains a
> > >> FileUploadField
> > >> > > > with an AjaxFormSubmitBehavior(form0, "change") attached to it,
> > >> while
> > >> > the
> > >> > > > external one, form1, wraps form0.
> > >> > > >
> > >> > > > form1
> > >> > > > |__
> > >> > > >  form0
> > >> > > >   |__
> > >> > > >FileUploadField
> > >> > > >
> > >> > > > When the user selects a file and a file upload exception is
> thrown
> > >> > (e.g.
> > >> > > > FileSizeLimitExceededException), I would expect form0's
> > >> > > > onFileUploadException() method to be invoked. However, the one
> of
> > >> form1
> > >> > > is
> > >> > > > invoked instead...
> > >> > > >
> > >> > > > As a result, Wicket starts looking for a property named
> > >> > > > "form1.uploadTooLarge" instead of "form0.uploadTooLarge", thus
> > >> breaking
> > >> > > my
> > >> > > > app, which only defines the latter.
> > >> > > >
> > >> > > > Is this an intended behavior?
> > >> > > >
> > >> > > > Was it introduced by
> > >> https://issues.apache.org/jira/browse/WICKET-5753
> > >> > ?
> > >> > > >
> > >> > > > And, by the way, what is the rationale of having the form id in
> > the
> > >> > > > property key?
> > >> > > >
> > >> > > > Many thanks in advance,
> > >> > > > Fabio
> > >> > > >
> > >> > >
> > >> >
> > >>
> > >
> > >
> >
>


Re: AjaxFormSubmitBehavior, FileUploadField and nested forms.

2016-06-17 Thread Martin Grigorov
Hi Fabio,

I agree that the removal of the default message is not really needed.
It has been done with https://issues.apache.org/jira/browse/WICKET-5735.

I've reverted this with https://issues.apache.org/jira/browse/WICKET-6181


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Jun 13, 2016 at 1:43 PM, Fabio Fioretti <windom.macroso...@gmail.com
> wrote:

> Hi all,
> Does anybody have any feedback on this?
>
> Many thanks,
> Fabio
>
> On Tue, May 31, 2016 at 12:46 PM, Fabio Fioretti <
> windom.macroso...@gmail.com> wrote:
>
> > Hi Martin,
> >
> > You are right, the form id was already there in 6.17.0, but the default
> > message was removed! That is what is breaking my app - I did not realize
> it
> > because my custom message was the same as the default.
> >
> > Why was it removed?
> >
> > In 6.17.0:
> > final String defaultValue = "Upload must be less than " + getMaxSize();
> > String msg = getString(getId() + '.' + UPLOAD_TOO_LARGE_RESOURCE_KEY,
> > Model.ofMap(model), defaultValue)
> >
> > While in 6.23.0:
> > String msg = getString(getId() + '.' + UPLOAD_TOO_LARGE_RESOURCE_KEY,
> > Model.ofMap(model));
> >
> > Interestingly, the comment still says "Resource key should be
> > .uploadTooLarge to override default message".
> >
> > IMHO, forcing to have the root (!) form id in the property key makes it
> > impossible to create a reusable component for managing uploads, like an
> > UploadPanel with its own form and FileUploadField . In fact, as soon as
> you
> > place it in a hierarchy that includes an outer form, it will break your
> > app. The default value at least provided a safe fallback.
> >
> > What do you think?
> >
> > Many thanks,
> > Fabio
> >
> >
> > On Mon, May 30, 2016 at 4:31 PM, Martin Grigorov <mgrigo...@apache.org>
> > wrote:
> >
> >> Hi,
> >>
> >> On Fri, May 27, 2016 at 12:42 PM, Fabio Fioretti <
> >> windom.macroso...@gmail.com> wrote:
> >>
> >> > Hi Martin,
> >> >
> >> > Is this the ticket you refer to?
> >> > https://issues.apache.org/jira/browse/WICKET-5190
> >>
> >>
> >> Yes, this is the one!
> >>
> >>
> >> >
> >> >
> >> > It has an explanation on why onFileUploadException() is called on the
> >> root
> >> > form that seems reasonable.
> >> >
> >> > In any case, if I don't specify the form id in the property key
> (leaving
> >> > just "uploadTooLarge") I get the following MissingResourceException
> when
> >> > FileUploadBase.SizeLimitExceededException is thrown:
> >> >
> >>
> >> According to Git history the id was there even in 6.17:
> >>
> >>
> https://github.com/apache/wicket/blob/wicket-6.17.0/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java#L1423
> >>
> >> The id is not in Wicket 7.x though!
> >> It has been removed with
> >> https://issues.apache.org/jira/browse/WICKET-5206
> >> 3 years ago
> >>
> >>
> >> >
> >> > *java.util.MissingResourceException*: Unable to find property:
> >> > 'form1.uploadTooLarge' for component: border:border_body:form1
> >> > [class=org.apache.wicket.markup.html.form.Form].
> >> > Locale: null, style: null
> >> >
> >> > As you can see, I do have a border complicating things (not sure if it
> >> > might play a role here) but it worked just fine in Wicket 6.17.0. In
> >> fact I
> >> > had to add the form id ("form0.uploadTooLarge") to make it work in
> >> 6.23.0,
> >> > but then I ran into this other issue that, when form0 is nested in
> >> > form1, Wicket looks up for "form1.uploadTooLarge" instead.
> >> >
> >> > I also noticed that there is a new fileMaxSize property in Form that
> >> wasn't
> >> > there in 6.17.0. Should I use that one instead of maxSize? It has no
> >> setter
> >> > though...
> >> >
> >>
> >> This is related to https://issues.apache.org/jira/browse/WICKET-5735
> >>
> >>
> >> >
> >> > Any clarification would be much appreciated.
> >> >
> >> > Many thanks,
> >> > Fabio
> >> >
> >> > On Thu, May 26, 2016 at 7:18 PM, Martin Grigorov <
> mgrigo...@apache.or

Re: AjaxFormSubmitBehavior, FileUploadField and nested forms.

2016-06-13 Thread Fabio Fioretti
Hi all,
Does anybody have any feedback on this?

Many thanks,
Fabio

On Tue, May 31, 2016 at 12:46 PM, Fabio Fioretti <
windom.macroso...@gmail.com> wrote:

> Hi Martin,
>
> You are right, the form id was already there in 6.17.0, but the default
> message was removed! That is what is breaking my app - I did not realize it
> because my custom message was the same as the default.
>
> Why was it removed?
>
> In 6.17.0:
> final String defaultValue = "Upload must be less than " + getMaxSize();
> String msg = getString(getId() + '.' + UPLOAD_TOO_LARGE_RESOURCE_KEY,
> Model.ofMap(model), defaultValue)
>
> While in 6.23.0:
> String msg = getString(getId() + '.' + UPLOAD_TOO_LARGE_RESOURCE_KEY,
> Model.ofMap(model));
>
> Interestingly, the comment still says "Resource key should be
> .uploadTooLarge to override default message".
>
> IMHO, forcing to have the root (!) form id in the property key makes it
> impossible to create a reusable component for managing uploads, like an
> UploadPanel with its own form and FileUploadField . In fact, as soon as you
> place it in a hierarchy that includes an outer form, it will break your
> app. The default value at least provided a safe fallback.
>
> What do you think?
>
> Many thanks,
> Fabio
>
>
> On Mon, May 30, 2016 at 4:31 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
>> Hi,
>>
>> On Fri, May 27, 2016 at 12:42 PM, Fabio Fioretti <
>> windom.macroso...@gmail.com> wrote:
>>
>> > Hi Martin,
>> >
>> > Is this the ticket you refer to?
>> > https://issues.apache.org/jira/browse/WICKET-5190
>>
>>
>> Yes, this is the one!
>>
>>
>> >
>> >
>> > It has an explanation on why onFileUploadException() is called on the
>> root
>> > form that seems reasonable.
>> >
>> > In any case, if I don't specify the form id in the property key (leaving
>> > just "uploadTooLarge") I get the following MissingResourceException when
>> > FileUploadBase.SizeLimitExceededException is thrown:
>> >
>>
>> According to Git history the id was there even in 6.17:
>>
>> https://github.com/apache/wicket/blob/wicket-6.17.0/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java#L1423
>>
>> The id is not in Wicket 7.x though!
>> It has been removed with
>> https://issues.apache.org/jira/browse/WICKET-5206
>> 3 years ago
>>
>>
>> >
>> > *java.util.MissingResourceException*: Unable to find property:
>> > 'form1.uploadTooLarge' for component: border:border_body:form1
>> > [class=org.apache.wicket.markup.html.form.Form].
>> > Locale: null, style: null
>> >
>> > As you can see, I do have a border complicating things (not sure if it
>> > might play a role here) but it worked just fine in Wicket 6.17.0. In
>> fact I
>> > had to add the form id ("form0.uploadTooLarge") to make it work in
>> 6.23.0,
>> > but then I ran into this other issue that, when form0 is nested in
>> > form1, Wicket looks up for "form1.uploadTooLarge" instead.
>> >
>> > I also noticed that there is a new fileMaxSize property in Form that
>> wasn't
>> > there in 6.17.0. Should I use that one instead of maxSize? It has no
>> setter
>> > though...
>> >
>>
>> This is related to https://issues.apache.org/jira/browse/WICKET-5735
>>
>>
>> >
>> > Any clarification would be much appreciated.
>> >
>> > Many thanks,
>> > Fabio
>> >
>> > On Thu, May 26, 2016 at 7:18 PM, Martin Grigorov <mgrigo...@apache.org>
>> > wrote:
>> >
>> > > Hi,
>> > >
>> > > I believe there is/was another ticket describing exactly your problem
>> > but I
>> > > cannot find it now.
>> > >
>> > > The form id in the property key is not really needed.
>> > > You could use it to give Wicket a more specific message for particular
>> > > component.
>> > > You can remove it if this message should/could be used for any other
>> Form
>> > > in you application/package/page/panel (depending in which .properties
>> > file
>> > > you have it).
>> > >
>> > > Martin Grigorov
>> > > Wicket Training and Consulting
>> > > https://twitter.com/mtgrigorov
>> > >
>> > > On Thu, May 26, 2016 at 6:46 PM, Fabio Fioretti <
>> > > windom.macroso...@gmail.com
&

Re: AjaxFormSubmitBehavior, FileUploadField and nested forms.

2016-05-31 Thread Fabio Fioretti
Hi Martin,

You are right, the form id was already there in 6.17.0, but the default
message was removed! That is what is breaking my app - I did not realize it
because my custom message was the same as the default.

Why was it removed?

In 6.17.0:
final String defaultValue = "Upload must be less than " + getMaxSize();
String msg = getString(getId() + '.' + UPLOAD_TOO_LARGE_RESOURCE_KEY,
Model.ofMap(model), defaultValue)

While in 6.23.0:
String msg = getString(getId() + '.' + UPLOAD_TOO_LARGE_RESOURCE_KEY,
Model.ofMap(model));

Interestingly, the comment still says "Resource key should be
.uploadTooLarge to override default message".

IMHO, forcing to have the root (!) form id in the property key makes it
impossible to create a reusable component for managing uploads, like an
UploadPanel with its own form and FileUploadField . In fact, as soon as you
place it in a hierarchy that includes an outer form, it will break your
app. The default value at least provided a safe fallback.

What do you think?

Many thanks,
Fabio


On Mon, May 30, 2016 at 4:31 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> On Fri, May 27, 2016 at 12:42 PM, Fabio Fioretti <
> windom.macroso...@gmail.com> wrote:
>
> > Hi Martin,
> >
> > Is this the ticket you refer to?
> > https://issues.apache.org/jira/browse/WICKET-5190
>
>
> Yes, this is the one!
>
>
> >
> >
> > It has an explanation on why onFileUploadException() is called on the
> root
> > form that seems reasonable.
> >
> > In any case, if I don't specify the form id in the property key (leaving
> > just "uploadTooLarge") I get the following MissingResourceException when
> > FileUploadBase.SizeLimitExceededException is thrown:
> >
>
> According to Git history the id was there even in 6.17:
>
> https://github.com/apache/wicket/blob/wicket-6.17.0/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java#L1423
>
> The id is not in Wicket 7.x though!
> It has been removed with https://issues.apache.org/jira/browse/WICKET-5206
> 3 years ago
>
>
> >
> > *java.util.MissingResourceException*: Unable to find property:
> > 'form1.uploadTooLarge' for component: border:border_body:form1
> > [class=org.apache.wicket.markup.html.form.Form].
> > Locale: null, style: null
> >
> > As you can see, I do have a border complicating things (not sure if it
> > might play a role here) but it worked just fine in Wicket 6.17.0. In
> fact I
> > had to add the form id ("form0.uploadTooLarge") to make it work in
> 6.23.0,
> > but then I ran into this other issue that, when form0 is nested in
> > form1, Wicket looks up for "form1.uploadTooLarge" instead.
> >
> > I also noticed that there is a new fileMaxSize property in Form that
> wasn't
> > there in 6.17.0. Should I use that one instead of maxSize? It has no
> setter
> > though...
> >
>
> This is related to https://issues.apache.org/jira/browse/WICKET-5735
>
>
> >
> > Any clarification would be much appreciated.
> >
> > Many thanks,
> > Fabio
> >
> > On Thu, May 26, 2016 at 7:18 PM, Martin Grigorov <mgrigo...@apache.org>
> > wrote:
> >
> > > Hi,
> > >
> > > I believe there is/was another ticket describing exactly your problem
> > but I
> > > cannot find it now.
> > >
> > > The form id in the property key is not really needed.
> > > You could use it to give Wicket a more specific message for particular
> > > component.
> > > You can remove it if this message should/could be used for any other
> Form
> > > in you application/package/page/panel (depending in which .properties
> > file
> > > you have it).
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Thu, May 26, 2016 at 6:46 PM, Fabio Fioretti <
> > > windom.macroso...@gmail.com
> > > > wrote:
> > >
> > > > Hello everybody,
> > > >
> > > > I recently migrated an application from Wicket 6.17.0 to 6.23.0 and
> I'm
> > > > experiencing the following problem.
> > > >
> > > > I have 2 nested forms. The inner one, form0, contains a
> FileUploadField
> > > > with an AjaxFormSubmitBehavior(form0, "change") attached to it, while
> > the
> > > > external one, form1, wraps form0.
> > > >
> > > > form1
> > > > |__
> > > >  form0
> > > >   |__
> >

Re: AjaxFormSubmitBehavior, FileUploadField and nested forms.

2016-05-30 Thread Martin Grigorov
Hi,

On Fri, May 27, 2016 at 12:42 PM, Fabio Fioretti <
windom.macroso...@gmail.com> wrote:

> Hi Martin,
>
> Is this the ticket you refer to?
> https://issues.apache.org/jira/browse/WICKET-5190


Yes, this is the one!


>
>
> It has an explanation on why onFileUploadException() is called on the root
> form that seems reasonable.
>
> In any case, if I don't specify the form id in the property key (leaving
> just "uploadTooLarge") I get the following MissingResourceException when
> FileUploadBase.SizeLimitExceededException is thrown:
>

According to Git history the id was there even in 6.17:
https://github.com/apache/wicket/blob/wicket-6.17.0/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java#L1423

The id is not in Wicket 7.x though!
It has been removed with https://issues.apache.org/jira/browse/WICKET-5206
3 years ago


>
> *java.util.MissingResourceException*: Unable to find property:
> 'form1.uploadTooLarge' for component: border:border_body:form1
> [class=org.apache.wicket.markup.html.form.Form].
> Locale: null, style: null
>
> As you can see, I do have a border complicating things (not sure if it
> might play a role here) but it worked just fine in Wicket 6.17.0. In fact I
> had to add the form id ("form0.uploadTooLarge") to make it work in 6.23.0,
> but then I ran into this other issue that, when form0 is nested in
> form1, Wicket looks up for "form1.uploadTooLarge" instead.
>
> I also noticed that there is a new fileMaxSize property in Form that wasn't
> there in 6.17.0. Should I use that one instead of maxSize? It has no setter
> though...
>

This is related to https://issues.apache.org/jira/browse/WICKET-5735


>
> Any clarification would be much appreciated.
>
> Many thanks,
> Fabio
>
> On Thu, May 26, 2016 at 7:18 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
> > Hi,
> >
> > I believe there is/was another ticket describing exactly your problem
> but I
> > cannot find it now.
> >
> > The form id in the property key is not really needed.
> > You could use it to give Wicket a more specific message for particular
> > component.
> > You can remove it if this message should/could be used for any other Form
> > in you application/package/page/panel (depending in which .properties
> file
> > you have it).
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Thu, May 26, 2016 at 6:46 PM, Fabio Fioretti <
> > windom.macroso...@gmail.com
> > > wrote:
> >
> > > Hello everybody,
> > >
> > > I recently migrated an application from Wicket 6.17.0 to 6.23.0 and I'm
> > > experiencing the following problem.
> > >
> > > I have 2 nested forms. The inner one, form0, contains a FileUploadField
> > > with an AjaxFormSubmitBehavior(form0, "change") attached to it, while
> the
> > > external one, form1, wraps form0.
> > >
> > > form1
> > > |__
> > >  form0
> > >   |__
> > >FileUploadField
> > >
> > > When the user selects a file and a file upload exception is thrown
> (e.g.
> > > FileSizeLimitExceededException), I would expect form0's
> > > onFileUploadException() method to be invoked. However, the one of form1
> > is
> > > invoked instead...
> > >
> > > As a result, Wicket starts looking for a property named
> > > "form1.uploadTooLarge" instead of "form0.uploadTooLarge", thus breaking
> > my
> > > app, which only defines the latter.
> > >
> > > Is this an intended behavior?
> > >
> > > Was it introduced by https://issues.apache.org/jira/browse/WICKET-5753
> ?
> > >
> > > And, by the way, what is the rationale of having the form id in the
> > > property key?
> > >
> > > Many thanks in advance,
> > > Fabio
> > >
> >
>


Re: AjaxFormSubmitBehavior, FileUploadField and nested forms.

2016-05-27 Thread Fabio Fioretti
As a side note: finalMaxSize does have a setter in Form, sorry for the
oversight. However, setting finalMaxSize on form0 has no effect... Only the
one on form1 (the outer form) is actually enforced, but then again,
properties must be defined at that level.

Thanks,
Fabio

On Fri, May 27, 2016 at 12:42 PM, Fabio Fioretti <
windom.macroso...@gmail.com> wrote:

> Hi Martin,
>
> Is this the ticket you refer to?
> https://issues.apache.org/jira/browse/WICKET-5190
>
> It has an explanation on why onFileUploadException() is called on the root
> form that seems reasonable.
>
> In any case, if I don't specify the form id in the property key (leaving
> just "uploadTooLarge") I get the following MissingResourceException when
> FileUploadBase.SizeLimitExceededException is thrown:
>
> *java.util.MissingResourceException*: Unable to find property:
> 'form1.uploadTooLarge' for component: border:border_body:form1 
> [class=org.apache.wicket.markup.html.form.Form].
> Locale: null, style: null
>
> As you can see, I do have a border complicating things (not sure if it
> might play a role here) but it worked just fine in Wicket 6.17.0. In fact I
> had to add the form id ("form0.uploadTooLarge") to make it work in 6.23.0,
> but then I ran into this other issue that, when form0 is nested in
> form1, Wicket looks up for "form1.uploadTooLarge" instead.
>
> I also noticed that there is a new fileMaxSize property in Form that
> wasn't there in 6.17.0. Should I use that one instead of maxSize? It has no
> setter though...
>
> Any clarification would be much appreciated.
>
> Many thanks,
> Fabio
>
> On Thu, May 26, 2016 at 7:18 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
>> Hi,
>>
>> I believe there is/was another ticket describing exactly your problem but
>> I
>> cannot find it now.
>>
>> The form id in the property key is not really needed.
>> You could use it to give Wicket a more specific message for particular
>> component.
>> You can remove it if this message should/could be used for any other Form
>> in you application/package/page/panel (depending in which .properties file
>> you have it).
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Thu, May 26, 2016 at 6:46 PM, Fabio Fioretti <
>> windom.macroso...@gmail.com
>> > wrote:
>>
>> > Hello everybody,
>> >
>> > I recently migrated an application from Wicket 6.17.0 to 6.23.0 and I'm
>> > experiencing the following problem.
>> >
>> > I have 2 nested forms. The inner one, form0, contains a FileUploadField
>> > with an AjaxFormSubmitBehavior(form0, "change") attached to it, while
>> the
>> > external one, form1, wraps form0.
>> >
>> > form1
>> > |__
>> >  form0
>> >   |__
>> >FileUploadField
>> >
>> > When the user selects a file and a file upload exception is thrown (e.g.
>> > FileSizeLimitExceededException), I would expect form0's
>> > onFileUploadException() method to be invoked. However, the one of form1
>> is
>> > invoked instead...
>> >
>> > As a result, Wicket starts looking for a property named
>> > "form1.uploadTooLarge" instead of "form0.uploadTooLarge", thus breaking
>> my
>> > app, which only defines the latter.
>> >
>> > Is this an intended behavior?
>> >
>> > Was it introduced by https://issues.apache.org/jira/browse/WICKET-5753?
>> >
>> > And, by the way, what is the rationale of having the form id in the
>> > property key?
>> >
>> > Many thanks in advance,
>> > Fabio
>> >
>>
>
>


Re: AjaxFormSubmitBehavior, FileUploadField and nested forms.

2016-05-27 Thread Fabio Fioretti
Hi Martin,

Is this the ticket you refer to?
https://issues.apache.org/jira/browse/WICKET-5190

It has an explanation on why onFileUploadException() is called on the root
form that seems reasonable.

In any case, if I don't specify the form id in the property key (leaving
just "uploadTooLarge") I get the following MissingResourceException when
FileUploadBase.SizeLimitExceededException is thrown:

*java.util.MissingResourceException*: Unable to find property:
'form1.uploadTooLarge' for component: border:border_body:form1
[class=org.apache.wicket.markup.html.form.Form].
Locale: null, style: null

As you can see, I do have a border complicating things (not sure if it
might play a role here) but it worked just fine in Wicket 6.17.0. In fact I
had to add the form id ("form0.uploadTooLarge") to make it work in 6.23.0,
but then I ran into this other issue that, when form0 is nested in
form1, Wicket looks up for "form1.uploadTooLarge" instead.

I also noticed that there is a new fileMaxSize property in Form that wasn't
there in 6.17.0. Should I use that one instead of maxSize? It has no setter
though...

Any clarification would be much appreciated.

Many thanks,
Fabio

On Thu, May 26, 2016 at 7:18 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> I believe there is/was another ticket describing exactly your problem but I
> cannot find it now.
>
> The form id in the property key is not really needed.
> You could use it to give Wicket a more specific message for particular
> component.
> You can remove it if this message should/could be used for any other Form
> in you application/package/page/panel (depending in which .properties file
> you have it).
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, May 26, 2016 at 6:46 PM, Fabio Fioretti <
> windom.macroso...@gmail.com
> > wrote:
>
> > Hello everybody,
> >
> > I recently migrated an application from Wicket 6.17.0 to 6.23.0 and I'm
> > experiencing the following problem.
> >
> > I have 2 nested forms. The inner one, form0, contains a FileUploadField
> > with an AjaxFormSubmitBehavior(form0, "change") attached to it, while the
> > external one, form1, wraps form0.
> >
> > form1
> > |__
> >  form0
> >   |__
> >FileUploadField
> >
> > When the user selects a file and a file upload exception is thrown (e.g.
> > FileSizeLimitExceededException), I would expect form0's
> > onFileUploadException() method to be invoked. However, the one of form1
> is
> > invoked instead...
> >
> > As a result, Wicket starts looking for a property named
> > "form1.uploadTooLarge" instead of "form0.uploadTooLarge", thus breaking
> my
> > app, which only defines the latter.
> >
> > Is this an intended behavior?
> >
> > Was it introduced by https://issues.apache.org/jira/browse/WICKET-5753?
> >
> > And, by the way, what is the rationale of having the form id in the
> > property key?
> >
> > Many thanks in advance,
> > Fabio
> >
>


Re: AjaxFormSubmitBehavior, FileUploadField and nested forms.

2016-05-26 Thread Martin Grigorov
Hi,

I believe there is/was another ticket describing exactly your problem but I
cannot find it now.

The form id in the property key is not really needed.
You could use it to give Wicket a more specific message for particular
component.
You can remove it if this message should/could be used for any other Form
in you application/package/page/panel (depending in which .properties file
you have it).

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, May 26, 2016 at 6:46 PM, Fabio Fioretti <windom.macroso...@gmail.com
> wrote:

> Hello everybody,
>
> I recently migrated an application from Wicket 6.17.0 to 6.23.0 and I'm
> experiencing the following problem.
>
> I have 2 nested forms. The inner one, form0, contains a FileUploadField
> with an AjaxFormSubmitBehavior(form0, "change") attached to it, while the
> external one, form1, wraps form0.
>
> form1
> |__
>  form0
>   |__
>FileUploadField
>
> When the user selects a file and a file upload exception is thrown (e.g.
> FileSizeLimitExceededException), I would expect form0's
> onFileUploadException() method to be invoked. However, the one of form1 is
> invoked instead...
>
> As a result, Wicket starts looking for a property named
> "form1.uploadTooLarge" instead of "form0.uploadTooLarge", thus breaking my
> app, which only defines the latter.
>
> Is this an intended behavior?
>
> Was it introduced by https://issues.apache.org/jira/browse/WICKET-5753?
>
> And, by the way, what is the rationale of having the form id in the
> property key?
>
> Many thanks in advance,
> Fabio
>


AjaxFormSubmitBehavior, FileUploadField and nested forms.

2016-05-26 Thread Fabio Fioretti
Hello everybody,

I recently migrated an application from Wicket 6.17.0 to 6.23.0 and I'm
experiencing the following problem.

I have 2 nested forms. The inner one, form0, contains a FileUploadField
with an AjaxFormSubmitBehavior(form0, "change") attached to it, while the
external one, form1, wraps form0.

form1
|__
 form0
  |__
   FileUploadField

When the user selects a file and a file upload exception is thrown (e.g.
FileSizeLimitExceededException), I would expect form0's
onFileUploadException() method to be invoked. However, the one of form1 is
invoked instead...

As a result, Wicket starts looking for a property named
"form1.uploadTooLarge" instead of "form0.uploadTooLarge", thus breaking my
app, which only defines the latter.

Is this an intended behavior?

Was it introduced by https://issues.apache.org/jira/browse/WICKET-5753?

And, by the way, what is the rationale of having the form id in the
property key?

Many thanks in advance,
Fabio


Re: Nested Forms

2014-01-13 Thread Martin Grigorov
Hi,

As others explained - yes, this is correct behavior.
In the produced page markup you can see that there is form element only
for the outer form. The inner form is represented by a div element.

Martin Grigorov
Wicket Training and Consulting


On Fri, Jan 10, 2014 at 7:04 PM, gmparker2000 greg.par...@brovada.comwrote:

 When submitting an inner form it appears that the request contains all of
 the
 outer and inner form fields.  Is this the expected behaviour?  From what I
 can see it appears that the outer form is submitted, and only the inner
 form
 parameters are validated and used for model updates.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-tp4663620.html
 Sent from the Users forum 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




Nested Forms

2014-01-10 Thread gmparker2000
When submitting an inner form it appears that the request contains all of the
outer and inner form fields.  Is this the expected behaviour?  From what I
can see it appears that the outer form is submitted, and only the inner form
parameters are validated and used for model updates.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-tp4663620.html
Sent from the Users forum 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: Nested Forms

2014-01-10 Thread Chris Snyder
Nested form elements (what I'm assuming you're referring to) aren't
allowed, per the HTML spec:
http://www.w3.org/TR/html5/forms.html

I wouldn't expect Wicket to follow any kind of predictable behavior
(especially since different browsers likely exhibit different behaviors
themselves).

Best,
Chris

On Fri, Jan 10, 2014 at 12:04 PM, gmparker2000 greg.par...@brovada.comwrote:

 When submitting an inner form it appears that the request contains all of
 the
 outer and inner form fields.  Is this the expected behaviour?  From what I
 can see it appears that the outer form is submitted, and only the inner
 form
 parameters are validated and used for model updates.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-tp4663620.html
 Sent from the Users forum 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: Nested Forms

2014-01-10 Thread Marios Skounakis
Html does not support nested forms. Wicket works around this limitation and
allows form nesting. I think it changes the html so that the inner form
tags become span tags. This means that whenever any of the forms needs to
be posted, everything is posted since in the result html there's only one
form element.

Wicket provides some mechanisms so that submitting the outer form submits
(validates and updates models) the inner forms too, whereas submitting an
inner form only validates and updates the model for this inner form.

You can find more details in the wicket free guide (
https://code.google.com/p/wicket-guide) and at
https://cwiki.apache.org/confluence/display/WICKET/Nested+Forms (not sure
how up-to-date is the latter).



On Fri, Jan 10, 2014 at 7:04 PM, gmparker2000 greg.par...@brovada.comwrote:

 When submitting an inner form it appears that the request contains all of
 the
 outer and inner form fields.  Is this the expected behaviour?  From what I
 can see it appears that the outer form is submitted, and only the inner
 form
 parameters are validated and used for model updates.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-tp4663620.html
 Sent from the Users forum 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: Nested Forms

2014-01-10 Thread Paul Bors
Also see section 12.5 Nested forms of the Free Guide at
http://wicket.apache.org/guide/guide/chapter11.html#chapter11_5


On Fri, Jan 10, 2014 at 12:56 PM, Marios Skounakis msc...@gmail.com wrote:

 Html does not support nested forms. Wicket works around this limitation and
 allows form nesting. I think it changes the html so that the inner form
 tags become span tags. This means that whenever any of the forms needs to
 be posted, everything is posted since in the result html there's only one
 form element.

 Wicket provides some mechanisms so that submitting the outer form submits
 (validates and updates models) the inner forms too, whereas submitting an
 inner form only validates and updates the model for this inner form.

 You can find more details in the wicket free guide (
 https://code.google.com/p/wicket-guide) and at
 https://cwiki.apache.org/confluence/display/WICKET/Nested+Forms (not sure
 how up-to-date is the latter).



 On Fri, Jan 10, 2014 at 7:04 PM, gmparker2000 greg.par...@brovada.com
 wrote:

  When submitting an inner form it appears that the request contains all of
  the
  outer and inner form fields.  Is this the expected behaviour?  From what
 I
  can see it appears that the outer form is submitted, and only the inner
  form
  parameters are validated and used for model updates.
 
  --
  View this message in context:
  http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-tp4663620.html
  Sent from the Users forum 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: Overriding Form.onFileUploadException in nested forms

2013-05-15 Thread guillaume.mary
issue 5190 created because of same question asked here
http://apache-wicket.1842946.n4.nabble.com/Manage-exceptions-on-a-nested-multipart-upload-form-td4658815.html

https://issues.apache.org/jira/browse/WICKET-5190



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Overriding-Form-onFileUploadException-in-nested-forms-tp4657874p4658821.html
Sent from the Users forum 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: Nested forms: error messages of the inner form now showing up

2013-04-23 Thread Sven Meier

 Is this the expected behavior?

No, it isn't. Please create a quickstart and attach it to a new Jira issue.

Sven

On 04/22/2013 06:57 PM, pureza wrote:

I have two nested forms. When I submit the outer form, the inner form's
validation fails but no error is shown. I know the validation fails because
the #onError() method of the inner form is being called. It is as if Wicket
creates a brand-new, error-free, inner form after the page refreshes.

Is this the expected behavior?

Thanks!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-forms-error-messages-of-the-inner-form-now-showing-up-tp4658166.html
Sent from the Users forum 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: Nested forms: error messages of the inner form now showing up

2013-04-23 Thread pureza
Hi,

I've fixed this. It seems I forgot to call #setReuseItems(true) in a
ListView :-)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-forms-error-messages-of-the-inner-form-now-showing-up-tp4658166p4658202.html
Sent from the Users forum 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



Nested forms: error messages of the inner form now showing up

2013-04-22 Thread pureza
I have two nested forms. When I submit the outer form, the inner form's
validation fails but no error is shown. I know the validation fails because
the #onError() method of the inner form is being called. It is as if Wicket
creates a brand-new, error-free, inner form after the page refreshes.

Is this the expected behavior?

Thanks!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-forms-error-messages-of-the-inner-form-now-showing-up-tp4658166.html
Sent from the Users forum 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: Overriding Form.onFileUploadException in nested forms

2013-04-11 Thread Martin Grigorov
Hi,

Please create a ticket in Jira with a quickstart.


On Wed, Apr 10, 2013 at 7:11 PM, Martin Dietze d...@fh-wedel.de wrote:

 I am using Wicket 6.6.0, and I'm running into a nasty problem
 with upload sizes. In a complex editor, there is an upload
 component which itself contains a Form with an AjaxButton for
 triggering the upload.

 If the upload exceeds the allowed max size, the
 SizeLimitExceededException is caught in the outer form, i.e. the
 form to which the upload component was added. Thus, I cannot
 override Form.onFileUploadException in my inner form and thus
 not implement a custom handling (this is necessary, as in this
 case I need to explicitly call FeedbackPanel.error on my upload
 component's FeedbackPanel and add update it via Ajax). Adding
 custom code to the outer form is not an option as this way I'd
 have to modify all users of my upload component.

 Is this a bug or a feature?

 M'bert

 --
 --- / http://herbert.the-little-red-haired-girl.org /
 -
 =+=
 Wer bist du, ungezaehltes Frauenzimmer? Du bist - bist du? - Die Leute
 sagen,
 du waerest - lass sie sagen, sie wissen nicht, wie der Kirchturm steht.

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




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Overriding Form.onFileUploadException in nested forms

2013-04-10 Thread Martin Dietze
I am using Wicket 6.6.0, and I'm running into a nasty problem
with upload sizes. In a complex editor, there is an upload
component which itself contains a Form with an AjaxButton for
triggering the upload. 

If the upload exceeds the allowed max size, the 
SizeLimitExceededException is caught in the outer form, i.e. the
form to which the upload component was added. Thus, I cannot
override Form.onFileUploadException in my inner form and thus
not implement a custom handling (this is necessary, as in this
case I need to explicitly call FeedbackPanel.error on my upload
component's FeedbackPanel and add update it via Ajax). Adding
custom code to the outer form is not an option as this way I'd
have to modify all users of my upload component.

Is this a bug or a feature? 

M'bert

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Wer bist du, ungezaehltes Frauenzimmer? Du bist - bist du? - Die Leute sagen, 
du waerest - lass sie sagen, sie wissen nicht, wie der Kirchturm steht. 

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



Nested forms ...

2013-04-02 Thread RalfButler
Hi there,

to my understanding the forms in the bottom code are nested. But why is the
value of the outer textbox submitted when I click the inner submit button
only? According to this  page
https://cwiki.apache.org/WICKET/nested-forms.html   only the value of the
inner textbox should be submitted when the inner submit button is pressed.

Would be great if someone could explain this. Most likely I do something
wrong here.

Thanks.
Ralf


public class HomePage extends WebPage {

private static final long serialVersionUID = 1L;
private Model innerModel= new Model(Inner);
private Model outerModel= new Model(Outer);

public HomePage() {

add(new Label(labelOuter, outerModel));
add(new Label(labelInner, innerModel));
Form formA = new Form(outerForm){

@Override
protected void onSubmit() {
System.out.println(Outer form submitted);
}

};
add(formA);
formA.add(new TextField(outerFormTF, outerModel));
Form formB = new Form(innerForm){

@Override
protected void onSubmit() {
System.out.println(Inner form submitted);
}

};
formA.add(formB);
formB.add(new TextField(innerFormTF, innerModel));

}
}

HTML:
!DOCTYPE html
html xmlns:wicket=http://wicket.apache.org;
head
meta charset=utf-8 /
titleApache Wicket Quickstart/title
link
href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:regular,bold'
rel='stylesheet' type='text/css' /
link rel=stylesheet href=style.css type=text/css
media=screen title=Stylesheet /
/head
body
Outer value br/
Inner value 
form wicket:id=outerForm
input wicket:id=outerFormTF type=text/
input type=submit value=Outer Form /
form wicket:id=innerForm
input wicket:id=innerFormTF type=text/
input type=submit value=Inner Form /
/form
/form
/body
/html




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-forms-tp4657683.html
Sent from the Users forum 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: Nested forms ...

2013-04-02 Thread Sven Meier

Hi,

the values of all form components are submitted, but only the ones from 
the submitted nested form are processed.


See Form#wantSubmitOnNestedFormSubmit() and the tests in 
NestedFormSubmitTest.


Sven


On 04/02/2013 12:40 PM, RalfButler wrote:

Hi there,

to my understanding the forms in the bottom code are nested. But why is the
value of the outer textbox submitted when I click the inner submit button
only? According to this  page
https://cwiki.apache.org/WICKET/nested-forms.html   only the value of the
inner textbox should be submitted when the inner submit button is pressed.

Would be great if someone could explain this. Most likely I do something
wrong here.

Thanks.
Ralf


public class HomePage extends WebPage {

 private static final long serialVersionUID = 1L;
 private Model innerModel= new Model(Inner);
 private Model outerModel= new Model(Outer);

 public HomePage() {

 add(new Label(labelOuter, outerModel));
 add(new Label(labelInner, innerModel));
 Form formA = new Form(outerForm){

 @Override
 protected void onSubmit() {
 System.out.println(Outer form submitted);
 }
 
 };

 add(formA);
 formA.add(new TextField(outerFormTF, outerModel));
 Form formB = new Form(innerForm){

 @Override
 protected void onSubmit() {
 System.out.println(Inner form submitted);
 }
 
 };

 formA.add(formB);
 formB.add(new TextField(innerFormTF, innerModel));

 }
}

HTML:
!DOCTYPE html
html xmlns:wicket=http://wicket.apache.org;
 head
 meta charset=utf-8 /
 titleApache Wicket Quickstart/title
 link
href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:regular,bold'
rel='stylesheet' type='text/css' /
 link rel=stylesheet href=style.css type=text/css
media=screen title=Stylesheet /
 /head
 body
 Outer value br/
 Inner value
 form wicket:id=outerForm
 input wicket:id=outerFormTF type=text/
 input type=submit value=Outer Form /
 form wicket:id=innerForm
 input wicket:id=innerFormTF type=text/
 input type=submit value=Inner Form /
 /form
 /form
 /body
/html




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-forms-tp4657683.html
Sent from the Users forum 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: Nested forms ...

2013-04-02 Thread RalfButler
Thanks for the quick reply Sven! Still confusing to me; for
wantSubmitOnNestedFormSubmit() it says By default, this is false, so when a
nested form is submitted, this form will not be submitted. And since I did
not overwrite wantSubmitOnNestedFormSubmit of the OuterForm to return true,
I'd expect that OuterForm is not submitted when the inner form submit button
is pressed.

Could it be that 'submit' and 'process' got a bit confused in the JavaDoc?

I reckon it has something to do with the code I wrote. I slightly modified
it ... same result. But it would be great if you could skim through it. May
aim is that outerModel does not get assigned a value of the outerTextField
when the innser submit button is pressed.

Thanks,
Ralf


JAVA:

HTML:



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-forms-tp4657683p4657687.html
Sent from the Users forum 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: Nested forms ...

2013-04-02 Thread Sven Meier
Ah, you're not using any button components, so there's no way for Wicket 
to know which form was submitted.


Sven

On 04/02/2013 01:48 PM, RalfButler wrote:

Thanks for the quick reply Sven! Still confusing to me; for
wantSubmitOnNestedFormSubmit() it says By default, this is false, so when a
nested form is submitted, this form will not be submitted. And since I did
not overwrite wantSubmitOnNestedFormSubmit of the OuterForm to return true,
I'd expect that OuterForm is not submitted when the inner form submit button
is pressed.

Could it be that 'submit' and 'process' got a bit confused in the JavaDoc?

I reckon it has something to do with the code I wrote. I slightly modified
it ... same result. But it would be great if you could skim through it. May
aim is that outerModel does not get assigned a value of the outerTextField
when the innser submit button is pressed.

Thanks,
Ralf


JAVA:

HTML:



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-forms-tp4657683p4657687.html
Sent from the Users forum 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: Nested forms ...

2013-04-02 Thread RalfButler
Ah! Thank you very much Sven. Yes, that makes sense!!

In case anyone is interested:
JAVA:


HTML:




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-forms-tp4657683p4657689.html
Sent from the Users forum 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: Wicket 1.5 and nested forms

2012-06-13 Thread Thomas Heigl
Hello,

In case anyone else is encountering this problem when migrating from 1.4 to
1.5, I solved it by overriding delegateSubmit in my form:

public static enum SubmitOrder {
 /** Submit form submitter before forms (1.5 Default) */
 OUTSIDE_IN,
 /** Submit form submitter after forms (1.4 Default) */
 INSIDE_OUT
 }

 private SubmitOrder submitOrder = SubmitOrder.OUTSIDE_IN;



@Override
 protected void delegateSubmit(IFormSubmitter submittingComponent) {
 switch (submitOrder) {
 case OUTSIDE_IN:
 super.delegateSubmit(submittingComponent);
 break;
 case INSIDE_OUT:
 super.delegateSubmit(null);
 if (submittingComponent != null) {
 submittingComponent.onSubmit();
 }
 break;
 }
 }


Cheers,

Thomas

On Wed, May 9, 2012 at 3:07 PM, Thomas Heigl tho...@umschalt.com wrote:

 Hey Martin,


 WICKET-3705 links to https://issues.apache.org/jira/browse/WICKET-1894
 which says that this order is changed in 1.4.15


 I upgraded to Wicket 1.5 from Wicket 1.4.20 and it still has been working
 with 1.4.20.

 This is the way how it works in 1.5/6.x. I'm not sure why it is not
 documented.
  But there are different opinions about it:
  https://issues.apache.org/jira/browse/WICKET-3705


 I just thought about it some more and I think the new behavior is quite
 counter intuitive. For instance my following usecase:

 final class CompoundForm extends BaseFormExample {
 public CompoundSearchRequestForm(String id, final IModelExample model) {
 super(id, model);
  add(new BaseForm(baseForm, model));
 add(new ConfigurationForm(configurationForm, model));
  add(new SettingsForm(settingsForm, model));
 add(new AjaxButton(save) {
  @Override
 protected void onSubmit(AjaxRequestTarget target, Form? form) {

  // do nothing - delegated to form's onSubmit
  }
 });
 }
 @Override
  protected void onSubmit() {
 super.onSubmit();
 listener.saveModel(getModelObject());
  }
 }


 I moved the buttons onSubmit logic to the form's logic to mimic Wicket 1.4
 behavior. This works, but the button is now pretty useless and just
 triggers a form submit. In the form's onSubmit on the other hand I don't
 have (direct) access to the AjaxRequestTarget so I'd have to split
 functionality into the two handlers and always think about which order they
 are called in.

 The problems get harder if you don't have complete control over the nested
 form structure. For instance, when you are using the Wizards from
 wicket-extensions. They always wrap their contents in a compound form. We
 use ajaxified versions of Wizards extensively and the new form submit flow
 makes them very hard to use. The next/finish/previous links of the wizard
 are now called before any of the actual forms inside the wizard had their
 onSubmit handler called. The buttons in fact *replace* the inner form
 before it has been submitted and I had to move the wizards state change
 logic to onConfigure to make it work again:

 @Override
 public void onActiveStepChanged(IWizardStep newStep) {
  // do nothing - logic moved to #onConfigure to prevent replacement of
 the form before validation of nested forms
 }
 @Override
 protected void onConfigure() {
  super.onConfigure();
 final IWizardStep activeStep = getActiveStep();
 getForm().replace(activeStep.getView(VIEW_ID, this, this));
  getForm().replace(activeStep.getHeader(HEADER_ID, this, this));
 }


 I worked around these problems but I'd greatly prefer a way to configure
 the form submit order somewhere. Ideally on the compound form or the ajax
 button.

 Thomas

 On Wed, May 9, 2012 at 1:24 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 On Wed, May 9, 2012 at 2:22 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
  Hi Thomas,
 
  On Wed, May 9, 2012 at 2:12 PM, Thomas Heigl tho...@umschalt.com
 wrote:
  Hello,
 
  I notices a strange behavior after upgrading to Wicket 1.5. Nested
 forms
  are submitted in a different order.
 
  I have structures like this:
 
  - Compound Form
  -- Subform 1
  -- Subform 2
  -- Subform 3
  - Submit Link/Button for Compound Form
 
 
  In Wicket 1.4 the order of calls to onSubmit was like this:
 
  1. Subforms
  2. Compound Form
  3. Submit Link/Button
 
  In multiple locations I had logic in the subforms' onSubmit handlers
 that
  do cleanup, re-attaching of models to entities etc. before my links
 submit
  handler is called and persists my model object.
 
  In Wicket 1.5 the submit link's handler that I use for my main logic is
  actually called before the subforms:
 
  1. Submit Link
  2. Subforms
  3. Compound Form
 
  I can fix this by moving all my compound form logic from the
 link/buttons
  onSubmit handler to the compound form's handler, but wanted to check
 first
  if this behavior is intentional?
  Is this the way to do it in Wicket 1.5?
 
  This is the way how it works in 1.5/6.x. I'm not sure why it is not
 documented.
  But there are different opinions about it:
  https://issues.apache.org/jira/browse/WICKET-3705

 WICKET-3705 links to https://issues.apache.org/jira/browse/WICKET-1894
 which says

Re: Wicket 1.5 and nested forms

2012-06-13 Thread Stefan Moises
Thank you very much, Thomas, I was struggling with exactly this problem 
for a couple of hours yesterday... I think this should be changed back 
or at least be configurable in the next versions !


Cheers,
Stefan

Am 13.06.2012 17:14, schrieb Thomas Heigl:

Hello,

In case anyone else is encountering this problem when migrating from 1.4 to
1.5, I solved it by overriding delegateSubmit in my form:

public static enum SubmitOrder {

/** Submit form submitter before forms (1.5 Default) */
OUTSIDE_IN,
/** Submit form submitter after forms (1.4 Default) */
INSIDE_OUT
}

private SubmitOrder submitOrder = SubmitOrder.OUTSIDE_IN;



@Override

protected void delegateSubmit(IFormSubmitter submittingComponent) {
switch (submitOrder) {
case OUTSIDE_IN:
super.delegateSubmit(submittingComponent);
break;
case INSIDE_OUT:
super.delegateSubmit(null);
if (submittingComponent != null) {
submittingComponent.onSubmit();
}
break;
}
}


Cheers,

Thomas

On Wed, May 9, 2012 at 3:07 PM, Thomas Heigltho...@umschalt.com  wrote:


Hey Martin,



WICKET-3705 links to https://issues.apache.org/jira/browse/WICKET-1894
which says that this order is changed in 1.4.15


I upgraded to Wicket 1.5 from Wicket 1.4.20 and it still has been working
with 1.4.20.

This is the way how it works in 1.5/6.x. I'm not sure why it is not

documented.

But there are different opinions about it:
https://issues.apache.org/jira/browse/WICKET-3705


I just thought about it some more and I think the new behavior is quite
counter intuitive. For instance my following usecase:

final class CompoundForm extends BaseFormExample  {

public CompoundSearchRequestForm(String id, final IModelExample  model) {
super(id, model);
  add(new BaseForm(baseForm, model));
add(new ConfigurationForm(configurationForm, model));
  add(new SettingsForm(settingsForm, model));
add(new AjaxButton(save) {
  @Override
protected void onSubmit(AjaxRequestTarget target, Form?  form) {

  // do nothing -  delegated to form's onSubmit

  }
});
}
@Override
  protected void onSubmit() {
super.onSubmit();
listener.saveModel(getModelObject());
  }
}


I moved the buttons onSubmit logic to the form's logic to mimic Wicket 1.4
behavior. This works, but the button is now pretty useless and just
triggers a form submit. In the form's onSubmit on the other hand I don't
have (direct) access to the AjaxRequestTarget so I'd have to split
functionality into the two handlers and always think about which order they
are called in.

The problems get harder if you don't have complete control over the nested
form structure. For instance, when you are using the Wizards from
wicket-extensions. They always wrap their contents in a compound form. We
use ajaxified versions of Wizards extensively and the new form submit flow
makes them very hard to use. The next/finish/previous links of the wizard
are now called before any of the actual forms inside the wizard had their
onSubmit handler called. The buttons in fact *replace* the inner form
before it has been submitted and I had to move the wizards state change
logic to onConfigure to make it work again:

@Override

public void onActiveStepChanged(IWizardStep newStep) {
  // do nothing -  logic moved to #onConfigure to prevent replacement of
the form before validation of nested forms
}
@Override
protected void onConfigure() {
  super.onConfigure();
final IWizardStep activeStep = getActiveStep();
getForm().replace(activeStep.getView(VIEW_ID, this, this));
  getForm().replace(activeStep.getHeader(HEADER_ID, this, this));
}


I worked around these problems but I'd greatly prefer a way to configure
the form submit order somewhere. Ideally on the compound form or the ajax
button.

Thomas

On Wed, May 9, 2012 at 1:24 PM, Martin Grigorovmgrigo...@apache.orgwrote:


On Wed, May 9, 2012 at 2:22 PM, Martin Grigorovmgrigo...@apache.org
wrote:

Hi Thomas,

On Wed, May 9, 2012 at 2:12 PM, Thomas Heigltho...@umschalt.com

wrote:

Hello,

I notices a strange behavior after upgrading to Wicket 1.5. Nested

forms

are submitted in a different order.

I have structures like this:

- Compound Form

-- Subform 1
-- Subform 2
-- Subform 3
- Submit Link/Button for Compound Form


In Wicket 1.4 the order of calls to onSubmit was like this:

1. Subforms
2. Compound Form
3. Submit Link/Button

In multiple locations I had logic in the subforms' onSubmit handlers

that

do cleanup, re-attaching of models to entities etc. before my links

submit

handler is called and persists my model object.

In Wicket 1.5 the submit link's handler that I use for my main logic is
actually called before the subforms:

1. Submit Link
2. Subforms
3. Compound Form

I can fix this by moving all my compound form logic from the

link/buttons

onSubmit handler to the compound form's handler, but wanted to check

first

if this behavior is intentional?
Is this the way to do it in Wicket 1.5?

This is the way how it works in 1.5/6.x. I'm not sure why it is not

documented.

But there are different opinions about

Wicket 1.5 and nested forms

2012-05-09 Thread Thomas Heigl
Hello,

I notices a strange behavior after upgrading to Wicket 1.5. Nested forms
are submitted in a different order.

I have structures like this:

- Compound Form
 -- Subform 1
 -- Subform 2
 -- Subform 3
 - Submit Link/Button for Compound Form


In Wicket 1.4 the order of calls to onSubmit was like this:

1. Subforms
2. Compound Form
3. Submit Link/Button

In multiple locations I had logic in the subforms' onSubmit handlers that
do cleanup, re-attaching of models to entities etc. before my links submit
handler is called and persists my model object.

In Wicket 1.5 the submit link's handler that I use for my main logic is
actually called before the subforms:

1. Submit Link
2. Subforms
3. Compound Form

I can fix this by moving all my compound form logic from the link/buttons
onSubmit handler to the compound form's handler, but wanted to check first
if this behavior is intentional?
Is this the way to do it in Wicket 1.5?

Cheers,

Thomas


Re: Wicket 1.5 and nested forms

2012-05-09 Thread Martin Grigorov
Hi Thomas,

On Wed, May 9, 2012 at 2:12 PM, Thomas Heigl tho...@umschalt.com wrote:
 Hello,

 I notices a strange behavior after upgrading to Wicket 1.5. Nested forms
 are submitted in a different order.

 I have structures like this:

 - Compound Form
 -- Subform 1
 -- Subform 2
 -- Subform 3
 - Submit Link/Button for Compound Form


 In Wicket 1.4 the order of calls to onSubmit was like this:

 1. Subforms
 2. Compound Form
 3. Submit Link/Button

 In multiple locations I had logic in the subforms' onSubmit handlers that
 do cleanup, re-attaching of models to entities etc. before my links submit
 handler is called and persists my model object.

 In Wicket 1.5 the submit link's handler that I use for my main logic is
 actually called before the subforms:

 1. Submit Link
 2. Subforms
 3. Compound Form

 I can fix this by moving all my compound form logic from the link/buttons
 onSubmit handler to the compound form's handler, but wanted to check first
 if this behavior is intentional?
 Is this the way to do it in Wicket 1.5?

This is the way how it works in 1.5/6.x. I'm not sure why it is not documented.
But there are different opinions about it:
https://issues.apache.org/jira/browse/WICKET-3705


 Cheers,

 Thomas



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Wicket 1.5 and nested forms

2012-05-09 Thread Martin Grigorov
On Wed, May 9, 2012 at 2:22 PM, Martin Grigorov mgrigo...@apache.org wrote:
 Hi Thomas,

 On Wed, May 9, 2012 at 2:12 PM, Thomas Heigl tho...@umschalt.com wrote:
 Hello,

 I notices a strange behavior after upgrading to Wicket 1.5. Nested forms
 are submitted in a different order.

 I have structures like this:

 - Compound Form
 -- Subform 1
 -- Subform 2
 -- Subform 3
 - Submit Link/Button for Compound Form


 In Wicket 1.4 the order of calls to onSubmit was like this:

 1. Subforms
 2. Compound Form
 3. Submit Link/Button

 In multiple locations I had logic in the subforms' onSubmit handlers that
 do cleanup, re-attaching of models to entities etc. before my links submit
 handler is called and persists my model object.

 In Wicket 1.5 the submit link's handler that I use for my main logic is
 actually called before the subforms:

 1. Submit Link
 2. Subforms
 3. Compound Form

 I can fix this by moving all my compound form logic from the link/buttons
 onSubmit handler to the compound form's handler, but wanted to check first
 if this behavior is intentional?
 Is this the way to do it in Wicket 1.5?

 This is the way how it works in 1.5/6.x. I'm not sure why it is not 
 documented.
 But there are different opinions about it:
 https://issues.apache.org/jira/browse/WICKET-3705

WICKET-3705 links to https://issues.apache.org/jira/browse/WICKET-1894
which says that this order is changed in 1.4.15



 Cheers,

 Thomas



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Wicket 1.5 and nested forms

2012-05-09 Thread Thomas Heigl
Hey Martin,


 WICKET-3705 links to https://issues.apache.org/jira/browse/WICKET-1894
 which says that this order is changed in 1.4.15


I upgraded to Wicket 1.5 from Wicket 1.4.20 and it still has been working
with 1.4.20.

This is the way how it works in 1.5/6.x. I'm not sure why it is not
 documented.
  But there are different opinions about it:
  https://issues.apache.org/jira/browse/WICKET-3705


I just thought about it some more and I think the new behavior is quite
counter intuitive. For instance my following usecase:

final class CompoundForm extends BaseFormExample {
 public CompoundSearchRequestForm(String id, final IModelExample model) {
 super(id, model);
 add(new BaseForm(baseForm, model));
 add(new ConfigurationForm(configurationForm, model));
 add(new SettingsForm(settingsForm, model));
 add(new AjaxButton(save) {
 @Override
 protected void onSubmit(AjaxRequestTarget target, Form? form) {

// do nothing - delegated to form's onSubmit
 }
 });
 }
 @Override
 protected void onSubmit() {
 super.onSubmit();
 listener.saveModel(getModelObject());
 }
 }


I moved the buttons onSubmit logic to the form's logic to mimic Wicket 1.4
behavior. This works, but the button is now pretty useless and just
triggers a form submit. In the form's onSubmit on the other hand I don't
have (direct) access to the AjaxRequestTarget so I'd have to split
functionality into the two handlers and always think about which order they
are called in.

The problems get harder if you don't have complete control over the nested
form structure. For instance, when you are using the Wizards from
wicket-extensions. They always wrap their contents in a compound form. We
use ajaxified versions of Wizards extensively and the new form submit flow
makes them very hard to use. The next/finish/previous links of the wizard
are now called before any of the actual forms inside the wizard had their
onSubmit handler called. The buttons in fact *replace* the inner form
before it has been submitted and I had to move the wizards state change
logic to onConfigure to make it work again:

@Override
 public void onActiveStepChanged(IWizardStep newStep) {
 // do nothing - logic moved to #onConfigure to prevent replacement of the
 form before validation of nested forms
 }
 @Override
 protected void onConfigure() {
 super.onConfigure();
 final IWizardStep activeStep = getActiveStep();
 getForm().replace(activeStep.getView(VIEW_ID, this, this));
 getForm().replace(activeStep.getHeader(HEADER_ID, this, this));
 }


I worked around these problems but I'd greatly prefer a way to configure
the form submit order somewhere. Ideally on the compound form or the ajax
button.

Thomas

On Wed, May 9, 2012 at 1:24 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 On Wed, May 9, 2012 at 2:22 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
  Hi Thomas,
 
  On Wed, May 9, 2012 at 2:12 PM, Thomas Heigl tho...@umschalt.com
 wrote:
  Hello,
 
  I notices a strange behavior after upgrading to Wicket 1.5. Nested forms
  are submitted in a different order.
 
  I have structures like this:
 
  - Compound Form
  -- Subform 1
  -- Subform 2
  -- Subform 3
  - Submit Link/Button for Compound Form
 
 
  In Wicket 1.4 the order of calls to onSubmit was like this:
 
  1. Subforms
  2. Compound Form
  3. Submit Link/Button
 
  In multiple locations I had logic in the subforms' onSubmit handlers
 that
  do cleanup, re-attaching of models to entities etc. before my links
 submit
  handler is called and persists my model object.
 
  In Wicket 1.5 the submit link's handler that I use for my main logic is
  actually called before the subforms:
 
  1. Submit Link
  2. Subforms
  3. Compound Form
 
  I can fix this by moving all my compound form logic from the
 link/buttons
  onSubmit handler to the compound form's handler, but wanted to check
 first
  if this behavior is intentional?
  Is this the way to do it in Wicket 1.5?
 
  This is the way how it works in 1.5/6.x. I'm not sure why it is not
 documented.
  But there are different opinions about it:
  https://issues.apache.org/jira/browse/WICKET-3705

 WICKET-3705 links to https://issues.apache.org/jira/browse/WICKET-1894
 which says that this order is changed in 1.4.15

 
 
  Cheers,
 
  Thomas
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




Re: Nested Forms and Multipart Fileupload Issue

2011-12-08 Thread marnold
Was this issue resolved? I am running on the same codebase and have the same
issue.


jcorbin wrote
 
 This issue seems to pop up in our environment from time to time and trying
 to figure out how to fix it once and for all.
 
 We have a page with a form that pops up modal window with a form specified
 as well.
 
 When we try to submit, we get the following exception:
 
 java.lang.IllegalStateException: ServletRequest does not contain multipart
 content. One possible solution is to explicitly call
 Form.setMultipart(true), Wicket tries its best to auto-detect multipart
 forms but there are certain situation where it cannot.
 at
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:113)
 at
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:83)
 at
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
 at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
 at
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
 at
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
 ...
 
 Setting Form.setMultipart(true) on either form has no affect.
 
 We are running Wicket Version 1.4.7.
 
 Is there a fix for this issue?
 
 Is this JIRA Issue related???
 https://issues.apache.org/jira/browse/WICKET-2749
 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p4174557.html
Sent from the Users forum 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: Nested Forms in 1.4.x - order of calling onSubmit

2011-10-20 Thread Martin Grigorov
On Tue, Oct 18, 2011 at 3:11 PM, Bruno Borges bruno.bor...@gmail.com wrote:
 After playing with Nested Forms in WIcket 1.4.18, I found out that the
 onSubmit method of these forms is called at the end of the process.

 If a parent form has a button and this button is submited, its onSubmit
 method is called before anything.
 Then, parent form's onSubmit method is called.
 Then, it will navigate through all nested forms calling their onSubmit
 method.
 The problem is that I have a nested forms that changes a value in the model
 that is associated with the parent form.

 My usecase has an AddressPanel with a form inside that manipulates the
 person.address object. This panel is created by informing two
 IModelAddress objects.
 One is to be used as the Person's address. The other one is to be used as
 copy of, because of a CheckBox that states Use the same address as of
 account holder.

 On its onSubmit method, is where I clone the account holder address to the
 actual person.address.

 But because of the order of how Wicket calls onSubmit methods, this
 implementation fails.

 Any suggestion?

 Should Wicket call all nested forms' onSubmit methods before calling the
 Button's onSubmit (or the parent form onSubmit) ?
This is how it behaves in Wicket 1.5.
See org.apache.wicket.markup.html.form.Form.delegateSubmit(IFormSubmitter)

You are recommended to upgrade! ;-)

 Thanks,

 *Bruno Borges*
 (21) 7672-7099
 *www.brunoborges.com*




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Nested Forms in 1.4.x - order of calling onSubmit

2011-10-20 Thread Bruno Borges
Can't upgrade... :-(

Political issues (read: conservative corporation with terrible decision
makers)

*Bruno Borges*
(21) 7672-7099
*www.brunoborges.com*



On Thu, Oct 20, 2011 at 9:28 AM, Martin Grigorov mgrigo...@apache.orgwrote:

 On Tue, Oct 18, 2011 at 3:11 PM, Bruno Borges bruno.bor...@gmail.com
 wrote:
  After playing with Nested Forms in WIcket 1.4.18, I found out that the
  onSubmit method of these forms is called at the end of the process.
 
  If a parent form has a button and this button is submited, its onSubmit
  method is called before anything.
  Then, parent form's onSubmit method is called.
  Then, it will navigate through all nested forms calling their onSubmit
  method.
  The problem is that I have a nested forms that changes a value in the
 model
  that is associated with the parent form.
 
  My usecase has an AddressPanel with a form inside that manipulates the
  person.address object. This panel is created by informing two
  IModelAddress objects.
  One is to be used as the Person's address. The other one is to be used as
  copy of, because of a CheckBox that states Use the same address as of
  account holder.
 
  On its onSubmit method, is where I clone the account holder address to
 the
  actual person.address.
 
  But because of the order of how Wicket calls onSubmit methods, this
  implementation fails.
 
  Any suggestion?
 
  Should Wicket call all nested forms' onSubmit methods before calling the
  Button's onSubmit (or the parent form onSubmit) ?
 This is how it behaves in Wicket 1.5.
 See org.apache.wicket.markup.html.form.Form.delegateSubmit(IFormSubmitter)

 You are recommended to upgrade! ;-)
 
  Thanks,
 
  *Bruno Borges*
  (21) 7672-7099
  *www.brunoborges.com*
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

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




Re: Nested Forms in 1.4.x - order of calling onSubmit

2011-10-20 Thread Martijn Dashorst
On Thu, Oct 20, 2011 at 3:07 PM, Bruno Borges bruno.bor...@gmail.com wrote:
 Can't upgrade... :-(

 Political issues (read: conservative corporation with terrible decision
 makers)

They let you use wicket, so they can't be too bad :)

Martijn

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



Nested Forms in 1.4.x - order of calling onSubmit

2011-10-18 Thread Bruno Borges
After playing with Nested Forms in WIcket 1.4.18, I found out that the
onSubmit method of these forms is called at the end of the process.

If a parent form has a button and this button is submited, its onSubmit
method is called before anything.
Then, parent form's onSubmit method is called.
Then, it will navigate through all nested forms calling their onSubmit
method.
The problem is that I have a nested forms that changes a value in the model
that is associated with the parent form.

My usecase has an AddressPanel with a form inside that manipulates the
person.address object. This panel is created by informing two
IModelAddress objects.
One is to be used as the Person's address. The other one is to be used as
copy of, because of a CheckBox that states Use the same address as of
account holder.

On its onSubmit method, is where I clone the account holder address to the
actual person.address.

But because of the order of how Wicket calls onSubmit methods, this
implementation fails.

Any suggestion?

Should Wicket call all nested forms' onSubmit methods before calling the
Button's onSubmit (or the parent form onSubmit) ?

Thanks,

*Bruno Borges*
(21) 7672-7099
*www.brunoborges.com*


Re: Nested forms quick question

2011-05-12 Thread Alexandru Artimon

Yes they are necessarily nested.
Thanks Martin, I'll give it a try.

Alex

On 05/06/2011 09:15 PM, Martin Grigorov wrote:

instead of setRequired() use isRequired(submittedForm == innerForm)

On Fri, May 6, 2011 at 6:04 PM, Titonjyt...@gmail.com  wrote:

Are these necessarily nested forms?

2011/5/5 Alexandru Artimonaarti...@developmentgateway.org


Hey guys,

When I submit the main form can I prevent the submit of the inner forms?

I have some small forms to add items to the main form. The fields in the
inner forms have setRequired(true), so when I submit the main form I get
errors that those fields are empty. Any ideas?

Thanks,
Alexandru

-
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



Nested forms quick question

2011-05-06 Thread Alexandru Artimon

Hey guys,

When I submit the main form can I prevent the submit of the inner forms?

I have some small forms to add items to the main form. The fields in the 
inner forms have setRequired(true), so when I submit the main form I get 
errors that those fields are empty. Any ideas?


Thanks,
Alexandru

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



Re: Nested forms quick question

2011-05-06 Thread Tito
Are these necessarily nested forms?

2011/5/5 Alexandru Artimon aarti...@developmentgateway.org

 Hey guys,

 When I submit the main form can I prevent the submit of the inner forms?

 I have some small forms to add items to the main form. The fields in the
 inner forms have setRequired(true), so when I submit the main form I get
 errors that those fields are empty. Any ideas?

 Thanks,
 Alexandru

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




Re: Nested forms quick question

2011-05-06 Thread Martin Grigorov
instead of setRequired() use isRequired(submittedForm == innerForm)

On Fri, May 6, 2011 at 6:04 PM, Tito njyt...@gmail.com wrote:
 Are these necessarily nested forms?

 2011/5/5 Alexandru Artimon aarti...@developmentgateway.org

 Hey guys,

 When I submit the main form can I prevent the submit of the inner forms?

 I have some small forms to add items to the main form. The fields in the
 inner forms have setRequired(true), so when I submit the main form I get
 errors that those fields are empty. Any ideas?

 Thanks,
 Alexandru

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






-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Nested forms and conditional validation

2011-03-30 Thread Robert Dahlström
Hi, I'm currently trying to work out how to do conditional validation 
with nested forms. Googling a bit gave me the following suggestion on 
how to disable a nested form:


(From https://cwiki.apache.org/WICKET/conditional-validation.html)
Form nestedForm = new Form(nestedForm) {
 @Override
  public boolean isEnabled() {
   if (getRootForm().findSubmittingButton() != null) {
return getRootForm().findSubmittingButton().getForm() == this;
   } else {
return true;
   }
}

But when I try this with Wicket 1.4.16 I noticed that 
findSubmittingButton internally calls isEnabledInHierarchy which ends up 
calling isEnabled so I get stuck in a loop that eventually throws an 
exception.


So how should one go about working with nested forms if I don't want the 
nested form to be submitted when the outer form is submitted?


Appreciative of any help,

Regards
Robert

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



Re: Nested forms and conditional validation

2011-03-30 Thread Robert Dahlström
I did manage to get this working using the other pattern from the 
conditional-validation page (i.e. using the FormVisitorParticipant) but 
I'm still curious if the isEnabled solution should work or not?


Regards
Robert

On 03/30/2011 02:45 PM, Robert Dahlström wrote:

Hi, I'm currently trying to work out how to do conditional validation
with nested forms. Googling a bit gave me the following suggestion on
how to disable a nested form:

(From https://cwiki.apache.org/WICKET/conditional-validation.html)
Form nestedForm = new Form(nestedForm) {
   @Override
public boolean isEnabled() {
 if (getRootForm().findSubmittingButton() != null) {
  return getRootForm().findSubmittingButton().getForm() == this;
 } else {
  return true;
 }
}

But when I try this with Wicket 1.4.16 I noticed that
findSubmittingButton internally calls isEnabledInHierarchy which ends up
calling isEnabled so I get stuck in a loop that eventually throws an
exception.

So how should one go about working with nested forms if I don't want the
nested form to be submitted when the outer form is submitted?

Appreciative of any help,

Regards
Robert

-
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: Nested forms and conditional validation

2011-03-30 Thread Igor Vaynberg
depending on external factors while overriding isenabled()/isvisible()
is dangerous for the reasons youve just found out.

this is why we take care to provide alternative hooks, such as
IFormVisitorParticipant

-igor


2011/3/30 Robert Dahlström robert.dahlst...@ongame.com:
 I did manage to get this working using the other pattern from the
 conditional-validation page (i.e. using the FormVisitorParticipant) but I'm
 still curious if the isEnabled solution should work or not?

 Regards
 Robert

 On 03/30/2011 02:45 PM, Robert Dahlström wrote:

 Hi, I'm currently trying to work out how to do conditional validation
 with nested forms. Googling a bit gave me the following suggestion on
 how to disable a nested form:

 (From https://cwiki.apache.org/WICKET/conditional-validation.html)
 Form nestedForm = new Form(nestedForm) {
   @Override
    public boolean isEnabled() {
     if (getRootForm().findSubmittingButton() != null) {
      return getRootForm().findSubmittingButton().getForm() == this;
     } else {
      return true;
     }
 }

 But when I try this with Wicket 1.4.16 I noticed that
 findSubmittingButton internally calls isEnabledInHierarchy which ends up
 calling isEnabled so I get stuck in a loop that eventually throws an
 exception.

 So how should one go about working with nested forms if I don't want the
 nested form to be submitted when the outer form is submitted?

 Appreciative of any help,

 Regards
 Robert

 -
 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: Nested Forms and Multipart Fileupload Issue

2011-03-24 Thread Alexander Morozov
https://issues.apache.org/jira/browse/WICKET-3555

Thanks


Martin Grigorov-4 wrote:
 
 Create a ticket please.
 And attach the quickstart.
 
 On Wed, Mar 23, 2011 at 12:19 PM, Stijn Maller
 lt;stijn.mal...@gmail.comgt;wrote:
 
 gt; Alexander,
 gt;
 gt; I'm facing the same issue and I'm convinced it is a bug.
 gt;
 gt; When a FileUploadField in a nested form causes an error, then:
 gt;
 gt;   - The ErrorMessage is registered on the outer form (instead of the
 inner
 gt;   form)
 gt;   - The outer form's onError method is called (instead of that of the
 inner
 gt;   form)
 gt;   - The outer form is considered not valid
 gt;
 gt; This goes against https://cwiki.apache.org/WICKET/nested-forms.html
 and
 gt; it's
 gt; also the opposite of what happens when the FileUploadField is
 submitted
 gt; without error. (Only the inner form's onSubmit is called)
 gt;
 gt; As a sidenote, I also find it a bit strange that:
 gt; 1) the FileUploadField itself is considered valid and the error
 message is
 gt; not registered to this component.
 gt; 2) the onSubmit method of the AjaxButton is called instead of the
 onError
 gt; method.
 gt;
 gt; Sorry, but I have not found a workaround yet.
 gt;
 gt; Kind regards,
 gt; Stijn
 gt;
 gt;
 gt; On 17 January 2011 17:59, Alexander Morozov
 gt; lt;alexander.v.moro...@gmail.comgt;wrote:
 gt;
 gt; gt;
 gt; gt; Hi,
 gt; gt;
 gt; gt; I have faced with another problem, related to nested forms and
 gt; gt; FileUploadField (wicket-1.4.15).
 gt; gt; The nested form have FileUploadField instance and defined
 gt; setMaxSize(100K).
 gt; gt; In case of submitting thru Ajax file more than 100K, hasError()
 on the
 gt; gt; nested form return false. But I expect here 'true' - because of
 gt; setMaxSize
 gt; gt; constraint violation. Is this expected behavior ?
 gt; gt;
 gt; gt; Quickstart is attached.
 gt; gt;
 gt;
 http://apache-wicket.1842946.n4.nabble.com/file/n3221235/modalproject2.zip
 gt; gt; modalproject2.zip
 gt; gt;
 gt; gt; Thanks
 gt; gt;
 gt; gt; --
 gt; gt; View this message in context:
 gt; gt;
 gt;
 http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3221235.html
 gt; gt; Sent from the Users forum mailing list archive at Nabble.com.
 gt; gt;
 gt; gt;
 -
 gt; gt; To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 gt; gt; For additional commands, e-mail: users-h...@wicket.apache.org
 gt; gt;
 gt; gt;
 gt;
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com lt;http://jweekend.com/gt;
 


-
--
http://www.linkedin.com/in/amorozov
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3402637.html
Sent from the Users forum 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: Nested Forms and Multipart Fileupload Issue

2011-03-23 Thread Stijn Maller
Alexander,

I'm facing the same issue and I'm convinced it is a bug.

When a FileUploadField in a nested form causes an error, then:

   - The ErrorMessage is registered on the outer form (instead of the inner
   form)
   - The outer form's onError method is called (instead of that of the inner
   form)
   - The outer form is considered not valid

This goes against https://cwiki.apache.org/WICKET/nested-forms.html and it's
also the opposite of what happens when the FileUploadField is submitted
without error. (Only the inner form's onSubmit is called)

As a sidenote, I also find it a bit strange that:
1) the FileUploadField itself is considered valid and the error message is
not registered to this component.
2) the onSubmit method of the AjaxButton is called instead of the onError
method.

Sorry, but I have not found a workaround yet.

Kind regards,
Stijn


On 17 January 2011 17:59, Alexander Morozov
alexander.v.moro...@gmail.comwrote:


 Hi,

 I have faced with another problem, related to nested forms and
 FileUploadField (wicket-1.4.15).
 The nested form have FileUploadField instance and defined setMaxSize(100K).
 In case of submitting thru Ajax file more than 100K, hasError() on the
 nested form return false. But I expect here 'true' - because of setMaxSize
 constraint violation. Is this expected behavior ?

 Quickstart is attached.
 http://apache-wicket.1842946.n4.nabble.com/file/n3221235/modalproject2.zip
 modalproject2.zip

 Thanks

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3221235.html
 Sent from the Users forum 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: Nested Forms and Multipart Fileupload Issue

2011-03-23 Thread Martin Grigorov
Create a ticket please.
And attach the quickstart.

On Wed, Mar 23, 2011 at 12:19 PM, Stijn Maller stijn.mal...@gmail.comwrote:

 Alexander,

 I'm facing the same issue and I'm convinced it is a bug.

 When a FileUploadField in a nested form causes an error, then:

   - The ErrorMessage is registered on the outer form (instead of the inner
   form)
   - The outer form's onError method is called (instead of that of the inner
   form)
   - The outer form is considered not valid

 This goes against https://cwiki.apache.org/WICKET/nested-forms.html and
 it's
 also the opposite of what happens when the FileUploadField is submitted
 without error. (Only the inner form's onSubmit is called)

 As a sidenote, I also find it a bit strange that:
 1) the FileUploadField itself is considered valid and the error message is
 not registered to this component.
 2) the onSubmit method of the AjaxButton is called instead of the onError
 method.

 Sorry, but I have not found a workaround yet.

 Kind regards,
 Stijn


 On 17 January 2011 17:59, Alexander Morozov
 alexander.v.moro...@gmail.comwrote:

 
  Hi,
 
  I have faced with another problem, related to nested forms and
  FileUploadField (wicket-1.4.15).
  The nested form have FileUploadField instance and defined
 setMaxSize(100K).
  In case of submitting thru Ajax file more than 100K, hasError() on the
  nested form return false. But I expect here 'true' - because of
 setMaxSize
  constraint violation. Is this expected behavior ?
 
  Quickstart is attached.
 
 http://apache-wicket.1842946.n4.nabble.com/file/n3221235/modalproject2.zip
  modalproject2.zip
 
  Thanks
 
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3221235.html
  Sent from the Users forum 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
 
 




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: Nested Forms and Multipart Fileupload Issue

2011-01-17 Thread Alexander Morozov

Hi,

I have faced with another problem, related to nested forms and
FileUploadField (wicket-1.4.15).
The nested form have FileUploadField instance and defined setMaxSize(100K).
In case of submitting thru Ajax file more than 100K, hasError() on the
nested form return false. But I expect here 'true' - because of setMaxSize
constraint violation. Is this expected behavior ?

Quickstart is attached. 
http://apache-wicket.1842946.n4.nabble.com/file/n3221235/modalproject2.zip
modalproject2.zip 

Thanks

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3221235.html
Sent from the Users forum 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



Auto-form Submit on Enter In Nested Forms

2011-01-12 Thread Conny Kühne

I have implemented a root form R and a nested form N which has R as a parent
form. I would like to stop N from being processed when R has been submitted.
I've tried to do so by implementing IFormVisitorParticipant.processChildren.
However, I have not been able to distinguish which of the two forms was
submitted in case of an auto form submit triggered by enter. 

Is there a way to tell whether R or N triggered a given submit in case of

a) both forms allow for auto submit on enter (default browser behavior)
b) both forms contain unregistered submit components, e.g., a submit button
which is not a wicket component?
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Auto-form-Submit-on-Enter-In-Nested-Forms-tp3214495p3214495.html
Sent from the Users forum 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: Nested Forms and Multipart Fileupload Issue

2010-12-21 Thread theFatEx

Hi,

WICKET-2779 seems to be related to modal windows with upload and ajax 
but jcorbins original post was about a nested form in a modal window within
a multipart form.

Are both issues fixed or does the problem from jcorbins first post persist?

thanks
Christian


 
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-and-Multipart-Fileupload-Issue-tp1844365p3159359.html
Sent from the Users forum 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: UploadProgressBar on nested forms

2010-11-29 Thread Alec Swan
Igor, thanks for fixing JIRA 3191. Based on your comment the progress bar
will show up in all nested file upload forms when a single form is
submitted.

Is there a way to make the progress bar a child component of the outer form
and display the bar on submission of any (or all) nested forms?

Thanks,

Alec

On Wed, Nov 24, 2010 at 10:29 AM, Alec Swan alecs...@gmail.com wrote:

 Done. JIRA 3191.

 Thanks

 On Tue, Nov 23, 2010 at 10:39 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  file another issue with a new quickstart.
 
  -igor
 
  On Tue, Nov 23, 2010 at 8:45 PM, Alec Swan alecs...@gmail.com wrote:
  Hello,
 
  Thank you for promptly fixing the problem with the upload progress bar
 in
  nested forms. I applied the fix by merging SVN changes into 1.4.13
 branch
  and rebuilding the JAR files.
 
  I verified that the original problem was fixed with the patched jars.
  However, here is a new problem. If I have two upload forms, then upload
  initiated in the first form shows progress bar in the second form. So,
 if
  the second form happens to be hidden (setVisible(false)), then the
 upload
  progress bar does not show up at all.
 
  Should I file another JIRA issue, add to the existing 3181 issue or
 change
  my code?
 
  Thanks
 
 
  On Sat, Nov 20, 2010 at 5:59 PM, Alec Swan alecs...@gmail.com wrote:
 
  I opened JIRA issue 3181:
  https://issues.apache.org/jira/browse/WICKET-3181. I attached a ZIP
  file with complete source to reproduce the issue and instructions on
  how to run it (I am sure you didn't need them).
 
  Please let me know if you can think of any other solutions for
  displaying a modal window from nested upload form.
 
  Thanks,
 
  Alec
 
  On Sat, Nov 20, 2010 at 1:35 PM, Igor Vaynberg 
 igor.vaynb...@gmail.com
  wrote:
   not sure yet :) but a quickstart will give me a playground to explore
   the options.
  
   -igor
  
   On Sat, Nov 20, 2010 at 12:20 PM, Alec Swan alecs...@gmail.com
 wrote:
   I can file a bug, but I am curious how you are planning to fix this?
  
   I tried passing the OUTER form to UploadProgressBar, i.e.
   nestedForm.add(new UploadProgressBar(progress, outerForm)), but
 that
   caused the following error to be logged in Firebug:
  
   Wicket.WUPB.get(def.statusid) is null
   [Break on this error]
 Wicket.WUPB.get(def.statusid).innerHTML='Upload
   starting...';
   progressbar.js (line 41
  
   While I am filing a bug and waiting for a fix, are there any
   suggestions on how to show a modal window during files upload
   initiated from a nested form?
  
   Thanks
  
   On Sat, Nov 20, 2010 at 1:05 PM, Igor Vaynberg 
 igor.vaynb...@gmail.com
  wrote:
   sounds like a bug. open a jira ticket, attach a quickstart.
  
   -igor
  
   On Sat, Nov 20, 2010 at 11:22 AM, Alec Swan alecs...@gmail.com
  wrote:
   Hello,
  
   I have a page which contains a form around a table. Each row in
 the
   table contains a nested form which allows user to upload a file
 for
   the row. I added an UploadProgressBar to the upload form in each
 row.
   However, the upload progress bars are never shown.
  
   I understand that Wicket replaces a nested form with div and
 adds
   onsubmit event handler to display UploadProgressBar. However,
 since
   the form was replaced with div onsubmit handler never fires.
  
   How can I display a progress bar or at least a modal window during
 a
   file upload from a nested form?
  
   Thanks!
  
  
 -
   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
  
  
  
   -
   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: UploadProgressBar on nested forms

2010-11-29 Thread Igor Vaynberg
yeah, just add it to the outer form :)

-igor

On Mon, Nov 29, 2010 at 8:52 AM, Alec Swan alecs...@gmail.com wrote:
 Igor, thanks for fixing JIRA 3191. Based on your comment the progress bar
 will show up in all nested file upload forms when a single form is
 submitted.

 Is there a way to make the progress bar a child component of the outer form
 and display the bar on submission of any (or all) nested forms?

 Thanks,

 Alec

 On Wed, Nov 24, 2010 at 10:29 AM, Alec Swan alecs...@gmail.com wrote:

 Done. JIRA 3191.

 Thanks

 On Tue, Nov 23, 2010 at 10:39 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  file another issue with a new quickstart.
 
  -igor
 
  On Tue, Nov 23, 2010 at 8:45 PM, Alec Swan alecs...@gmail.com wrote:
  Hello,
 
  Thank you for promptly fixing the problem with the upload progress bar
 in
  nested forms. I applied the fix by merging SVN changes into 1.4.13
 branch
  and rebuilding the JAR files.
 
  I verified that the original problem was fixed with the patched jars.
  However, here is a new problem. If I have two upload forms, then upload
  initiated in the first form shows progress bar in the second form. So,
 if
  the second form happens to be hidden (setVisible(false)), then the
 upload
  progress bar does not show up at all.
 
  Should I file another JIRA issue, add to the existing 3181 issue or
 change
  my code?
 
  Thanks
 
 
  On Sat, Nov 20, 2010 at 5:59 PM, Alec Swan alecs...@gmail.com wrote:
 
  I opened JIRA issue 3181:
  https://issues.apache.org/jira/browse/WICKET-3181. I attached a ZIP
  file with complete source to reproduce the issue and instructions on
  how to run it (I am sure you didn't need them).
 
  Please let me know if you can think of any other solutions for
  displaying a modal window from nested upload form.
 
  Thanks,
 
  Alec
 
  On Sat, Nov 20, 2010 at 1:35 PM, Igor Vaynberg 
 igor.vaynb...@gmail.com
  wrote:
   not sure yet :) but a quickstart will give me a playground to explore
   the options.
  
   -igor
  
   On Sat, Nov 20, 2010 at 12:20 PM, Alec Swan alecs...@gmail.com
 wrote:
   I can file a bug, but I am curious how you are planning to fix this?
  
   I tried passing the OUTER form to UploadProgressBar, i.e.
   nestedForm.add(new UploadProgressBar(progress, outerForm)), but
 that
   caused the following error to be logged in Firebug:
  
   Wicket.WUPB.get(def.statusid) is null
   [Break on this error]
 Wicket.WUPB.get(def.statusid).innerHTML='Upload
   starting...';
   progressbar.js (line 41
  
   While I am filing a bug and waiting for a fix, are there any
   suggestions on how to show a modal window during files upload
   initiated from a nested form?
  
   Thanks
  
   On Sat, Nov 20, 2010 at 1:05 PM, Igor Vaynberg 
 igor.vaynb...@gmail.com
  wrote:
   sounds like a bug. open a jira ticket, attach a quickstart.
  
   -igor
  
   On Sat, Nov 20, 2010 at 11:22 AM, Alec Swan alecs...@gmail.com
  wrote:
   Hello,
  
   I have a page which contains a form around a table. Each row in
 the
   table contains a nested form which allows user to upload a file
 for
   the row. I added an UploadProgressBar to the upload form in each
 row.
   However, the upload progress bars are never shown.
  
   I understand that Wicket replaces a nested form with div and
 adds
   onsubmit event handler to display UploadProgressBar. However,
 since
   the form was replaced with div onsubmit handler never fires.
  
   How can I display a progress bar or at least a modal window during
 a
   file upload from a nested form?
  
   Thanks!
  
  
 -
   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
  
  
  
   -
   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: UploadProgressBar on nested forms

2010-11-29 Thread Alec Swan
Right, that works. However, the progress bar shows up but doesn't show any
progress. It basically sits there without updating and then disappears. Am I
missing some customization steps?

What I am trying to do is to have the progress bar to be a sort of modal
dialog expanding over the outer form preventing the user from entering or
clicking nested form elements. Is this possible?

Thanks,

Alec


On Mon, Nov 29, 2010 at 9:56 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 yeah, just add it to the outer form :)

 -igor

 On Mon, Nov 29, 2010 at 8:52 AM, Alec Swan alecs...@gmail.com wrote:
  Igor, thanks for fixing JIRA 3191. Based on your comment the progress bar
  will show up in all nested file upload forms when a single form is
  submitted.
 
  Is there a way to make the progress bar a child component of the outer
 form
  and display the bar on submission of any (or all) nested forms?
 
  Thanks,
 
  Alec
 
  On Wed, Nov 24, 2010 at 10:29 AM, Alec Swan alecs...@gmail.com wrote:
 
  Done. JIRA 3191.
 
  Thanks
 
  On Tue, Nov 23, 2010 at 10:39 PM, Igor Vaynberg 
 igor.vaynb...@gmail.com
  wrote:
   file another issue with a new quickstart.
  
   -igor
  
   On Tue, Nov 23, 2010 at 8:45 PM, Alec Swan alecs...@gmail.com
 wrote:
   Hello,
  
   Thank you for promptly fixing the problem with the upload progress
 bar
  in
   nested forms. I applied the fix by merging SVN changes into 1.4.13
  branch
   and rebuilding the JAR files.
  
   I verified that the original problem was fixed with the patched jars.
   However, here is a new problem. If I have two upload forms, then
 upload
   initiated in the first form shows progress bar in the second form.
 So,
  if
   the second form happens to be hidden (setVisible(false)), then the
  upload
   progress bar does not show up at all.
  
   Should I file another JIRA issue, add to the existing 3181 issue or
  change
   my code?
  
   Thanks
  
  
   On Sat, Nov 20, 2010 at 5:59 PM, Alec Swan alecs...@gmail.com
 wrote:
  
   I opened JIRA issue 3181:
   https://issues.apache.org/jira/browse/WICKET-3181. I attached a ZIP
   file with complete source to reproduce the issue and instructions on
   how to run it (I am sure you didn't need them).
  
   Please let me know if you can think of any other solutions for
   displaying a modal window from nested upload form.
  
   Thanks,
  
   Alec
  
   On Sat, Nov 20, 2010 at 1:35 PM, Igor Vaynberg 
  igor.vaynb...@gmail.com
   wrote:
not sure yet :) but a quickstart will give me a playground to
 explore
the options.
   
-igor
   
On Sat, Nov 20, 2010 at 12:20 PM, Alec Swan alecs...@gmail.com
  wrote:
I can file a bug, but I am curious how you are planning to fix
 this?
   
I tried passing the OUTER form to UploadProgressBar, i.e.
nestedForm.add(new UploadProgressBar(progress, outerForm)), but
  that
caused the following error to be logged in Firebug:
   
Wicket.WUPB.get(def.statusid) is null
[Break on this error]
  Wicket.WUPB.get(def.statusid).innerHTML='Upload
starting...';
progressbar.js (line 41
   
While I am filing a bug and waiting for a fix, are there any
suggestions on how to show a modal window during files upload
initiated from a nested form?
   
Thanks
   
On Sat, Nov 20, 2010 at 1:05 PM, Igor Vaynberg 
  igor.vaynb...@gmail.com
   wrote:
sounds like a bug. open a jira ticket, attach a quickstart.
   
-igor
   
On Sat, Nov 20, 2010 at 11:22 AM, Alec Swan alecs...@gmail.com
 
   wrote:
Hello,
   
I have a page which contains a form around a table. Each row in
  the
table contains a nested form which allows user to upload a file
  for
the row. I added an UploadProgressBar to the upload form in
 each
  row.
However, the upload progress bars are never shown.
   
I understand that Wicket replaces a nested form with div
 and
  adds
onsubmit event handler to display UploadProgressBar. However,
  since
the form was replaced with div onsubmit handler never
 fires.
   
How can I display a progress bar or at least a modal window
 during
  a
file upload from a nested form?
   
Thanks!
   
   
  -
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
   
   
   
   
 -
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail

Re: UploadProgressBar on nested forms

2010-11-29 Thread Igor Vaynberg
your quickstart was missing the UploadWebRequest. see progress bar's javadoc.

-igor

On Mon, Nov 29, 2010 at 5:23 PM, Alec Swan alecs...@gmail.com wrote:
 Right, that works. However, the progress bar shows up but doesn't show any
 progress. It basically sits there without updating and then disappears. Am I
 missing some customization steps?

 What I am trying to do is to have the progress bar to be a sort of modal
 dialog expanding over the outer form preventing the user from entering or
 clicking nested form elements. Is this possible?

 Thanks,

 Alec


 On Mon, Nov 29, 2010 at 9:56 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 yeah, just add it to the outer form :)

 -igor

 On Mon, Nov 29, 2010 at 8:52 AM, Alec Swan alecs...@gmail.com wrote:
  Igor, thanks for fixing JIRA 3191. Based on your comment the progress bar
  will show up in all nested file upload forms when a single form is
  submitted.
 
  Is there a way to make the progress bar a child component of the outer
 form
  and display the bar on submission of any (or all) nested forms?
 
  Thanks,
 
  Alec
 
  On Wed, Nov 24, 2010 at 10:29 AM, Alec Swan alecs...@gmail.com wrote:
 
  Done. JIRA 3191.
 
  Thanks
 
  On Tue, Nov 23, 2010 at 10:39 PM, Igor Vaynberg 
 igor.vaynb...@gmail.com
  wrote:
   file another issue with a new quickstart.
  
   -igor
  
   On Tue, Nov 23, 2010 at 8:45 PM, Alec Swan alecs...@gmail.com
 wrote:
   Hello,
  
   Thank you for promptly fixing the problem with the upload progress
 bar
  in
   nested forms. I applied the fix by merging SVN changes into 1.4.13
  branch
   and rebuilding the JAR files.
  
   I verified that the original problem was fixed with the patched jars.
   However, here is a new problem. If I have two upload forms, then
 upload
   initiated in the first form shows progress bar in the second form.
 So,
  if
   the second form happens to be hidden (setVisible(false)), then the
  upload
   progress bar does not show up at all.
  
   Should I file another JIRA issue, add to the existing 3181 issue or
  change
   my code?
  
   Thanks
  
  
   On Sat, Nov 20, 2010 at 5:59 PM, Alec Swan alecs...@gmail.com
 wrote:
  
   I opened JIRA issue 3181:
   https://issues.apache.org/jira/browse/WICKET-3181. I attached a ZIP
   file with complete source to reproduce the issue and instructions on
   how to run it (I am sure you didn't need them).
  
   Please let me know if you can think of any other solutions for
   displaying a modal window from nested upload form.
  
   Thanks,
  
   Alec
  
   On Sat, Nov 20, 2010 at 1:35 PM, Igor Vaynberg 
  igor.vaynb...@gmail.com
   wrote:
not sure yet :) but a quickstart will give me a playground to
 explore
the options.
   
-igor
   
On Sat, Nov 20, 2010 at 12:20 PM, Alec Swan alecs...@gmail.com
  wrote:
I can file a bug, but I am curious how you are planning to fix
 this?
   
I tried passing the OUTER form to UploadProgressBar, i.e.
nestedForm.add(new UploadProgressBar(progress, outerForm)), but
  that
caused the following error to be logged in Firebug:
   
Wicket.WUPB.get(def.statusid) is null
[Break on this error]
  Wicket.WUPB.get(def.statusid).innerHTML='Upload
starting...';
progressbar.js (line 41
   
While I am filing a bug and waiting for a fix, are there any
suggestions on how to show a modal window during files upload
initiated from a nested form?
   
Thanks
   
On Sat, Nov 20, 2010 at 1:05 PM, Igor Vaynberg 
  igor.vaynb...@gmail.com
   wrote:
sounds like a bug. open a jira ticket, attach a quickstart.
   
-igor
   
On Sat, Nov 20, 2010 at 11:22 AM, Alec Swan alecs...@gmail.com
 
   wrote:
Hello,
   
I have a page which contains a form around a table. Each row in
  the
table contains a nested form which allows user to upload a file
  for
the row. I added an UploadProgressBar to the upload form in
 each
  row.
However, the upload progress bars are never shown.
   
I understand that Wicket replaces a nested form with div
 and
  adds
onsubmit event handler to display UploadProgressBar. However,
  since
the form was replaced with div onsubmit handler never
 fires.
   
How can I display a progress bar or at least a modal window
 during
  a
file upload from a nested form?
   
Thanks!
   
   
  -
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: UploadProgressBar on nested forms

2010-11-24 Thread Alec Swan
Done. JIRA 3191.

Thanks

On Tue, Nov 23, 2010 at 10:39 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 file another issue with a new quickstart.

 -igor

 On Tue, Nov 23, 2010 at 8:45 PM, Alec Swan alecs...@gmail.com wrote:
 Hello,

 Thank you for promptly fixing the problem with the upload progress bar in
 nested forms. I applied the fix by merging SVN changes into 1.4.13 branch
 and rebuilding the JAR files.

 I verified that the original problem was fixed with the patched jars.
 However, here is a new problem. If I have two upload forms, then upload
 initiated in the first form shows progress bar in the second form. So, if
 the second form happens to be hidden (setVisible(false)), then the upload
 progress bar does not show up at all.

 Should I file another JIRA issue, add to the existing 3181 issue or change
 my code?

 Thanks


 On Sat, Nov 20, 2010 at 5:59 PM, Alec Swan alecs...@gmail.com wrote:

 I opened JIRA issue 3181:
 https://issues.apache.org/jira/browse/WICKET-3181. I attached a ZIP
 file with complete source to reproduce the issue and instructions on
 how to run it (I am sure you didn't need them).

 Please let me know if you can think of any other solutions for
 displaying a modal window from nested upload form.

 Thanks,

 Alec

 On Sat, Nov 20, 2010 at 1:35 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  not sure yet :) but a quickstart will give me a playground to explore
  the options.
 
  -igor
 
  On Sat, Nov 20, 2010 at 12:20 PM, Alec Swan alecs...@gmail.com wrote:
  I can file a bug, but I am curious how you are planning to fix this?
 
  I tried passing the OUTER form to UploadProgressBar, i.e.
  nestedForm.add(new UploadProgressBar(progress, outerForm)), but that
  caused the following error to be logged in Firebug:
 
  Wicket.WUPB.get(def.statusid) is null
  [Break on this error] Wicket.WUPB.get(def.statusid).innerHTML='Upload
  starting...';
  progressbar.js (line 41
 
  While I am filing a bug and waiting for a fix, are there any
  suggestions on how to show a modal window during files upload
  initiated from a nested form?
 
  Thanks
 
  On Sat, Nov 20, 2010 at 1:05 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  sounds like a bug. open a jira ticket, attach a quickstart.
 
  -igor
 
  On Sat, Nov 20, 2010 at 11:22 AM, Alec Swan alecs...@gmail.com
 wrote:
  Hello,
 
  I have a page which contains a form around a table. Each row in the
  table contains a nested form which allows user to upload a file for
  the row. I added an UploadProgressBar to the upload form in each row.
  However, the upload progress bars are never shown.
 
  I understand that Wicket replaces a nested form with div and adds
  onsubmit event handler to display UploadProgressBar. However, since
  the form was replaced with div onsubmit handler never fires.
 
  How can I display a progress bar or at least a modal window during a
  file upload from a nested form?
 
  Thanks!
 
  -
  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
 
 
 
  -
  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: UploadProgressBar on nested forms

2010-11-23 Thread Alec Swan
Hello,

Thank you for promptly fixing the problem with the upload progress bar in
nested forms. I applied the fix by merging SVN changes into 1.4.13 branch
and rebuilding the JAR files.

I verified that the original problem was fixed with the patched jars.
However, here is a new problem. If I have two upload forms, then upload
initiated in the first form shows progress bar in the second form. So, if
the second form happens to be hidden (setVisible(false)), then the upload
progress bar does not show up at all.

Should I file another JIRA issue, add to the existing 3181 issue or change
my code?

Thanks


On Sat, Nov 20, 2010 at 5:59 PM, Alec Swan alecs...@gmail.com wrote:

 I opened JIRA issue 3181:
 https://issues.apache.org/jira/browse/WICKET-3181. I attached a ZIP
 file with complete source to reproduce the issue and instructions on
 how to run it (I am sure you didn't need them).

 Please let me know if you can think of any other solutions for
 displaying a modal window from nested upload form.

 Thanks,

 Alec

 On Sat, Nov 20, 2010 at 1:35 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  not sure yet :) but a quickstart will give me a playground to explore
  the options.
 
  -igor
 
  On Sat, Nov 20, 2010 at 12:20 PM, Alec Swan alecs...@gmail.com wrote:
  I can file a bug, but I am curious how you are planning to fix this?
 
  I tried passing the OUTER form to UploadProgressBar, i.e.
  nestedForm.add(new UploadProgressBar(progress, outerForm)), but that
  caused the following error to be logged in Firebug:
 
  Wicket.WUPB.get(def.statusid) is null
  [Break on this error] Wicket.WUPB.get(def.statusid).innerHTML='Upload
  starting...';
  progressbar.js (line 41
 
  While I am filing a bug and waiting for a fix, are there any
  suggestions on how to show a modal window during files upload
  initiated from a nested form?
 
  Thanks
 
  On Sat, Nov 20, 2010 at 1:05 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  sounds like a bug. open a jira ticket, attach a quickstart.
 
  -igor
 
  On Sat, Nov 20, 2010 at 11:22 AM, Alec Swan alecs...@gmail.com
 wrote:
  Hello,
 
  I have a page which contains a form around a table. Each row in the
  table contains a nested form which allows user to upload a file for
  the row. I added an UploadProgressBar to the upload form in each row.
  However, the upload progress bars are never shown.
 
  I understand that Wicket replaces a nested form with div and adds
  onsubmit event handler to display UploadProgressBar. However, since
  the form was replaced with div onsubmit handler never fires.
 
  How can I display a progress bar or at least a modal window during a
  file upload from a nested form?
 
  Thanks!
 
  -
  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
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



Re: UploadProgressBar on nested forms

2010-11-23 Thread Igor Vaynberg
file another issue with a new quickstart.

-igor

On Tue, Nov 23, 2010 at 8:45 PM, Alec Swan alecs...@gmail.com wrote:
 Hello,

 Thank you for promptly fixing the problem with the upload progress bar in
 nested forms. I applied the fix by merging SVN changes into 1.4.13 branch
 and rebuilding the JAR files.

 I verified that the original problem was fixed with the patched jars.
 However, here is a new problem. If I have two upload forms, then upload
 initiated in the first form shows progress bar in the second form. So, if
 the second form happens to be hidden (setVisible(false)), then the upload
 progress bar does not show up at all.

 Should I file another JIRA issue, add to the existing 3181 issue or change
 my code?

 Thanks


 On Sat, Nov 20, 2010 at 5:59 PM, Alec Swan alecs...@gmail.com wrote:

 I opened JIRA issue 3181:
 https://issues.apache.org/jira/browse/WICKET-3181. I attached a ZIP
 file with complete source to reproduce the issue and instructions on
 how to run it (I am sure you didn't need them).

 Please let me know if you can think of any other solutions for
 displaying a modal window from nested upload form.

 Thanks,

 Alec

 On Sat, Nov 20, 2010 at 1:35 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  not sure yet :) but a quickstart will give me a playground to explore
  the options.
 
  -igor
 
  On Sat, Nov 20, 2010 at 12:20 PM, Alec Swan alecs...@gmail.com wrote:
  I can file a bug, but I am curious how you are planning to fix this?
 
  I tried passing the OUTER form to UploadProgressBar, i.e.
  nestedForm.add(new UploadProgressBar(progress, outerForm)), but that
  caused the following error to be logged in Firebug:
 
  Wicket.WUPB.get(def.statusid) is null
  [Break on this error] Wicket.WUPB.get(def.statusid).innerHTML='Upload
  starting...';
  progressbar.js (line 41
 
  While I am filing a bug and waiting for a fix, are there any
  suggestions on how to show a modal window during files upload
  initiated from a nested form?
 
  Thanks
 
  On Sat, Nov 20, 2010 at 1:05 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:
  sounds like a bug. open a jira ticket, attach a quickstart.
 
  -igor
 
  On Sat, Nov 20, 2010 at 11:22 AM, Alec Swan alecs...@gmail.com
 wrote:
  Hello,
 
  I have a page which contains a form around a table. Each row in the
  table contains a nested form which allows user to upload a file for
  the row. I added an UploadProgressBar to the upload form in each row.
  However, the upload progress bars are never shown.
 
  I understand that Wicket replaces a nested form with div and adds
  onsubmit event handler to display UploadProgressBar. However, since
  the form was replaced with div onsubmit handler never fires.
 
  How can I display a progress bar or at least a modal window during a
  file upload from a nested form?
 
  Thanks!
 
  -
  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
 
 
 
  -
  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: Nested forms onSubmit() question ...

2010-11-05 Thread armandoxxx

Just a feature request: 

- beforeSubmit() method on Form would be usefull
- make it configurable order of onSubmit() method calls
(SUBMIT_NESTED_FIRST, SUBMIT_NESTED_LAST)


Regards

Armando

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-forms-onSubmit-question-tp3026993p3028422.html
Sent from the Users forum 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



Nested forms onSubmit() question ...

2010-11-04 Thread armandoxxx

Hey wicket ppl ...  

Is there any beforeSubmit() event like method available on Form. 

I need it cause I have nested forms and only one form is allowed to store
data in the database, so if I had a method beforeSubmit() all my nested
forms could send data to the root form and root form would submit it to the
database. I also though of it because I was looking at sources of Form class
and nested forms onSubmit() method gets called after main form onSubmit() is
executed, so In my case data is first stored into database and after that
nested forms provide data to the main form to be stored in database.

So either I implement procesing on my own (which I really wouldn't like to
do, cause it's allready there (validation, processing, etc...)) or is there
a beforeSubmit() kinda way available and I can't find it anywhere ... 

Any help appreciated.

Regards

Armando

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-forms-onSubmit-question-tp3026993p3026993.html
Sent from the Users forum 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: Nested forms onSubmit() question ...

2010-11-04 Thread Andrea Del Bene

Hi Armando,

have you tried calling method visitChildren(Form.class, visitor) in the 
main onSubmit? Maybe this could help you to gather  children's data 
before submit root form.


Bye.



Hey wicket ppl ...

Is there any beforeSubmit() event like method available on Form.

I need it cause I have nested forms and only one form is allowed to store
data in the database, so if I had a method beforeSubmit() all my nested
forms could send data to the root form and root form would submit it to the
database. I also though of it because I was looking at sources of Form class
and nested forms onSubmit() method gets called after main form onSubmit() is
executed, so In my case data is first stored into database and after that
nested forms provide data to the main form to be stored in database.

So either I implement procesing on my own (which I really wouldn't like to
do, cause it's allready there (validation, processing, etc...)) or is there
a beforeSubmit() kinda way available and I can't find it anywhere ...

Any help appreciated.

Regards

Armando

   



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



Re: Nested forms onSubmit() question ...

2010-11-04 Thread armandoxxx

Hey

well ... that's also the way to do it .. thanks for idea ... 

regards

Armando
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-forms-onSubmit-question-tp3026993p3027217.html
Sent from the Users forum 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: Nested Forms and Multipart Fileupload Issue

2010-03-12 Thread Michał Letyński
Did you add a jira issue James ? If not i can do it. Its a showstopper 
for me.


Ilja Pavkovic pisze:

Hi,

  

Hmmm...I thought the Wicket Team already implemented something similar to
this into the framework some time ago.
  

Perhaps you should provide a quickstart and perhaps put it in a jira ticket?

Best Regards,
Ilja Pavkovic

  



--
Michał Letyński
ConSol* Consulting  Solutions Software Poland Sp. z o.o.
ul. Piastowska 44c, 30-070 Krakow
mail: mi...@consol.pl
tel: +48 609 266 753 



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



Re: Nested Forms and Multipart Fileupload Issue

2010-03-12 Thread Michał Letyński
Jirra issue with quickstart added: 
https://issues.apache.org/jira/browse/WICKET-2779


Michał Letyński pisze:
Did you add a jira issue James ? If not i can do it. Its a showstopper 
for me.


Ilja Pavkovic pisze:

Hi,

 
Hmmm...I thought the Wicket Team already implemented something 
similar to

this into the framework some time ago.
  
Perhaps you should provide a quickstart and perhaps put it in a jira 
ticket?


Best Regards,
Ilja Pavkovic

  





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



Re: Nested Forms and Multipart Fileupload Issue

2010-03-10 Thread Michał Letyński
Is there a wicket version where it works ? I tried  with 1.4.6 and 1.4.7 
but i get the same error which James got.
My use case : I'm trying to submit a form via ajax to upload a file  
inside modal window.

After debug:
FileUploadBase.isMultipartContent get false because

if (contentType.toLowerCase().startsWith(MULTIPART))   - contentType = 
application/x-www-form-urlencoded


James Carman pisze:

You're trying to submit a form via ajax to upload a file?

On Tue, Mar 9, 2010 at 4:26 PM, Corbin, James jcor...@iqnavigator.com wrote:
  

This issue seems to pop up in our environment from time to time and trying to 
figure out how to fix it once and for all.

We have a page with a form that pops up modal window with a form specified as 
well.

When we try to submit, we get the following exception:

java.lang.IllegalStateException: ServletRequest does not contain multipart 
content. One possible solution is to explicitly call Form.setMultipart(true), 
Wicket tries its best to auto-detect multipart forms but there are certain 
situation where it cannot.
at 
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:113)
at 
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:83)
at 
org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
at 
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
...

Setting Form.setMultipart(true) on either form has no affect.

We are running Wicket Version 1.4.7.

Is there a fix for this issue?

Is this JIRA Issue related??? https://issues.apache.org/jira/browse/WICKET-2749






-
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: Nested Forms and Multipart Fileupload Issue

2010-03-10 Thread Corbin, James
Yeah, some feedback from the Wicket Contributors on this issue would be greatly 
appreciated.

-Original Message-
From: Michał Letyński [mailto:mletyn...@consol.pl] 
Sent: Wednesday, March 10, 2010 7:52 AM
To: users@wicket.apache.org
Subject: Re: Nested Forms and Multipart Fileupload Issue

Is there a wicket version where it works ? I tried  with 1.4.6 and 1.4.7 
but i get the same error which James got.
My use case : I'm trying to submit a form via ajax to upload a file  
inside modal window.
After debug:
FileUploadBase.isMultipartContent get false because

if (contentType.toLowerCase().startsWith(MULTIPART))   - contentType = 
application/x-www-form-urlencoded
 
James Carman pisze:
 You're trying to submit a form via ajax to upload a file?

 On Tue, Mar 9, 2010 at 4:26 PM, Corbin, James jcor...@iqnavigator.com wrote:
   
 This issue seems to pop up in our environment from time to time and trying 
 to figure out how to fix it once and for all.

 We have a page with a form that pops up modal window with a form specified 
 as well.

 When we try to submit, we get the following exception:

 java.lang.IllegalStateException: ServletRequest does not contain multipart 
 content. One possible solution is to explicitly call 
 Form.setMultipart(true), Wicket tries its best to auto-detect multipart 
 forms but there are certain situation where it cannot.
 at 
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:113)
 at 
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:83)
 at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
 at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
 at 
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
 at 
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
 ...

 Setting Form.setMultipart(true) on either form has no affect.

 We are running Wicket Version 1.4.7.

 Is there a fix for this issue?

 Is this JIRA Issue related??? 
 https://issues.apache.org/jira/browse/WICKET-2749



 

 -
 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: Nested Forms and Multipart Fileupload Issue

2010-03-10 Thread James Carman
Someone at work had some luck with this approach from what I understand...

http://www.dooriented.com/blog/2008/04/23/wicket-ajax-like-file-upload-on-a-modal-window/


2010/3/10 Michał Letyński mletyn...@consol.pl:
 Is there a wicket version where it works ? I tried  with 1.4.6 and 1.4.7 but
 i get the same error which James got.
 My use case : I'm trying to submit a form via ajax to upload a file  inside
 modal window.
 After debug:
 FileUploadBase.isMultipartContent get false because

 if (contentType.toLowerCase().startsWith(MULTIPART))   - contentType =
 application/x-www-form-urlencoded

 James Carman pisze:

 You're trying to submit a form via ajax to upload a file?

 On Tue, Mar 9, 2010 at 4:26 PM, Corbin, James jcor...@iqnavigator.com
 wrote:


 This issue seems to pop up in our environment from time to time and
 trying to figure out how to fix it once and for all.

 We have a page with a form that pops up modal window with a form
 specified as well.

 When we try to submit, we get the following exception:

 java.lang.IllegalStateException: ServletRequest does not contain
 multipart content. One possible solution is to explicitly call
 Form.setMultipart(true), Wicket tries its best to auto-detect multipart
 forms but there are certain situation where it cannot.
 at
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:113)
 at
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:83)
 at
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
 at
 org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
 at
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
 at
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
 ...

 Setting Form.setMultipart(true) on either form has no affect.

 We are running Wicket Version 1.4.7.

 Is there a fix for this issue?

 Is this JIRA Issue related???
 https://issues.apache.org/jira/browse/WICKET-2749





 -
 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: Nested Forms and Multipart Fileupload Issue

2010-03-10 Thread Corbin, James
Hmmm...I thought the Wicket Team already implemented something similar to this 
into the framework some time ago.

-Original Message-
From: James Carman [mailto:jcar...@carmanconsulting.com] 
Sent: Wednesday, March 10, 2010 11:15 AM
To: users@wicket.apache.org
Subject: Re: Nested Forms and Multipart Fileupload Issue

Someone at work had some luck with this approach from what I understand...

http://www.dooriented.com/blog/2008/04/23/wicket-ajax-like-file-upload-on-a-modal-window/


2010/3/10 Michał Letyński mletyn...@consol.pl:
 Is there a wicket version where it works ? I tried  with 1.4.6 and 1.4.7 but
 i get the same error which James got.
 My use case : I'm trying to submit a form via ajax to upload a file  inside
 modal window.
 After debug:
 FileUploadBase.isMultipartContent get false because

 if (contentType.toLowerCase().startsWith(MULTIPART))   - contentType =
 application/x-www-form-urlencoded

 James Carman pisze:

 You're trying to submit a form via ajax to upload a file?

 On Tue, Mar 9, 2010 at 4:26 PM, Corbin, James jcor...@iqnavigator.com
 wrote:


 This issue seems to pop up in our environment from time to time and
 trying to figure out how to fix it once and for all.

 We have a page with a form that pops up modal window with a form
 specified as well.

 When we try to submit, we get the following exception:

 java.lang.IllegalStateException: ServletRequest does not contain
 multipart content. One possible solution is to explicitly call
 Form.setMultipart(true), Wicket tries its best to auto-detect multipart
 forms but there are certain situation where it cannot.
 at
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:113)
 at
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:83)
 at
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
 at
 org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
 at
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
 at
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
 ...

 Setting Form.setMultipart(true) on either form has no affect.

 We are running Wicket Version 1.4.7.

 Is there a fix for this issue?

 Is this JIRA Issue related???
 https://issues.apache.org/jira/browse/WICKET-2749





 -
 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: Nested Forms and Multipart Fileupload Issue

2010-03-10 Thread James Carman
Perhaps it's in Wicket-stuff?  I don't know.

On Wed, Mar 10, 2010 at 1:19 PM, Corbin, James jcor...@iqnavigator.com wrote:
 Hmmm...I thought the Wicket Team already implemented something similar to 
 this into the framework some time ago.

 -Original Message-
 From: James Carman [mailto:jcar...@carmanconsulting.com]
 Sent: Wednesday, March 10, 2010 11:15 AM
 To: users@wicket.apache.org
 Subject: Re: Nested Forms and Multipart Fileupload Issue

 Someone at work had some luck with this approach from what I understand...

 http://www.dooriented.com/blog/2008/04/23/wicket-ajax-like-file-upload-on-a-modal-window/


 2010/3/10 Michał Letyński mletyn...@consol.pl:
 Is there a wicket version where it works ? I tried  with 1.4.6 and 1.4.7 but
 i get the same error which James got.
 My use case : I'm trying to submit a form via ajax to upload a file  inside
 modal window.
 After debug:
 FileUploadBase.isMultipartContent get false because

 if (contentType.toLowerCase().startsWith(MULTIPART))   - contentType =
 application/x-www-form-urlencoded

 James Carman pisze:

 You're trying to submit a form via ajax to upload a file?

 On Tue, Mar 9, 2010 at 4:26 PM, Corbin, James jcor...@iqnavigator.com
 wrote:


 This issue seems to pop up in our environment from time to time and
 trying to figure out how to fix it once and for all.

 We have a page with a form that pops up modal window with a form
 specified as well.

 When we try to submit, we get the following exception:

 java.lang.IllegalStateException: ServletRequest does not contain
 multipart content. One possible solution is to explicitly call
 Form.setMultipart(true), Wicket tries its best to auto-detect multipart
 forms but there are certain situation where it cannot.
 at
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:113)
 at
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:83)
 at
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
 at
 org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
 at
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
 at
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
 ...

 Setting Form.setMultipart(true) on either form has no affect.

 We are running Wicket Version 1.4.7.

 Is there a fix for this issue?

 Is this JIRA Issue related???
 https://issues.apache.org/jira/browse/WICKET-2749





 -
 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



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



Re: Nested Forms and Multipart Fileupload Issue

2010-03-10 Thread Jeremy Thomerson
No - there is support for submitting forms via ajax that contain file upload
fields - in the core of Wicket.  It was added near the beginning of 1.4
IIRC.  However, I'm not sure about this particular use case.  It sounds like
a bug.

Could you please create a quickstart, attach to a JIRA, and post the JIRA
link back here?  Then we can take a look.

Thanks

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



On Wed, Mar 10, 2010 at 12:21 PM, James Carman jcar...@carmanconsulting.com
 wrote:

 Perhaps it's in Wicket-stuff?  I don't know.

 On Wed, Mar 10, 2010 at 1:19 PM, Corbin, James jcor...@iqnavigator.com
 wrote:
  Hmmm...I thought the Wicket Team already implemented something similar to
 this into the framework some time ago.
 
  -Original Message-
  From: James Carman [mailto:jcar...@carmanconsulting.com]
  Sent: Wednesday, March 10, 2010 11:15 AM
  To: users@wicket.apache.org
  Subject: Re: Nested Forms and Multipart Fileupload Issue
 
  Someone at work had some luck with this approach from what I
 understand...
 
 
 http://www.dooriented.com/blog/2008/04/23/wicket-ajax-like-file-upload-on-a-modal-window/
 
 
  2010/3/10 Michał Letyński mletyn...@consol.pl:
  Is there a wicket version where it works ? I tried  with 1.4.6 and 1.4.7
 but
  i get the same error which James got.
  My use case : I'm trying to submit a form via ajax to upload a file
  inside
  modal window.
  After debug:
  FileUploadBase.isMultipartContent get false because
 
  if (contentType.toLowerCase().startsWith(MULTIPART))   - contentType =
  application/x-www-form-urlencoded
 
  James Carman pisze:
 
  You're trying to submit a form via ajax to upload a file?
 
  On Tue, Mar 9, 2010 at 4:26 PM, Corbin, James jcor...@iqnavigator.com
 
  wrote:
 
 
  This issue seems to pop up in our environment from time to time and
  trying to figure out how to fix it once and for all.
 
  We have a page with a form that pops up modal window with a form
  specified as well.
 
  When we try to submit, we get the following exception:
 
  java.lang.IllegalStateException: ServletRequest does not contain
  multipart content. One possible solution is to explicitly call
  Form.setMultipart(true), Wicket tries its best to auto-detect
 multipart
  forms but there are certain situation where it cannot.
  at
 
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:113)
  at
 
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:83)
  at
 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
  at
 
 org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
  at
 org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
  at
 
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
  at
 
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
  ...
 
  Setting Form.setMultipart(true) on either form has no affect.
 
  We are running Wicket Version 1.4.7.
 
  Is there a fix for this issue?
 
  Is this JIRA Issue related???
  https://issues.apache.org/jira/browse/WICKET-2749
 
 
 
 
 
  -
  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
 
 

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




Nested Forms and Multipart Fileupload Issue

2010-03-09 Thread Corbin, James
This issue seems to pop up in our environment from time to time and trying to 
figure out how to fix it once and for all.

We have a page with a form that pops up modal window with a form specified as 
well.

When we try to submit, we get the following exception:

java.lang.IllegalStateException: ServletRequest does not contain multipart 
content. One possible solution is to explicitly call Form.setMultipart(true), 
Wicket tries its best to auto-detect multipart forms but there are certain 
situation where it cannot.
at 
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:113)
at 
org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:83)
at 
org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
at 
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
...

Setting Form.setMultipart(true) on either form has no affect.

We are running Wicket Version 1.4.7.

Is there a fix for this issue?

Is this JIRA Issue related??? https://issues.apache.org/jira/browse/WICKET-2749




Re: Nested Forms and Multipart Fileupload Issue

2010-03-09 Thread James Carman
You're trying to submit a form via ajax to upload a file?

On Tue, Mar 9, 2010 at 4:26 PM, Corbin, James jcor...@iqnavigator.com wrote:
 This issue seems to pop up in our environment from time to time and trying to 
 figure out how to fix it once and for all.

 We have a page with a form that pops up modal window with a form specified as 
 well.

 When we try to submit, we get the following exception:

 java.lang.IllegalStateException: ServletRequest does not contain multipart 
 content. One possible solution is to explicitly call Form.setMultipart(true), 
 Wicket tries its best to auto-detect multipart forms but there are certain 
 situation where it cannot.
 at 
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:113)
 at 
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:83)
 at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
 at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
 at 
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
 at 
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
 ...

 Setting Form.setMultipart(true) on either form has no affect.

 We are running Wicket Version 1.4.7.

 Is there a fix for this issue?

 Is this JIRA Issue related??? 
 https://issues.apache.org/jira/browse/WICKET-2749




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



RE: Nested Forms and Multipart Fileupload Issue

2010-03-09 Thread Corbin, James
My submit action is on the modal popup which does NOT contain a FileUpload 
Field, but the form the modal is launched from does have a FileUpload field.

So, we have a page with a button added to a form that pops up a modal dialog 
that also defines a form.  This modal popup has a Submit button that does so 
via Ajax (e.g., AjaxButton).

Once we click the ajax submit button, we get the error below.


-Original Message-
From: James Carman [mailto:jcar...@carmanconsulting.com] 
Sent: Tuesday, March 09, 2010 2:30 PM
To: users@wicket.apache.org
Subject: Re: Nested Forms and Multipart Fileupload Issue

You're trying to submit a form via ajax to upload a file?

On Tue, Mar 9, 2010 at 4:26 PM, Corbin, James jcor...@iqnavigator.com wrote:
 This issue seems to pop up in our environment from time to time and trying to 
 figure out how to fix it once and for all.

 We have a page with a form that pops up modal window with a form specified as 
 well.

 When we try to submit, we get the following exception:

 java.lang.IllegalStateException: ServletRequest does not contain multipart 
 content. One possible solution is to explicitly call Form.setMultipart(true), 
 Wicket tries its best to auto-detect multipart forms but there are certain 
 situation where it cannot.
 at 
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:113)
 at 
 org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.init(MultipartServletWebRequest.java:83)
 at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:500)
 at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862)
 at 
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
 at 
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
 ...

 Setting Form.setMultipart(true) on either form has no affect.

 We are running Wicket Version 1.4.7.

 Is there a fix for this issue?

 Is this JIRA Issue related??? 
 https://issues.apache.org/jira/browse/WICKET-2749




-
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: Nested Forms

2010-02-20 Thread Charles Deal
Ok, then is the content found at these two pages not relevant for v1.4?
http://cwiki.apache.org/WICKET/nested-forms.html and
http://cwiki.apache.org/WICKET/conditional-validation.html

I understand the idea of nested forms and I understand that HTML only
supports one form.  I had hoped that Wicket would only process the submitted
form versus the entire form (whole form is submitted, only nested form
actually processed).  And from the content on the pages, I had thought it
was a more common use case.

My intent was to have a main form with various fields and then a grouping of
fields within a nested form.  This nested form was supposed to be submitted
using an AjaxSumitLink for the nsted form.  I suppose an alternative would
be to have a custom behavior that called serializeForm on the client and
then handled the component processing on its own.  The trick in that case
would be the FormValidators.

If you have a better idea, I'm all ears.  Thanks for the input.

On Fri, Feb 19, 2010 at 1:56 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 you cannot have an isolated embedded form, as far as html is
 concerned that is an oxymoron. you can try hacking around it with
 IFormVisitorParticipant or by overriding form.process() on your main
 form, etc. but i do not think this is a usecase we will support...

 -igor


 On Fri, Feb 19, 2010 at 10:09 AM, Charles Deal chuckdea...@gmail.com
 wrote:
  I'm sorry to bump this.  At the least, can anyone point me to some code
 that
  has successfully implemented isolated, nested forms using Wicket 1.4.x?
 
 
  On Wed, Feb 17, 2010 at 8:43 AM, Charles Deal 
 charles.d...@missionse.comwrote:
 
  I am attempting to put an isolated form within the main form of my page.
  I
  found http://cwiki.apache.org/WICKET/nested-forms.html which was
 helpful
  in understanding how the processing works.  I was even more excited when
 I
  found http://cwiki.apache.org/WICKET/conditional-validation.html which
  instructed me exactly how to alter the form object to do what I wanted.
   Unfortunately, the trick does not work as I expected it to.
 
  It seems that if I simply implement
  IFormVisitorParticipant.processChildren, it is not enough to stop the
 Nested
  form's FormValidator from firing when the main form is submitted.
   Therefore, I tried to implement the isEnabled technique.  This did have
 the
  desired effect the first time through a page (enter data, submit main,
 no
  nested validator fires) but when the page re-renders after the submit,
 the
  nested form is now disabled!  It seems that the findSubmittingButton()
  method finds the button that was used to submit the form, even though
 the
  page is rendering again.
 
  Another thing I noticed upon my different attempts is that altering the
  isEnabled method to use findSubmittingButton() won't work because
  findSubmittingButton() calls isEnabled()! which puts the code in an
 infinite
  loop.
 
  Could someone please enlighten me on how to code an isolated nested form
  using Wicket 1.4.x.  Where isolated means that I want the form to have
 its
  own submit button and those fields are only
 submitted/processed/validated
  when that button is clicked.  I want the form to be ignored by the
 parent
  form.
 
 
  
  This is a PRIVATE message. If you are not the intended recipient, please
  delete without copying and kindly advise us by e-mail of the mistake in
  delivery.
  NOTE: Regardless of content, this e-mail shall not operate to bind MSE
 to
  any order or other contract unless pursuant to explicit written
 agreement or
  government initiative expressly permitting the use of e-mail for such
  purpose.
 
 

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




Re: Nested Forms

2010-02-20 Thread Igor Vaynberg
if you press the submit button inside the embedded form - then only
the embedded form is processed. but, if you press a submit button
inside the outer form then it and all its embedded forms are
processed.

-igor

On Sat, Feb 20, 2010 at 6:41 PM, Charles Deal chuckdea...@gmail.com wrote:
 Ok, then is the content found at these two pages not relevant for v1.4?
 http://cwiki.apache.org/WICKET/nested-forms.html and
 http://cwiki.apache.org/WICKET/conditional-validation.html

 I understand the idea of nested forms and I understand that HTML only
 supports one form.  I had hoped that Wicket would only process the submitted
 form versus the entire form (whole form is submitted, only nested form
 actually processed).  And from the content on the pages, I had thought it
 was a more common use case.

 My intent was to have a main form with various fields and then a grouping of
 fields within a nested form.  This nested form was supposed to be submitted
 using an AjaxSumitLink for the nsted form.  I suppose an alternative would
 be to have a custom behavior that called serializeForm on the client and
 then handled the component processing on its own.  The trick in that case
 would be the FormValidators.

 If you have a better idea, I'm all ears.  Thanks for the input.

 On Fri, Feb 19, 2010 at 1:56 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 you cannot have an isolated embedded form, as far as html is
 concerned that is an oxymoron. you can try hacking around it with
 IFormVisitorParticipant or by overriding form.process() on your main
 form, etc. but i do not think this is a usecase we will support...

 -igor


 On Fri, Feb 19, 2010 at 10:09 AM, Charles Deal chuckdea...@gmail.com
 wrote:
  I'm sorry to bump this.  At the least, can anyone point me to some code
 that
  has successfully implemented isolated, nested forms using Wicket 1.4.x?
 
 
  On Wed, Feb 17, 2010 at 8:43 AM, Charles Deal 
 charles.d...@missionse.comwrote:
 
  I am attempting to put an isolated form within the main form of my page.
  I
  found http://cwiki.apache.org/WICKET/nested-forms.html which was
 helpful
  in understanding how the processing works.  I was even more excited when
 I
  found http://cwiki.apache.org/WICKET/conditional-validation.html which
  instructed me exactly how to alter the form object to do what I wanted.
   Unfortunately, the trick does not work as I expected it to.
 
  It seems that if I simply implement
  IFormVisitorParticipant.processChildren, it is not enough to stop the
 Nested
  form's FormValidator from firing when the main form is submitted.
   Therefore, I tried to implement the isEnabled technique.  This did have
 the
  desired effect the first time through a page (enter data, submit main,
 no
  nested validator fires) but when the page re-renders after the submit,
 the
  nested form is now disabled!  It seems that the findSubmittingButton()
  method finds the button that was used to submit the form, even though
 the
  page is rendering again.
 
  Another thing I noticed upon my different attempts is that altering the
  isEnabled method to use findSubmittingButton() won't work because
  findSubmittingButton() calls isEnabled()! which puts the code in an
 infinite
  loop.
 
  Could someone please enlighten me on how to code an isolated nested form
  using Wicket 1.4.x.  Where isolated means that I want the form to have
 its
  own submit button and those fields are only
 submitted/processed/validated
  when that button is clicked.  I want the form to be ignored by the
 parent
  form.
 
 
  
  This is a PRIVATE message. If you are not the intended recipient, please
  delete without copying and kindly advise us by e-mail of the mistake in
  delivery.
  NOTE: Regardless of content, this e-mail shall not operate to bind MSE
 to
  any order or other contract unless pursuant to explicit written
 agreement or
  government initiative expressly permitting the use of e-mail for such
  purpose.
 
 

 -
 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: Nested Forms

2010-02-19 Thread Charles Deal
I'm sorry to bump this.  At the least, can anyone point me to some code that
has successfully implemented isolated, nested forms using Wicket 1.4.x?


On Wed, Feb 17, 2010 at 8:43 AM, Charles Deal charles.d...@missionse.comwrote:

 I am attempting to put an isolated form within the main form of my page.  I
 found http://cwiki.apache.org/WICKET/nested-forms.html which was helpful
 in understanding how the processing works.  I was even more excited when I
 found http://cwiki.apache.org/WICKET/conditional-validation.html which
 instructed me exactly how to alter the form object to do what I wanted.
  Unfortunately, the trick does not work as I expected it to.

 It seems that if I simply implement
 IFormVisitorParticipant.processChildren, it is not enough to stop the Nested
 form's FormValidator from firing when the main form is submitted.
  Therefore, I tried to implement the isEnabled technique.  This did have the
 desired effect the first time through a page (enter data, submit main, no
 nested validator fires) but when the page re-renders after the submit, the
 nested form is now disabled!  It seems that the findSubmittingButton()
 method finds the button that was used to submit the form, even though the
 page is rendering again.

 Another thing I noticed upon my different attempts is that altering the
 isEnabled method to use findSubmittingButton() won't work because
 findSubmittingButton() calls isEnabled()! which puts the code in an infinite
 loop.

 Could someone please enlighten me on how to code an isolated nested form
 using Wicket 1.4.x.  Where isolated means that I want the form to have its
 own submit button and those fields are only submitted/processed/validated
 when that button is clicked.  I want the form to be ignored by the parent
 form.


 
 This is a PRIVATE message. If you are not the intended recipient, please
 delete without copying and kindly advise us by e-mail of the mistake in
 delivery.
 NOTE: Regardless of content, this e-mail shall not operate to bind MSE to
 any order or other contract unless pursuant to explicit written agreement or
 government initiative expressly permitting the use of e-mail for such
 purpose.



Re: Nested Forms

2010-02-19 Thread Igor Vaynberg
you cannot have an isolated embedded form, as far as html is
concerned that is an oxymoron. you can try hacking around it with
IFormVisitorParticipant or by overriding form.process() on your main
form, etc. but i do not think this is a usecase we will support...

-igor


On Fri, Feb 19, 2010 at 10:09 AM, Charles Deal chuckdea...@gmail.com wrote:
 I'm sorry to bump this.  At the least, can anyone point me to some code that
 has successfully implemented isolated, nested forms using Wicket 1.4.x?


 On Wed, Feb 17, 2010 at 8:43 AM, Charles Deal 
 charles.d...@missionse.comwrote:

 I am attempting to put an isolated form within the main form of my page.  I
 found http://cwiki.apache.org/WICKET/nested-forms.html which was helpful
 in understanding how the processing works.  I was even more excited when I
 found http://cwiki.apache.org/WICKET/conditional-validation.html which
 instructed me exactly how to alter the form object to do what I wanted.
  Unfortunately, the trick does not work as I expected it to.

 It seems that if I simply implement
 IFormVisitorParticipant.processChildren, it is not enough to stop the Nested
 form's FormValidator from firing when the main form is submitted.
  Therefore, I tried to implement the isEnabled technique.  This did have the
 desired effect the first time through a page (enter data, submit main, no
 nested validator fires) but when the page re-renders after the submit, the
 nested form is now disabled!  It seems that the findSubmittingButton()
 method finds the button that was used to submit the form, even though the
 page is rendering again.

 Another thing I noticed upon my different attempts is that altering the
 isEnabled method to use findSubmittingButton() won't work because
 findSubmittingButton() calls isEnabled()! which puts the code in an infinite
 loop.

 Could someone please enlighten me on how to code an isolated nested form
 using Wicket 1.4.x.  Where isolated means that I want the form to have its
 own submit button and those fields are only submitted/processed/validated
 when that button is clicked.  I want the form to be ignored by the parent
 form.


 
 This is a PRIVATE message. If you are not the intended recipient, please
 delete without copying and kindly advise us by e-mail of the mistake in
 delivery.
 NOTE: Regardless of content, this e-mail shall not operate to bind MSE to
 any order or other contract unless pursuant to explicit written agreement or
 government initiative expressly permitting the use of e-mail for such
 purpose.



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



Nested Forms

2010-02-17 Thread Charles Deal
I am attempting to put an isolated form within the main form of my page.  I 
found http://cwiki.apache.org/WICKET/nested-forms.html which was helpful in 
understanding how the processing works.  I was even more excited when I found 
http://cwiki.apache.org/WICKET/conditional-validation.html which instructed me 
exactly how to alter the form object to do what I wanted.  Unfortunately, the 
trick does not work as I expected it to.

It seems that if I simply implement IFormVisitorParticipant.processChildren, it 
is not enough to stop the Nested form's FormValidator from firing when the main 
form is submitted.  Therefore, I tried to implement the isEnabled technique.  
This did have the desired effect the first time through a page (enter data, 
submit main, no nested validator fires) but when the page re-renders after the 
submit, the nested form is now disabled!  It seems that the 
findSubmittingButton() method finds the button that was used to submit the 
form, even though the page is rendering again.

Another thing I noticed upon my different attempts is that altering the 
isEnabled method to use findSubmittingButton() won't work because 
findSubmittingButton() calls isEnabled()! which puts the code in an infinite 
loop.

Could someone please enlighten me on how to code an isolated nested form using 
Wicket 1.4.x.  Where isolated means that I want the form to have its own submit 
button and those fields are only submitted/processed/validated when that button 
is clicked.  I want the form to be ignored by the parent form.



This is a PRIVATE message. If you are not the intended recipient, please delete 
without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any 
order or other contract unless pursuant to explicit written agreement or 
government initiative expressly permitting the use of e-mail for such purpose.


Re: nested forms onSubmit

2010-01-31 Thread Martijn Dashorst
VisitChildren(Form.class, )

Martijn

On Friday, January 29, 2010, Dave Kallstrom dave.kallst...@gmail.com wrote:
 Hi,
 Is there anyway to notify nested forms that they are being submitted?  The
 onSubmit method of nested forms do not get called when the parent form is
 submitted.
 I tried implementing IFormSubmitListener but that didn't seem to help.

 --
 Dave Kallstrom


-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

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



  1   2   >