You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by maven apache <ap...@gmail.com> on 2009/11/18 14:26:31 UTC

the version of wicket1.4 and 1.3

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?

Re: the version of wicket1.4 and 1.3

Posted by Per Newgro <pe...@gmx.ch>.
If you use eclipse you're not done by using the jdk5 or >.
There is an attribute in compiler settings where you can set the project 
layout.
That is 1.4 by default. But should be set to 1.5 or >.

Cheers
Per

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


Re: the version of wicket1.4 and 1.3

Posted by maven apache <ap...@gmail.com>.
2009/11/18 Igor Vaynberg <ig...@gmail.com>

> 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 <ap...@gmail.com>
> 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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: the version of wicket1.4 and 1.3

Posted by maven apache <ap...@gmail.com>.
2009/11/18 Pieter Degraeuwe <pi...@systemworks.be>

> 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 <igor.vaynberg@gmail.com
> >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 <ap...@gmail.com>
> > 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-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
> --
> Pieter Degraeuwe
> Systemworks bvba
> Belgiëlaan 61
> 9070 Destelbergen
> GSM: +32 (0)485/68.60.85
> Email: pieter.degraeuwe@systemworks.be
> visit us at http://www.systemworks.be
>

Re: the version of wicket1.4 and 1.3

Posted by Pieter Degraeuwe <pi...@systemworks.be>.
Don't want to be rude; did you import the correct types (Component / Form)
?... 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 <ig...@gmail.com>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 <ap...@gmail.com>
> 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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Pieter Degraeuwe
Systemworks bvba
Belgiëlaan 61
9070 Destelbergen
GSM: +32 (0)485/68.60.85
Email: pieter.degraeuwe@systemworks.be
visit us at http://www.systemworks.be

Re: the version of wicket1.4 and 1.3

Posted by Igor Vaynberg <ig...@gmail.com>.
you need to tweak your ide to enable java5 functionality i think.

-igor


On Wed, Nov 18, 2009 at 5:26 AM, maven apache <ap...@gmail.com> 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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org