basic problem of using wicket

2009-12-06 Thread maven apache
Hi:
I have reffered the wicket wiki and the faq but some problem still exist.So
I ask for help.
1) the page jump.
For example in a user login page, after the submit button are clicked I want
user jump to success page or error page.
So how to ?
In my login page:
public class LoginPage extends WebPage{
  ...
  add(new LoginForm("loginForm"))
}

public class LoginForm .{
TextField nameText=new TextField("name");
TextField passText=new TextField("pass");  //how to make a password
textfield to hind the char user entering?
public void onSubmit() {
   /// here how to add listener to the submitButton to jump?
}
//   Button submitButton=new Button("submit");   / do I need to specify
a submit button?(make the wicket know that "this is a submit button,when
clicked,you should do something?)
add(nameText);
add(ageText);
}


2) when to use wicket tag
That to say if I want to show some message, I can write it in the html or
create a label in java source.
Take the above page for example, the textfield can be also defined in the
html element like:
, and the submit button can be 
What I mean is when to use the wicket and when to use the html element ?


Re: Location of html files

2009-12-05 Thread maven apache
http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html
See
 the above page.
Also I think it is a little complex for costuming the location of resources.

2009/12/6 Johan den Boer 

>
> Hi,
>
> I not like my html files / css files / images are all locates in the same
> package but seperated in directories i.e.
>
> html files goto  ../html
> css files go to  ../css
> images go to   ../images
>
> why is this not possible
>
> johan
>
>
> Marat Radchenko-2 wrote:
> >
> > With custom IResourceFinder, you can put them wherever you want. But
> > why? You should have a strong reason to not follow defaults.
> >
> > 2009/12/6, Johan den Boer :
> >> Hi,
> >>
> >>  I place my html files in the same package where my java classes
> resides.
> >> Is
> >>  it possible to change this. I want to place my html files in the
> >>  WEB-INF/page directory
> >>
> >>  --
> >>  thanks a lot,
> >>
> >>
> >>  Johan den Boer
> >>
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Location-of-html-files-tp26662782p26662799.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: the version of wicket1.4 and 1.3

2009-11-18 Thread maven apache
2009/11/18 Pieter Degraeuwe 

> Don't want to be rude; did you import the correct types (Component / Form)
>
I think so , since I can new a Form object, but  can not use the add
method.

> ?... some IDE's have the 'exclude import' funtionallity, which is great
> (don't want to mention its name, but it starts wich Intelli, and ends with
> J
> :-) --> I'm loving it :-)
>
> Pieter
>
> On Wed, Nov 18, 2009 at 4:07 PM, Igor Vaynberg  >wrote:
>
> > you need to tweak your ide to enable java5 functionality i think.
> >
> > -igor
> >
> >
> > On Wed, Nov 18, 2009 at 5:26 AM, maven apache 
> > wrote:
> > > I create a class Loginpage which extends WebPage,how the IDE show me
> many
> > > errors when I use wicket 1.4 :
> > >
> > > public LoginPage() {
> > > User user = new User();
> > > Form logForm = new Form("form", new CompoundPropertyModel(user)) {
> > >
> > > protected void onSubmit() {
> > >
> > > }
> > >
> > > };
> > > logForm.setMultiPart(true);
> > > logForm.setMaxSize(Bytes.kilobytes(1000));
> > >
> > > add(logForm);   Here it says :"The method add(Component[])
> in
> > > the type MarkupContainer is not applicable for the arguments (Form)"
> > >
> > > TextField accountTextfield = new TextField("account");
> > >
> > > logForm.add(accountTextfield); / here It says:"The method
> > > add(IFormValidator) in the type Form is not applicable for the
> arguments
> > > (TextField)"
> > > }
> > >
> > > Why?
> > >
> > > Since I did not got the errors when I use wicket-1.3.
> > >
> > > BTW, is the class DatePicker deprecated?
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Pieter Degraeuwe
> Systemworks bvba
> Belgiƫlaan 61
> 9070 Destelbergen
> GSM: +32 (0)485/68.60.85
> Email: pieter.degrae...@systemworks.be
> visit us at http://www.systemworks.be
>


Re: the version of wicket1.4 and 1.3

2009-11-18 Thread maven apache
2009/11/18 Igor Vaynberg 

> you need to tweak your ide to enable java5 functionality i think.
>
In fact The jre library I add is jdk1.6

>
> -igor
>
>
> On Wed, Nov 18, 2009 at 5:26 AM, maven apache 
> wrote:
> > I create a class Loginpage which extends WebPage,how the IDE show me many
> > errors when I use wicket 1.4 :
> >
> > public LoginPage() {
> > User user = new User();
> > Form logForm = new Form("form", new CompoundPropertyModel(user)) {
> >
> > protected void onSubmit() {
> >
> > }
> >
> > };
> > logForm.setMultiPart(true);
> > logForm.setMaxSize(Bytes.kilobytes(1000));
> >
> > add(logForm);   Here it says :"The method add(Component[]) in
> > the type MarkupContainer is not applicable for the arguments (Form)"
> >
> > TextField accountTextfield = new TextField("account");
> >
> > logForm.add(accountTextfield); / here It says:"The method
> > add(IFormValidator) in the type Form is not applicable for the arguments
> > (TextField)"
> > }
> >
> > Why?
> >
> > Since I did not got the errors when I use wicket-1.3.
> >
> > BTW, is the class DatePicker deprecated?
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


the version of wicket1.4 and 1.3

2009-11-18 Thread maven apache
I create a class Loginpage which extends WebPage,how the IDE show me many
errors when I use wicket 1.4 :

public LoginPage() {
User user = new User();
Form logForm = new Form("form", new CompoundPropertyModel(user)) {

protected void onSubmit() {

}

};
logForm.setMultiPart(true);
logForm.setMaxSize(Bytes.kilobytes(1000));

add(logForm);   Here it says :"The method add(Component[]) in
the type MarkupContainer is not applicable for the arguments (Form)"

TextField accountTextfield = new TextField("account");

logForm.add(accountTextfield); / here It says:"The method
add(IFormValidator) in the type Form is not applicable for the arguments
(TextField)"
}

Why?

Since I did not got the errors when I use wicket-1.3.

BTW, is the class DatePicker deprecated?


web projct of wicket can be changed to swing?

2009-11-17 Thread maven apache
Hi:
There is a web project which uses the wicket framework as present tier ,can
I change them to swing?