Re: onSubmit method and validators

2010-11-10 Thread Jeremy Thomerson
and here (although it is out of date and I hope to update it soon):
http://www.jeremythomerson.com/blog/2008/11/wicket-quickstart-tutorial/

On Wed, Nov 10, 2010 at 5:27 PM, Pedro Santos  wrote:

> I mean: http://wicket.apache.org/help/
>
> On Wed, Nov 10, 2010 at 2:55 PM, Pedro Santos  wrote:
>
> > There are good information at
> > http://wicket.apache.org/contribute/patch.html
> >
> >
> > On Wed, Nov 10, 2010 at 5:49 PM, Henrique  wrote:
> >
> >> No problem...I'll keep for a little while and if it persists I can
> >> fill a ticket.
> >> What's the URL for wicket's jira?
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Pedro Henrique Oliveira dos Santos
> >
>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>



-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*


Re: onSubmit method and validators

2010-11-10 Thread Pedro Santos
I mean: http://wicket.apache.org/help/

On Wed, Nov 10, 2010 at 2:55 PM, Pedro Santos  wrote:

> There are good information at
> http://wicket.apache.org/contribute/patch.html
>
>
> On Wed, Nov 10, 2010 at 5:49 PM, Henrique  wrote:
>
>> No problem...I'll keep for a little while and if it persists I can
>> fill a ticket.
>> What's the URL for wicket's jira?
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>



-- 
Pedro Henrique Oliveira dos Santos


Re: onSubmit method and validators

2010-11-10 Thread Pedro Santos
There are good information at http://wicket.apache.org/contribute/patch.html

On Wed, Nov 10, 2010 at 5:49 PM, Henrique  wrote:

> No problem...I'll keep for a little while and if it persists I can
> fill a ticket.
> What's the URL for wicket's jira?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos


Re: onSubmit method and validators

2010-11-10 Thread Henrique
No problem...I'll keep for a little while and if it persists I can
fill a ticket.
What's the URL for wicket's jira?

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



Re: onSubmit method and validators

2010-11-10 Thread Pedro Santos
If you don't solve your problem, do you mind to fill an ticket on JIRA with
an quickstart demonstrating the problem?

On Wed, Nov 10, 2010 at 5:17 PM, Henrique  wrote:

> Yes, even in what would be the "second" submit, with all the right
> input entered.
>
> It's as if the form just stopped responding, onsSubmit is never called
> ever again, just onError time after time.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos


Re: onSubmit method and validators

2010-11-10 Thread Henrique
Yes, even in what would be the "second" submit, with all the right
input entered.

It's as if the form just stopped responding, onsSubmit is never called
ever again, just onError time after time.

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



Re: onSubmit method and validators

2010-11-10 Thread Pedro Santos
On Wed, Nov 10, 2010 at 12:03 PM, Henrique  wrote:

> The business logic is a simple access to a DAO to save what the user
> has entered into the form, like so:
>
>   public void onSubmit() {
>
>   Item item = (Item)getModelObject();
>
>   User user = UserLoggedInSession.get().getUser();
>   item.setUser(user);
>   item.setCategory(selectedCategory);
>   item.setTimestamp(new DateTime());
>   item.setActive(true);
>
>   ItemDAO.persist(item);
>   setResponsePage(UserHomePage.class);
>   }
>
> Isn't this the logical place to put this code?
> Once the user leaves out a certain input, onError() is called and
> onSubmit() never gets called again.
>

even in the some next form submit with no validations errors?


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


-- 
Pedro Henrique Oliveira dos Santos


Re: onSubmit method and validators

2010-11-10 Thread Henrique
This seems like a pretty basic thing to do, and since Wicket gives us
lots of validators to use, I would hate to have to manually validate
each input in the onSubmit method.

Am I the only one having this problem?

Thanks!

On Wed, Nov 10, 2010 at 11:33 AM, Henrique  wrote:
> Could it have something to do with the fact that I am using a
> CompoundPropoertyModel?
> I can't think of a simpler example, here is the code:
>
> public class PublishItem extends WebPage {
>
>       private AddItemForm form;
>
>       public PublishItem() {
>
>               form = new AddItemForm("addItemForm");
>               add(form);
>
>               add(new FeedbackPanel("feedback"));
>       }
>
>       public final class AddItemForm extends Form {
>
>               private RequiredTextField title;
>
>               public AddItemForm(final String componentName) {
>
>                       super(componentName, new
> CompoundPropertyModel(new Item()));
>                       add(new RequiredTextField("title"));
>               }
>
>               public void onSubmit() {
>
>                       Item item = (Item)getModelObject();
>
>                       User user = UserLoggedInSession.get().getUser();
>                       item.setUser(user);
>
>                       ItemDAO.persist(item);
>               }
>       }
> }
>



-- 
Henrique Boregio

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



Re: onSubmit method and validators

2010-11-10 Thread Henrique
Could it have something to do with the fact that I am using a
CompoundPropoertyModel?
I can't think of a simpler example, here is the code:

public class PublishItem extends WebPage {

   private AddItemForm form;

   public PublishItem() {

   form = new AddItemForm("addItemForm");
   add(form);

   add(new FeedbackPanel("feedback"));
   }

   public final class AddItemForm extends Form {

   private RequiredTextField title;

   public AddItemForm(final String componentName) {

   super(componentName, new
CompoundPropertyModel(new Item()));
   add(new RequiredTextField("title"));
   }

   public void onSubmit() {

   Item item = (Item)getModelObject();

   User user = UserLoggedInSession.get().getUser();
   item.setUser(user);

   ItemDAO.persist(item);
   }
   }
}

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



RE: onSubmit method and validators

2010-11-10 Thread Henrique
The business logic is a simple access to a DAO to save what the user
has entered into the form, like so:

   public void onSubmit() {

   Item item = (Item)getModelObject();

   User user = UserLoggedInSession.get().getUser();
   item.setUser(user);
   item.setCategory(selectedCategory);
   item.setTimestamp(new DateTime());
   item.setActive(true);

   ItemDAO.persist(item);
   setResponsePage(UserHomePage.class);
   }

Isn't this the logical place to put this code?
Once the user leaves out a certain input, onError() is called and
onSubmit() never gets called again.

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