Re: setEscapeModelStrings to false as default

2008-03-20 Thread Erik van Oosten
Create a new component as a subclass of the component in question
(Label). In the constructor you call setEscape...(false). From then on,
only use the new subclass.

But before you do so, read the other responses :)

Regards,
Erik.


Marco Aurélio Silva schreef:
> Hi all
>
> Is there a way to set EscapeModelStrings to false in a global way (to all
> components)? I'm having problems with this. If the size of a column on
> database is 20, and the user fill 20 characters on this field and one
> character is, for example, ">", wicket will convert it to '>'  and when
> try to save the field will have more than 20 characters. I just don't want
> to call setEscapeModelStrings(false) for every text field on my
> application
>
>
> Thank you
> Marco
>
>   

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Display selected items in check boxes.

2008-03-20 Thread Maurice Marrink
Try item.add(new CheckBox("checkbox", new
PropertyModel(item.getModel(),"selected")));
Also data.setReuseItem(true) might help.

Maurice

On Thu, Mar 20, 2008 at 7:30 AM, tsuresh <[EMAIL PROTECTED]> wrote:
>
>   Hello wicketeers,
>  I have sectors which contains subsectors. subsectors contains the selected
>  as boolean and name of subsector. When a sector is selected, I need to
>  display the list of sub sectors and the check box checked/unchecked
>  according to it stored in database. I did this as the code below. The
>  problem is that I can't edit the list again. For example if Sector 1 has two
>  subsectors   sectorA (checked) and sectorB unchecked. When I edit this i.e
>  check both sub sectors, the result is blank. I know I am missing something.
>  Please help.
>
>
>public SubSectorPanel(String id, Sector s) {
> super(id);
> subSectorList = s.getSubSectors();
>
>
>ListView data = new ListView("rows", subSectorList) {
>
> public void populateItem(final ListItem item) {
>SubSector ses = (SubSector) item.getModelObject();
>   item.add(new CheckBox("checkbox", new PropertyModel(ses,
>  "selected")));
> item.add(new Label("name", ses.getName()));
> }
> };
>   Form form = new Form("addform") {
>
> protected void onSubmit() {
> // how to get selected items here?
>
> }
> };
>  form.add(data);
>
>  thanks
>  --
>  View this message in context: 
> http://www.nabble.com/Display-selected-items-in-check-boxes.-tp16172677p16172677.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



"Multiple panels" like behaviour

2008-03-20 Thread Cristi Manole
Hello,

I've searched the web and I see there are a lot of hits for what I'm looking
for but I cannot quite pinpoint the perfect solution (easiest) for this
simple thing.

What I need is to be able to "extend" a base page and put into some places
some extra panels. I designed the places in the base page.

For only one panel, I can use  tag. If I need more than one
panel inserted, how do I do that?

Thanks,
Cristi Manole


Re: "Multiple panels" like behaviour

2008-03-20 Thread Gerolf Seitz
you can provide factory methods in your base page like
protected abstract Component newHeader(String id, IModel model);

in the constructor of base page do:
add(newHeader("header", someModelOrNull));

and just override/implement the factory method in your concrete page
classes.

hth,
  Gerolf

On Thu, Mar 20, 2008 at 9:25 AM, Cristi Manole <[EMAIL PROTECTED]>
wrote:

> Hello,
>
> I've searched the web and I see there are a lot of hits for what I'm
> looking
> for but I cannot quite pinpoint the perfect solution (easiest) for this
> simple thing.
>
> What I need is to be able to "extend" a base page and put into some places
> some extra panels. I designed the places in the base page.
>
> For only one panel, I can use  tag. If I need more than one
> panel inserted, how do I do that?
>
> Thanks,
> Cristi Manole
>


Re: "Multiple panels" like behaviour

2008-03-20 Thread Johan Compagner
This is planned for the next release (not the genrerics only release
if that will be the 1.4)

On 3/20/08, Cristi Manole <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've searched the web and I see there are a lot of hits for what I'm looking
> for but I cannot quite pinpoint the perfect solution (easiest) for this
> simple thing.
>
> What I need is to be able to "extend" a base page and put into some places
> some extra panels. I designed the places in the base page.
>
> For only one panel, I can use  tag. If I need more than one
> panel inserted, how do I do that?
>
> Thanks,
> Cristi Manole
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: "Multiple panels" like behaviour

2008-03-20 Thread Sebastiaan van Erk

Gerolf Seitz wrote:
> you can provide factory methods in your base page like
> protected abstract Component newHeader(String id, IModel model);
>
> in the constructor of base page do:
> add(newHeader("header", someModelOrNull));
>
> and just override/implement the factory method in your concrete page
> classes.
>
> hth,
>   Gerolf


I'll be so happy when multiple child is implemented, because I really 
think this is an anti-pattern.


Basically, in the constructor of the base page you call an overridable 
method, which is terrible. For example you have in your subclass:


public class MySubClass extends MyBaseClass {

// my fields
public int answer = 42;

public MySubClass(int suppliedAnswer) {
// implicit (or explicity call to super)
super();

// init class state and establish class invariants
// this stuff could be really complicated!
if (suppliedAnswer != -1) {
answer = suppliedAnswer;
}
}

@Override
public Component getUniverseComponent(String id) {
// create universe component using state of this class
// the structure of this component could depend on this
// the component could even depend on constructor
// args that the base class knows nothing about (as
// is the case now).
if (answer == 42) {
return new HHGTGPanel(id);
}
return new Label(id, String.valueOf(answer));
}

}

The problem is that getUniverseComponent gets called from the base class 
before the constructor of the subclass gets evaluated. :-( This means 
that the = 42 assignment has not been done yet, nor the override of the 
value with the value from the constructor arg. The (partial) workaround 
I've used (a special private init method and initialized flag) is just 
plain ugly (and partial, since you still can't use your constructor args).


Regards,
Sebastiaan




On Thu, Mar 20, 2008 at 9:25 AM, Cristi Manole <[EMAIL PROTECTED]>
wrote:


Hello,

I've searched the web and I see there are a lot of hits for what I'm
looking
for but I cannot quite pinpoint the perfect solution (easiest) for this
simple thing.

What I need is to be able to "extend" a base page and put into some places
some extra panels. I designed the places in the base page.

For only one panel, I can use  tag. If I need more than one
panel inserted, how do I do that?

Thanks,
Cristi Manole





smime.p7s
Description: S/MIME Cryptographic Signature


Re: "Multiple panels" like behaviour

2008-03-20 Thread Gerolf Seitz
i agree with you. i had to fight similar problems and came up with
similar (ugly) work arounds.
let's see how the post-1.4 solution works out ;)

  Gerolf

On Thu, Mar 20, 2008 at 10:12 AM, Sebastiaan van Erk <[EMAIL PROTECTED]>
wrote:

> Gerolf Seitz wrote:
>  > you can provide factory methods in your base page like
>  > protected abstract Component newHeader(String id, IModel model);
>  >
>  > in the constructor of base page do:
>  > add(newHeader("header", someModelOrNull));
>  >
>  > and just override/implement the factory method in your concrete page
>  > classes.
>  >
>  > hth,
>  >   Gerolf
>
>
> I'll be so happy when multiple child is implemented, because I really
> think this is an anti-pattern.
>
> Basically, in the constructor of the base page you call an overridable
> method, which is terrible. For example you have in your subclass:
>
> public class MySubClass extends MyBaseClass {
>
>// my fields
>public int answer = 42;
>
>public MySubClass(int suppliedAnswer) {
>// implicit (or explicity call to super)
>super();
>
>// init class state and establish class invariants
>// this stuff could be really complicated!
>if (suppliedAnswer != -1) {
>answer = suppliedAnswer;
>}
>}
>
>@Override
>public Component getUniverseComponent(String id) {
>// create universe component using state of this class
>// the structure of this component could depend on this
>// the component could even depend on constructor
>// args that the base class knows nothing about (as
>// is the case now).
>if (answer == 42) {
>return new HHGTGPanel(id);
>}
>return new Label(id, String.valueOf(answer));
>}
>
> }
>
> The problem is that getUniverseComponent gets called from the base class
> before the constructor of the subclass gets evaluated. :-( This means
> that the = 42 assignment has not been done yet, nor the override of the
> value with the value from the constructor arg. The (partial) workaround
> I've used (a special private init method and initialized flag) is just
> plain ugly (and partial, since you still can't use your constructor args).
>
> Regards,
> Sebastiaan
>
>
> >
> > On Thu, Mar 20, 2008 at 9:25 AM, Cristi Manole <[EMAIL PROTECTED]>
> > wrote:
> >
> >> Hello,
> >>
> >> I've searched the web and I see there are a lot of hits for what I'm
> >> looking
> >> for but I cannot quite pinpoint the perfect solution (easiest) for this
> >> simple thing.
> >>
> >> What I need is to be able to "extend" a base page and put into some
> places
> >> some extra panels. I designed the places in the base page.
> >>
> >> For only one panel, I can use  tag. If I need more than
> one
> >> panel inserted, how do I do that?
> >>
> >> Thanks,
> >> Cristi Manole
> >>
> >
>


Re: "Multiple panels" like behaviour

2008-03-20 Thread Igor Vaynberg
the "workaround" is quiet easy

class mypage extends webpage {
  onbeforerender() {
  if (get("panel1")==null) {
add(newPanel1("panel1"));
  }
  super.onbeforerender();
   }
}

-igor


On Thu, Mar 20, 2008 at 2:12 AM, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
> Gerolf Seitz wrote:
>   > you can provide factory methods in your base page like
>   > protected abstract Component newHeader(String id, IModel model);
>   >
>   > in the constructor of base page do:
>   > add(newHeader("header", someModelOrNull));
>   >
>   > and just override/implement the factory method in your concrete page
>   > classes.
>   >
>   > hth,
>   >   Gerolf
>
>
>  I'll be so happy when multiple child is implemented, because I really
>  think this is an anti-pattern.
>
>  Basically, in the constructor of the base page you call an overridable
>  method, which is terrible. For example you have in your subclass:
>
>  public class MySubClass extends MyBaseClass {
>
> // my fields
> public int answer = 42;
>
> public MySubClass(int suppliedAnswer) {
> // implicit (or explicity call to super)
> super();
>
> // init class state and establish class invariants
> // this stuff could be really complicated!
> if (suppliedAnswer != -1) {
> answer = suppliedAnswer;
> }
> }
>
> @Override
> public Component getUniverseComponent(String id) {
> // create universe component using state of this class
> // the structure of this component could depend on this
> // the component could even depend on constructor
> // args that the base class knows nothing about (as
> // is the case now).
> if (answer == 42) {
> return new HHGTGPanel(id);
> }
> return new Label(id, String.valueOf(answer));
> }
>
>  }
>
>  The problem is that getUniverseComponent gets called from the base class
>  before the constructor of the subclass gets evaluated. :-( This means
>  that the = 42 assignment has not been done yet, nor the override of the
>  value with the value from the constructor arg. The (partial) workaround
>  I've used (a special private init method and initialized flag) is just
>  plain ugly (and partial, since you still can't use your constructor args).
>
>  Regards,
>  Sebastiaan
>
>
>
>
>  >
>  > On Thu, Mar 20, 2008 at 9:25 AM, Cristi Manole <[EMAIL PROTECTED]>
>  > wrote:
>  >
>  >> Hello,
>  >>
>  >> I've searched the web and I see there are a lot of hits for what I'm
>  >> looking
>  >> for but I cannot quite pinpoint the perfect solution (easiest) for this
>  >> simple thing.
>  >>
>  >> What I need is to be able to "extend" a base page and put into some places
>  >> some extra panels. I designed the places in the base page.
>  >>
>  >> For only one panel, I can use  tag. If I need more than one
>  >> panel inserted, how do I do that?
>  >>
>  >> Thanks,
>  >> Cristi Manole
>  >>
>  >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: "Multiple panels" like behaviour

2008-03-20 Thread Johan Compagner
but is a bit against our coding styles by creating the page in the
constructor
But i agree that works for now.

But multiple childs support would be very nice to have if it is just a
simple add on to the current way of doing.
But first lets i guess bring out 1.4 generics... (if i counted the votes
correctly)

johan


On Thu, Mar 20, 2008 at 10:19 AM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> the "workaround" is quiet easy
>
> class mypage extends webpage {
>  onbeforerender() {
>  if (get("panel1")==null) {
>add(newPanel1("panel1"));
>  }
>  super.onbeforerender();
>   }
> }
>
> -igor
>
>
> On Thu, Mar 20, 2008 at 2:12 AM, Sebastiaan van Erk <[EMAIL PROTECTED]>
> wrote:
> > Gerolf Seitz wrote:
> >   > you can provide factory methods in your base page like
> >   > protected abstract Component newHeader(String id, IModel model);
> >   >
> >   > in the constructor of base page do:
> >   > add(newHeader("header", someModelOrNull));
> >   >
> >   > and just override/implement the factory method in your concrete page
> >   > classes.
> >   >
> >   > hth,
> >   >   Gerolf
> >
> >
> >  I'll be so happy when multiple child is implemented, because I really
> >  think this is an anti-pattern.
> >
> >  Basically, in the constructor of the base page you call an overridable
> >  method, which is terrible. For example you have in your subclass:
> >
> >  public class MySubClass extends MyBaseClass {
> >
> > // my fields
> > public int answer = 42;
> >
> > public MySubClass(int suppliedAnswer) {
> > // implicit (or explicity call to super)
> > super();
> >
> > // init class state and establish class invariants
> > // this stuff could be really complicated!
> > if (suppliedAnswer != -1) {
> > answer = suppliedAnswer;
> > }
> > }
> >
> > @Override
> > public Component getUniverseComponent(String id) {
> > // create universe component using state of this class
> > // the structure of this component could depend on this
> > // the component could even depend on constructor
> > // args that the base class knows nothing about (as
> > // is the case now).
> > if (answer == 42) {
> > return new HHGTGPanel(id);
> > }
> > return new Label(id, String.valueOf(answer));
> > }
> >
> >  }
> >
> >  The problem is that getUniverseComponent gets called from the base
> class
> >  before the constructor of the subclass gets evaluated. :-( This means
> >  that the = 42 assignment has not been done yet, nor the override of the
> >  value with the value from the constructor arg. The (partial) workaround
> >  I've used (a special private init method and initialized flag) is just
> >  plain ugly (and partial, since you still can't use your constructor
> args).
> >
> >  Regards,
> >  Sebastiaan
> >
> >
> >
> >
> >  >
> >  > On Thu, Mar 20, 2008 at 9:25 AM, Cristi Manole <
> [EMAIL PROTECTED]>
> >  > wrote:
> >  >
> >  >> Hello,
> >  >>
> >  >> I've searched the web and I see there are a lot of hits for what I'm
> >  >> looking
> >  >> for but I cannot quite pinpoint the perfect solution (easiest) for
> this
> >  >> simple thing.
> >  >>
> >  >> What I need is to be able to "extend" a base page and put into some
> places
> >  >> some extra panels. I designed the places in the base page.
> >  >>
> >  >> For only one panel, I can use  tag. If I need more
> than one
> >  >> panel inserted, how do I do that?
> >  >>
> >  >> Thanks,
> >  >> Cristi Manole
> >  >>
> >  >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: "Multiple panels" like behaviour

2008-03-20 Thread Sebastiaan van Erk

Yes, Johan told me about that one. :-)

But I really think that's quite ugly too... :( I really don't want to 
add hooks to do something that is just regular initialization of the 
component hierarchy of the page... And whenever possible I think my 
other work around is at least more intuitive...


Regards,
Sebastiaan


Igor Vaynberg wrote:

the "workaround" is quiet easy

class mypage extends webpage {
  onbeforerender() {
  if (get("panel1")==null) {
add(newPanel1("panel1"));
  }
  super.onbeforerender();
   }
}

-igor


On Thu, Mar 20, 2008 at 2:12 AM, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:

Gerolf Seitz wrote:
  > you can provide factory methods in your base page like
  > protected abstract Component newHeader(String id, IModel model);
  >
  > in the constructor of base page do:
  > add(newHeader("header", someModelOrNull));
  >
  > and just override/implement the factory method in your concrete page
  > classes.
  >
  > hth,
  >   Gerolf


 I'll be so happy when multiple child is implemented, because I really
 think this is an anti-pattern.

 Basically, in the constructor of the base page you call an overridable
 method, which is terrible. For example you have in your subclass:

 public class MySubClass extends MyBaseClass {

// my fields
public int answer = 42;

public MySubClass(int suppliedAnswer) {
// implicit (or explicity call to super)
super();

// init class state and establish class invariants
// this stuff could be really complicated!
if (suppliedAnswer != -1) {
answer = suppliedAnswer;
}
}

@Override
public Component getUniverseComponent(String id) {
// create universe component using state of this class
// the structure of this component could depend on this
// the component could even depend on constructor
// args that the base class knows nothing about (as
// is the case now).
if (answer == 42) {
return new HHGTGPanel(id);
}
return new Label(id, String.valueOf(answer));
}

 }

 The problem is that getUniverseComponent gets called from the base class
 before the constructor of the subclass gets evaluated. :-( This means
 that the = 42 assignment has not been done yet, nor the override of the
 value with the value from the constructor arg. The (partial) workaround
 I've used (a special private init method and initialized flag) is just
 plain ugly (and partial, since you still can't use your constructor args).

 Regards,
 Sebastiaan




 >
 > On Thu, Mar 20, 2008 at 9:25 AM, Cristi Manole <[EMAIL PROTECTED]>
 > wrote:
 >
 >> Hello,
 >>
 >> I've searched the web and I see there are a lot of hits for what I'm
 >> looking
 >> for but I cannot quite pinpoint the perfect solution (easiest) for this
 >> simple thing.
 >>
 >> What I need is to be able to "extend" a base page and put into some places
 >> some extra panels. I designed the places in the base page.
 >>
 >> For only one panel, I can use  tag. If I need more than one
 >> panel inserted, how do I do that?
 >>
 >> Thanks,
 >> Cristi Manole
 >>
 >



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



smime.p7s
Description: S/MIME Cryptographic Signature


Mounting and intercept pages

2008-03-20 Thread Jörn Zaefferer
Hi,

I have a bookmarkable page with a single param, something like
domain/item/id/1. Now, to edit the item, the user has to login or
register first. After doing so, either using the login form on the
same page or using the register form on a different page, the user
must land on exactly the same page as before (domain/item/id/1). The
register page must be bookmarkable as well (eg. domain/register).

All my attempts of using Links, BookmarkablePageLinks and
redirectToInterceptPage all yield nothing or yet another URL like
"/?wicket:interface=:2" either directly or after the
redirect-back-to-original-target.

Any ideas how to achieve that?

Thanks
Jörn

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Nice absolute urls - is this possible?

2008-03-20 Thread Java Programmer
Hello,

I have question about generated urls e.g. in examples on
http://wicketstuff.org/wicket13/niceurl/the/homepage/path we have
really nice urls, but they are realtive:


is there posiible to make them:

without ../../ but absolute for servlet mapped as:

wicket
/*

even if I make /somepattern/* I don't
recieve /somepattern/my/mounted/package/Page4/ without ../../

I have read about WICKET-1205, and similar people problems with not
working relative urls, but mine consider only HTML source to be nicer
for web spiders (SEO and such things, my boss won't be happy with
trailings ../../, but I would understand if it's wicket feature and
can't be changed).

Any solution is possible in this matter?

Best regards,
Adr

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to set the initially selected value of a DropDownChoice?

2008-03-20 Thread Kaspar Fischer
Thanks for the helpful link, Martijn. For the sake of completeness,  
here's

what I have ended up with:

  List PagerSizesList = Arrays.asList("25", "50", "100");

  ValueMap parameters = // ...
  parameters.put("search-page-size", PagerSizesList.get(0));

  form.setModel(new CompoundPropertyModel(parameters));
  form.add(new DropDownChoice("search-page-size", PagerSizesList));

On 19.03.2008, at 23:29, Martijn Dashorst wrote:


Start by reading this: http://wicket.apache.org/exampledropdownchoice.html

On 3/19/08, Kaspar Fischer <[EMAIL PROTECTED]> wrote:

How can I set the default value of a required DropDownChoice that
should not have null values?

  private static final List PagerSizesList =
Arrays.asList("25", "50", "100");

  // in constructor...
  DropDownChoice pagerSizer = new DropDownChoice("search-page-size",
PagerSizesList);
  add(pagerSizer);

I've tried overriding my DropDownChoice's getDefaultChoice(),

  @Override
  protected CharSequence getDefaultChoice(final Object selected)
  {
return "" + PagerSizesList.get(0) + "";
  }

but this replaces the label of the null string, but does not remove
the null string itself.

Thanks and best wishes,
Kaspar


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Unable to display modal windows

2008-03-20 Thread Cristi Manole
Hello,

I just upgraded to 1.3.2 from 1.3.1.

Also, i don't know if it makes a difference, spring from 2.0.6 to 2.5.2.

Now, when i try to display a modal window just like I used to, it fails.

All the code I modified is for the constructor of the authwebsess which got
depricated
public TheWorldWebSession(final AuthenticatedWebApplication application,
Request request) {
*super(request); //instead of super(application, request)*
InjectorHolder.getInjector().inject(this); //don't get spring by
default in sessions...
}

These are some strange warnings I get (didn't get them before) :

WARN  - AbstractTextComponent  - Couldn't resolve model type of
Model:classname=[org.apache.wicket.model.PropertyModel]:nestedModel=[]:expression=[owner]
for [MarkupContainer [Component id = owner, page =
com.smd.mymedia.MyMediaMainPage, path = 1:mymediaPanel:searchForm:
owner.MyMediaPanel$MyMediaPanelSearchForm$1, isVisible = true, isVersioned =
false]], please set the type yourself.
WARN  - AbstractTextComponent  - Couldn't resolve model type of
Model:classname=[org.apache.wicket.model.PropertyModel]:nestedModel=[]:expression=[name]
for [MarkupContainer [Component id = name, page =
com.smd.mymedia.MyMediaMainPage, path = 1:mymediaPanel:searchForm:
name.MyMediaPanel$MyMediaPanelSearchForm$2, isVisible = true, isVersioned =
false]], please set the type yourself.
(etc)

This is what I get in the ajax window :


*INFO: *focus set on addnew115
*INFO: *
*INFO: *
Initiating Ajax GET request on
../?wicket:interface=:1:mymediaPanel:addnew1::IBehaviorListener:0:1&random=
0.5540758623808608
*INFO: *Invoking pre-call handler(s)...
*INFO: *Received ajax response (5403 characters)
*INFO: *

RE: RadioGroup in TD

2008-03-20 Thread i ii

problem with proposed solution is that the number of TR are dynamically created 
in DataView (below selectionRows)


   
  [Username]
  
  
   


final DataView dataView = new DataView("selectionRows", dataProvider) {
   protected void populateItem(final Item item) {
  UserChoice uc = (UserChoice) item.getModelObject();
  item.add(new Label("username", uc.getUsername()));
  item.add(new Radio("choice1", new Model())); // what to do here?
  item.add(new Radio("choice2", new Model())); // what to do here?
   }
}

> Date: Thu, 20 Mar 2008 03:20:07 +
> From: [EMAIL PROTECTED]
> To: users@wicket.apache.org
> Subject: Re: RadioGroup in TD
> 
> Hello,
> 
> You can use a RadioChoice for this case, like:
> 
> 
> 
>  
> The setPrefix() and setSuffix() methods can be used to get it to render 
> the '' and '' markup which will separate each rendered choice.
> 
> RadioChoice c1 = new RadioChoice ("choice1", new Model(), OPTIONS1_LIST);
> RadioChoice c2 = new RadioChoice ("choice2", new Model(), OPTIONS2_LIST);
> 
> c1.setPrefix ("");
> c1.setSuffix (");
> 
> c2.setPrefix ("");
> c2.setSuffix (");
> 
> add (c1);
> add (c2)
> 
> Mike
> > this does not work because each TR has its own RadioGroup (2 TD with radio 
> > in each) so i cannot wrap whole table. how to get this to work?
> >
> >   
> >> Date: Wed, 19 Mar 2008 12:31:24 -0700
> >> From: [EMAIL PROTECTED]
> >> To: users@wicket.apache.org
> >> Subject: Re: RadioGroup in TD
> >>
> >> you would have one RadioGroup around the table and Radio inside td
> >>
> >> -igor
> >>
> >>
> >> On Wed, Mar 19, 2008 at 11:28 AM, i ii <[EMAIL PROTECTED]> wrote:
> >> 
> >>>  will that work with more than one RadioGroup in different TD? i would 
> >>> put RadioGroup around RadioGroup?
> >>>
> >>>  > Date: Wed, 19 Mar 2008 11:22:02 -0700
> >>>  > From: [EMAIL PROTECTED]
> >>>
> >>>   
>  To: users@wicket.apache.org
>  
> >>>  > Subject: Re: RadioGroup in TD
> >>>
> >>>
> >>>   
> >>>  > put radiogroup around the table
> >>>  >
> >>>  > -igor
> >>>  >
> >>>  >
> >>>  > On Wed, Mar 19, 2008 at 11:20 AM, i ii <[EMAIL PROTECTED]> wrote:
> >>>  > >
> >>>  > >  i tried to add html:
> >>>  > >
> >>>  > >  < table >h;
> >>>  > > < td >h; < input wicket:id="rd1" type="radio" / >h; < /td 
> >>> >h;
> >>>  > > < td >h; < input wicket:id="rd2" type="radio" / >h; < /td 
> >>> >h;
> >>>  > >  < /table >h;
> >>>  > >
> >>>  > >  > From: [EMAIL PROTECTED]
> >>>  > >  > To: users@wicket.apache.org
> >>>  > >  > Subject: RadioGroup in TD
> >>>  > >  > Date: Wed, 19 Mar 2008 18:16:26 +
> >>>  > >
> >>>  > >
> >>>  > > >
> >>>  > >  >
> >>>  > >  > how can i use RadioGroup or RadioChoice when radios are in TD?
> >>>  > >  >
> >>>  > >  >
> >>>  > >  >
> >>>  > >  >
> >>>  > >  >
> >>>  > >  >
> >>>  > >  > i try to use Radio on its own with same name attribute, but 
> >>> cannot. it says Radio must be inside RadioGroup?
> >>>  > >  > 
> >>> -
> >>>  > >  > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>  > >  > For additional commands, e-mail: [EMAIL PROTECTED]
> >>>  > >  >
> >>>  > >
> >>>  > >  
> >>> -
> >>>  > >  To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>  > >  For additional commands, e-mail: [EMAIL PROTECTED]
> >>>  > >
> >>>  > >
> >>>  >
> >>>  > -
> >>>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>  > For additional commands, e-mail: [EMAIL PROTECTED]
> >>>  >
> >>>
> >>>   
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >> 
> >
> >   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


Palette and on change notifications

2008-03-20 Thread Piller Sébastien

Hello everybody,

I'm trying to get selection change notifications with the palette 
component (I need a notification each time a user click on an item in 
the palette). I saw that I need to attach an ajax behavior to the 
recorder component of the palette. But I tried several ways of doing 
that, it works not. How am I supposed to do this?


Thanks ;)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mounting and intercept pages

2008-03-20 Thread Martijn Dashorst
throw new RestartResponseAtInterceptPageException(LoginPage.class);

Martijn

On 3/20/08, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I have a bookmarkable page with a single param, something like
>  domain/item/id/1. Now, to edit the item, the user has to login or
>  register first. After doing so, either using the login form on the
>  same page or using the register form on a different page, the user
>  must land on exactly the same page as before (domain/item/id/1). The
>  register page must be bookmarkable as well (eg. domain/register).
>
>  All my attempts of using Links, BookmarkablePageLinks and
>  redirectToInterceptPage all yield nothing or yet another URL like
>  "/?wicket:interface=:2" either directly or after the
>  redirect-back-to-original-target.
>
>  Any ideas how to achieve that?
>
>  Thanks
>  Jörn
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Insert dynamic/external HTML string in a page

2008-03-20 Thread mmocnik

Thank you all.
Works like a charm.

Regards,
Marko
-- 
View this message in context: 
http://www.nabble.com/Insert-dynamic-external-HTML-string-in-a-page-tp16141336p16177878.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mounting and intercept pages

2008-03-20 Thread Jörn Zaefferer
Thanks Martijn. I gave that a try:

add(new Link("register") {
@Override public void onClick() {
throw new 
RestartResponseAtInterceptPageException(Register.class);
}
@Override
public boolean isVisible() {
return !UserSession.get().isSignedIn();
}
@Override protected CharSequence getURL() {
return urlFor(getPageMap(), Register.class, 
getPageParameters());
}
});

Submitting the register form (page Register) doesn't redirect me back
to the page where was I coming from, instead only displays the
register form again (with a wicket:interface url).

What am I missing?

Jörn

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mounting and intercept pages

2008-03-20 Thread Hoover, William
Try the following:

if (!continueToOriginalDestination()) {
setResponsePage(getApplication().getHomePage());
}

-Original Message-
From: Jörn Zaefferer [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 9:13 AM
To: users@wicket.apache.org
Subject: Re: Mounting and intercept pages


Thanks Martijn. I gave that a try:

add(new Link("register") {
@Override public void onClick() {
throw new 
RestartResponseAtInterceptPageException(Register.class);
}
@Override
public boolean isVisible() {
return !UserSession.get().isSignedIn();
}
@Override protected CharSequence getURL() {
return urlFor(getPageMap(), Register.class, 
getPageParameters());
}
});

Submitting the register form (page Register) doesn't redirect me back
to the page where was I coming from, instead only displays the
register form again (with a wicket:interface url).

What am I missing?

Jörn

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Zhubin Salehi
onclick doesn't work either.

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 1:56 AM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a 
FormComponentPanel

also, for what its worth, onclick works a lot better for this sort of
thing when dealing with check/readio html components

-igor


On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> i dont think browsers support an "onschange" event :)
>
>  -igor
>
>
>
>
>  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi <[EMAIL PROTECTED]> wrote:
>  > So now I wrote this code:
>  >
>  > nanp.add(new Radio("nanpTrue", new Model(new 
> Boolean(true;
>  > nanp.add(new Radio("nanpFalse", new Model(new 
> Boolean(false;
>  > nanp.add(new 
> AjaxFormComponentUpdatingBehavior("onschange") {
>  >
>  >
>  > private static final long serialVersionUID = 
> -1406454064553153207L;
>  >
>  > protected void onUpdate(AjaxRequestTarget target) {
>  >
>  > nanp.processInput();
>  > target.addComponent(areaCode);
>  > target.addComponent(countryDialingCode);
>  > target.addComponent(routingDialingCode);
>  > }
>  > });
>  >
>  >  But onUpdate() method is not called when I change selection. What should 
> I do?
>  >
>  >  Thanks,
>  >  Zhubin
>  >
>  >
>  >
>  >  -Original Message-
>  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  Sent: Wednesday, March 19, 2008 6:04 PM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a 
> FormComponentPanel
>  >
>  >  ajax event behavior does not send over input. try
>  >  ajaxformcomponentupdatingbehavior.
>  >
>  >  -igor
>  >
>  >
>  >  On Wed, Mar 19, 2008 at 2:19 PM, Zhubin Salehi <[EMAIL PROTECTED]> wrote:
>  >  > Hi all,
>  >  >
>  >  >  I'm trying to update some TextFields in a FormComponentPanel when the 
> user selects a radio button from a RadioGroup.
>  >  >
>  >  >  Here is a fragment of my code that created Radio and RadioGroup 
> objects:
>  >  >
>  >  > add(nanp = new RadioGroup("nanp", new PropertyModel(this, 
> "phoneNumber.nanp")));
>  >  > nanp.add(new Radio("nanpTrue", new Model(new 
> Boolean(true))).add(new AjaxEventBehavior("onchange") {
>  >  >
>  >  >   private static final long serialVersionUID = 
> -1406454064553153207L;
>  >  >
>  >  >   protected void onEvent(AjaxRequestTarget target) {
>  >  > nanp.processInput();
>  >  > target.addComponent(areaCode);
>  >  > target.addComponent(countryDialingCode);
>  >  > target.addComponent(routingDialingCode);
>  >  >   }
>  >  > }));
>  >  > nanp.add(new Radio("nanpFalse", new Model(new 
> Boolean(false))).add(new AjaxEventBehavior("onchange") {
>  >  >
>  >  >   private static final long serialVersionUID = 
> 6475950784724594836L;
>  >  >
>  >  >   protected void onEvent(AjaxRequestTarget target) {
>  >  > nanp.processInput();
>  >  > target.addComponent(areaCode);
>  >  > target.addComponent(countryDialingCode);
>  >  > target.addComponent(routingDialingCode);
>  >  >   }
>  >  > }));
>  >  >
>  >  >  The problem is that as soon as I click on one of the radio buttons, I 
> get the following exception:
>  >  >
>  >  >  WicketMessage: Can't convert null value to a primitive class: boolean 
> for setting it on [EMAIL PROTECTED]
>  >  >
>  >  >  Root cause:
>  >  >
>  >  >  org.apache.wicket.util.convert.ConversionException: Can't convert null 
> value to a primitive class: boolean for setting it on [EMAIL PROTECTED]
>  >  >  at 
> org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1079)
>  >  >  at 
> org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:576)
>  >  >  at 
> org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:130)
>  >  >  at 
> org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:164)
>  >  >  at org.apache.wicket.Component.setModelObject(Component.java:2880)
>  >  >  at 
> org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1052)
>  >  >  at 
> org.apache.wicket.markup.html.form.FormComponent.processInput(FormComponent.java:934)
>  >  >  at 
> com.route1.mobi.map3.web.panels.PhoneNumberPanel$2.onEvent(PhoneNumberPanel.java:125)
>  >  >  at 
> org.apache.wicket.a

error occurs in IE when I click on button in wicket application deployed in JBoss

2008-03-20 Thread Patel, Sanjay
I developed small wicket application. It is address book kind of application 
and it has "add new contact" , "edit", "delete" button. I deployed it in JBoss 
4.0. It works good in FireFox but in IE when I click on any button it is not 
able find the page. Please see the attached screen shot so you  have an idea.

 <> 

is anybody experienced this problem?

Sanjay Patel
Application Engineer
Web Team
Nemours

"NOTICE...This electronic transmission is intended only for the person(s) 
named. It may contain information that is (i) proprietary to the sender, and/or 
(ii) privileged, confidential and/or otherwise exempt from disclosure under 
applicable State and Federal law, including, but not limited to, privacy 
standards imposed pursuant to the federal Health Insurance Portability and 
Accountability Act of 1996 (HIPAA). Receipt by anyone other than the named 
recipient(s) is not a waiver of any applicable privilege. If you received this 
confidential communication in error, please notify the sender immediately by 
reply e-mail message and permanently delete the original message from your 
system."

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Mounting and intercept pages

2008-03-20 Thread Jörn Zaefferer
When throwing the Restart... exception,
continueToOriginalDestination() yields false.

On Thu, Mar 20, 2008 at 2:17 PM, Hoover, William <[EMAIL PROTECTED]> wrote:
> Try the following:
>
>  if (!continueToOriginalDestination()) {
> setResponsePage(getApplication().getHomePage());
>
>
> }
>
>  -Original Message-
>  From: Jörn Zaefferer [mailto:[EMAIL PROTECTED]
>  Sent: Thursday, March 20, 2008 9:13 AM
>  To: users@wicket.apache.org
>  Subject: Re: Mounting and intercept pages
>
>
>  Thanks Martijn. I gave that a try:
>
>  add(new Link("register") {
> @Override public void onClick() {
> throw new 
> RestartResponseAtInterceptPageException(Register.class);
> }
> @Override
> public boolean isVisible() {
> return !UserSession.get().isSignedIn();
> }
> @Override protected CharSequence getURL() {
> return urlFor(getPageMap(), Register.class, 
> getPageParameters());
> }
>  });
>
>  Submitting the register form (page Register) doesn't redirect me back
>  to the page where was I coming from, instead only displays the
>  register form again (with a wicket:interface url).
>
>  What am I missing?
>
>  Jörn
>
>
>
> -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Zhubin Salehi
Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no JavaScript gets 
added to radio buttons.

-Original Message-
From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 9:18 AM
To: users@wicket.apache.org
Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a 
FormComponentPanel

onclick doesn't work either.

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 1:56 AM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a 
FormComponentPanel

also, for what its worth, onclick works a lot better for this sort of
thing when dealing with check/readio html components

-igor


On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> i dont think browsers support an "onschange" event :)
>
>  -igor
>
>
>
>
>  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi <[EMAIL PROTECTED]> wrote:
>  > So now I wrote this code:
>  >
>  > nanp.add(new Radio("nanpTrue", new Model(new 
> Boolean(true;
>  > nanp.add(new Radio("nanpFalse", new Model(new 
> Boolean(false;
>  > nanp.add(new 
> AjaxFormComponentUpdatingBehavior("onschange") {
>  >
>  >
>  > private static final long serialVersionUID = 
> -1406454064553153207L;
>  >
>  > protected void onUpdate(AjaxRequestTarget target) {
>  >
>  > nanp.processInput();
>  > target.addComponent(areaCode);
>  > target.addComponent(countryDialingCode);
>  > target.addComponent(routingDialingCode);
>  > }
>  > });
>  >
>  >  But onUpdate() method is not called when I change selection. What should 
> I do?
>  >
>  >  Thanks,
>  >  Zhubin
>  >
>  >
>  >
>  >  -Original Message-
>  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  Sent: Wednesday, March 19, 2008 6:04 PM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a 
> FormComponentPanel
>  >
>  >  ajax event behavior does not send over input. try
>  >  ajaxformcomponentupdatingbehavior.
>  >
>  >  -igor
>  >
>  >
>  >  On Wed, Mar 19, 2008 at 2:19 PM, Zhubin Salehi <[EMAIL PROTECTED]> wrote:
>  >  > Hi all,
>  >  >
>  >  >  I'm trying to update some TextFields in a FormComponentPanel when the 
> user selects a radio button from a RadioGroup.
>  >  >
>  >  >  Here is a fragment of my code that created Radio and RadioGroup 
> objects:
>  >  >
>  >  > add(nanp = new RadioGroup("nanp", new PropertyModel(this, 
> "phoneNumber.nanp")));
>  >  > nanp.add(new Radio("nanpTrue", new Model(new 
> Boolean(true))).add(new AjaxEventBehavior("onchange") {
>  >  >
>  >  >   private static final long serialVersionUID = 
> -1406454064553153207L;
>  >  >
>  >  >   protected void onEvent(AjaxRequestTarget target) {
>  >  > nanp.processInput();
>  >  > target.addComponent(areaCode);
>  >  > target.addComponent(countryDialingCode);
>  >  > target.addComponent(routingDialingCode);
>  >  >   }
>  >  > }));
>  >  > nanp.add(new Radio("nanpFalse", new Model(new 
> Boolean(false))).add(new AjaxEventBehavior("onchange") {
>  >  >
>  >  >   private static final long serialVersionUID = 
> 6475950784724594836L;
>  >  >
>  >  >   protected void onEvent(AjaxRequestTarget target) {
>  >  > nanp.processInput();
>  >  > target.addComponent(areaCode);
>  >  > target.addComponent(countryDialingCode);
>  >  > target.addComponent(routingDialingCode);
>  >  >   }
>  >  > }));
>  >  >
>  >  >  The problem is that as soon as I click on one of the radio buttons, I 
> get the following exception:
>  >  >
>  >  >  WicketMessage: Can't convert null value to a primitive class: boolean 
> for setting it on [EMAIL PROTECTED]
>  >  >
>  >  >  Root cause:
>  >  >
>  >  >  org.apache.wicket.util.convert.ConversionException: Can't convert null 
> value to a primitive class: boolean for setting it on [EMAIL PROTECTED]
>  >  >  at 
> org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1079)
>  >  >  at 
> org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:576)
>  >  >  at 
> org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:130)
>  >  >  at 
> org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:164)
>  >  >  at org.apache.wicket.Component.setModelObject(Component.java:2880)
>  >  >  at 

the wicket markup reference

2008-03-20 Thread Vitaly Tsaplin
   Hi everyone,

   Is there any wicket markup reference? Is it documented?

   Vitaly

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RadioGroup in TD

2008-03-20 Thread Michael O'Cleirigh
There is a patch to RadioGroup in JIRA 
(http://issues.apache.org/jira/browse/WICKET-1055) that allows for this 
type of scenario to be handled.


It defines some methods to programatically define which Radio's are part 
of a RadioGroup.


Alternately you could could try something like:


  
 [Username]
 

  


final DataView dataView = new DataView("selectionRows", dataProvider) {
  protected void populateItem(final Item item) {
 UserChoice uc = (UserChoice) item.getModelObject();

 IModel selectedChoiceModel = new Model();
 
 item.add(new Label("username", uc.getUsername()));


	RadioChoice rc = 
		new RadioChoice("choices", selectedChoiceModel, ud.getPossibleChoiceList(), new PossibleChoiceRenderer();


rc.setPrefix ("");
rc.setSuffix ("");

 item.add(rc)); 


  }
}

Where the choices are placed after the username field.  This should work 
unless for some reason the  tag renders.  
But even in that case I've seen on this list that there are ways to 
render the body of a tag only.


Mike


problem with proposed solution is that the number of TR are dynamically created 
in DataView (below selectionRows)


   
  [Username]
  
  
   


final DataView dataView = new DataView("selectionRows", dataProvider) {
   protected void populateItem(final Item item) {
  UserChoice uc = (UserChoice) item.getModelObject();
  item.add(new Label("username", uc.getUsername()));
  item.add(new Radio("choice1", new Model())); // what to do here?
  item.add(new Radio("choice2", new Model())); // what to do here?
   }
}

  

Date: Thu, 20 Mar 2008 03:20:07 +
From: [EMAIL PROTECTED]
To: users@wicket.apache.org
Subject: Re: RadioGroup in TD

Hello,

You can use a RadioChoice for this case, like:



The setPrefix() and setSuffix() methods can be used to get it to render 
the '' and '' markup which will separate each rendered choice.


RadioChoice c1 = new RadioChoice ("choice1", new Model(), OPTIONS1_LIST);
RadioChoice c2 = new RadioChoice ("choice2", new Model(), OPTIONS2_LIST);

c1.setPrefix ("");
c1.setSuffix (");

c2.setPrefix ("");
c2.setSuffix (");

add (c1);
add (c2)

Mike


this does not work because each TR has its own RadioGroup (2 TD with radio in 
each) so i cannot wrap whole table. how to get this to work?

  
  

Date: Wed, 19 Mar 2008 12:31:24 -0700
From: [EMAIL PROTECTED]
To: users@wicket.apache.org
Subject: Re: RadioGroup in TD

you would have one RadioGroup around the table and Radio inside td

-igor


On Wed, Mar 19, 2008 at 11:28 AM, i ii <[EMAIL PROTECTED]> wrote:



 will that work with more than one RadioGroup in different TD? i would put 
RadioGroup around RadioGroup?

 > Date: Wed, 19 Mar 2008 11:22:02 -0700
 > From: [EMAIL PROTECTED]

  
  

To: users@wicket.apache.org



 > Subject: Re: RadioGroup in TD


  
 > put radiogroup around the table

 >
 > -igor
 >
 >
 > On Wed, Mar 19, 2008 at 11:20 AM, i ii <[EMAIL PROTECTED]> wrote:
 > >
 > >  i tried to add html:
 > >
 > >  < table >h;
 > > < td >h; < input wicket:id="rd1" type="radio" / >h; < /td >h;
 > > < td >h; < input wicket:id="rd2" type="radio" / >h; < /td >h;
 > >  < /table >h;
 > >
 > >  > From: [EMAIL PROTECTED]
 > >  > To: users@wicket.apache.org
 > >  > Subject: RadioGroup in TD
 > >  > Date: Wed, 19 Mar 2008 18:16:26 +
 > >
 > >
 > > >
 > >  >
 > >  > how can i use RadioGroup or RadioChoice when radios are in TD?
 > >  >
 > >  >
 > >  >
 > >  >
 > >  >
 > >  >
 > >  > i try to use Radio on its own with same name attribute, but cannot. it 
says Radio must be inside RadioGroup?
 > >  > -
 > >  > To unsubscribe, e-mail: [EMAIL PROTECTED]
 > >  > For additional commands, e-mail: [EMAIL PROTECTED]
 > >  >
 > >
 > >  -
 > >  To unsubscribe, e-mail: [EMAIL PROTECTED]
 > >  For additional commands, e-mail: [EMAIL PROTECTED]
 > >
 > >
 >
 > -
 > To unsubscribe, e-mail: [EMAIL PROTECTED]
 > For additional commands, e-mail: [EMAIL PROTECTED]
 >

  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Suggested Enhancement To Spring Support

2008-03-20 Thread Zappaterrini, Larry
I suppose I need to learn more about how Spring support is implemented in 
Wicket. My thinking was that the injected property would simply get set to 
null. Then the getter for that injected property can perform a null check and 
lazily initialize it with a default type if necessary:
 
@SpringBean(name = "someService")
private Service service;
 
public Service getService() {
if (service == null) {
service = new DefaultService();
}
return service;
}
 
This allows for default implementation to be provided that can then be 
overridden by declaring the bean in Spring. I've used this type of pattern with 
Spring in other settings and thought it might be useful in Wicket too.



From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Wed 3/19/2008 5:49 PM
To: users@wicket.apache.org
Subject: Re: Suggested Enhancement To Spring Support



you want to swallow the exception?

then you would return a null into a proxy and cause an npe later...

-igor


On Wed, Mar 19, 2008 at 1:43 PM, Zappaterrini, Larry
<[EMAIL PROTECTED]> wrote:
> It might be a nice improvement to Wicket's Spring support to allow for
>  missing bean definitions to be handled gracefully. This would allow for
>  the use of a sane default in the absence of explicit declaration in the
>  context XML. Right now using the Spring annotations support I get the
>  following error when I don't define the object in the XML:
>
>  org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
>  named 'beanName' is defined
>  at
>  org.springframework.beans.factory.support.DefaultListableBeanFactory.get
>  BeanDefinition(DefaultListableBeanFactory.java:355)
>  at
>  org.springframework.beans.factory.support.AbstractBeanFactory.getMergedB
>  eanDefinition(AbstractBeanFactory.java:800)
>  at
>  org.springframework.beans.factory.support.AbstractBeanFactory.isSingleto
>  n(AbstractBeanFactory.java:343)
>  at
>  org.springframework.context.support.AbstractApplicationContext.isSinglet
>  on(AbstractApplicationContext.java:654)
>  at
>  org.apache.wicket.spring.SpringBeanLocator.isSingletonBean(SpringBeanLoc
>  ator.java:133)
>  at
>  org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.get
>  FieldValue(AnnotProxyFieldValueFactory.java:91)
>  at org.apache.wicket.injection.Injector.inject(Injector.java:108)
>  at
>  org.apache.wicket.injection.ConfigurableInjector.inject(ConfigurableInje
>  ctor.java:39)
>  at
>  org.apache.wicket.injection.ComponentInjector.onInstantiation(ComponentI
>  njector.java:52)
>  at
>  org.apache.wicket.Application.notifyComponentInstantiationListeners(Appl
>  ication.java:973)
>  at org.apache.wicket.Component.(Component.java:866)
>
>  ... truncated for brevity
>
>  Using getSpringContext().contains(String) either within or as an exposed
>  method of SpringBeanLocator would probably be sufficient to avoid
>  hitting this exception.
>
>  Thanks,
>  Larry
>
>  __
>
>  The information contained in this message is proprietary and/or 
> confidential. If you are not the
>  intended recipient, please: (i) delete the message and all copies; (ii) do 
> not disclose,
>  distribute or use the message in any manner; and (iii) notify the sender 
> immediately. In addition,
>  please be aware that any message addressed to our domain is subject to 
> archiving and review by
>  persons other than the intended recipient. Thank you.
>  _
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



__

The information contained in this message is proprietary and/or confidential. 
If you are not the 
intended recipient, please: (i) delete the message and all copies; (ii) do not 
disclose, 
distribute or use the message in any manner; and (iii) notify the sender 
immediately. In addition, 
please be aware that any message addressed to our domain is subject to 
archiving and review by 
persons other than the intended recipient. Thank you.
_

Re: the wicket markup reference

2008-03-20 Thread Erik van Oosten
Do you mean http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html?

Regards,
Erik.


Vitaly Tsaplin schreef:
>Hi everyone,
>
>Is there any wicket markup reference? Is it documented?
>
>Vitaly
>
>   

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: the wicket markup reference

2008-03-20 Thread Vitaly Tsaplin
   Wow! Exactly. Thanks Erik.

On Thu, Mar 20, 2008 at 2:56 PM, Erik van Oosten <[EMAIL PROTECTED]> wrote:
> Do you mean http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html?
>
>  Regards,
> Erik.
>
>
>  Vitaly Tsaplin schreef:
>
>
> >Hi everyone,
>  >
>  >Is there any wicket markup reference? Is it documented?
>  >
>  >Vitaly
>  >
>  >
>
>  --
>  Erik van Oosten
>  http://day-to-day-stuff.blogspot.com/
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Suggested Enhancement To Spring Support

2008-03-20 Thread lars vonk
Spring support in Wicket works with proxies, so your services are not
Serialized by Wicket, but your Proxy is. With your suggestion your Service
will be Serialized and with it all its dependencies like DAO's etc. This
will most likely cause trouble when you are in a clustered environment and
use Session replication.

Also using this approach your Spring bean is no longer a singleton, but as
long as your beans are stateless this does not really matter.

- Lars

On Thu, Mar 20, 2008 at 2:44 PM, Zappaterrini, Larry <
[EMAIL PROTECTED]> wrote:

> I suppose I need to learn more about how Spring support is implemented in
> Wicket. My thinking was that the injected property would simply get set to
> null. Then the getter for that injected property can perform a null check
> and lazily initialize it with a default type if necessary:
>
> @SpringBean(name = "someService")
> private Service service;
>
> public Service getService() {
>if (service == null) {
>service = new DefaultService();
>}
>return service;
> }
>
> This allows for default implementation to be provided that can then be
> overridden by declaring the bean in Spring. I've used this type of pattern
> with Spring in other settings and thought it might be useful in Wicket too.
>
> 
>
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Wed 3/19/2008 5:49 PM
> To: users@wicket.apache.org
> Subject: Re: Suggested Enhancement To Spring Support
>
>
>
> you want to swallow the exception?
>
> then you would return a null into a proxy and cause an npe later...
>
> -igor
>
>
> On Wed, Mar 19, 2008 at 1:43 PM, Zappaterrini, Larry
> <[EMAIL PROTECTED]> wrote:
> > It might be a nice improvement to Wicket's Spring support to allow for
> >  missing bean definitions to be handled gracefully. This would allow for
> >  the use of a sane default in the absence of explicit declaration in the
> >  context XML. Right now using the Spring annotations support I get the
> >  following error when I don't define the object in the XML:
> >
> >  org.springframework.beans.factory.NoSuchBeanDefinitionException: No
> bean
> >  named 'beanName' is defined
> >  at
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory.get
> >  BeanDefinition(DefaultListableBeanFactory.java:355)
> >  at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getMergedB
> >  eanDefinition(AbstractBeanFactory.java:800)
> >  at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.isSingleto
> >  n(AbstractBeanFactory.java:343)
> >  at
> >
> org.springframework.context.support.AbstractApplicationContext.isSinglet
> >  on(AbstractApplicationContext.java:654)
> >  at
> >  org.apache.wicket.spring.SpringBeanLocator.isSingletonBean
> (SpringBeanLoc
> >  ator.java:133)
> >  at
> >
> org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.get
> >  FieldValue(AnnotProxyFieldValueFactory.java:91)
> >  at org.apache.wicket.injection.Injector.inject(Injector.java:108)
> >  at
> >  org.apache.wicket.injection.ConfigurableInjector.inject
> (ConfigurableInje
> >  ctor.java:39)
> >  at
> >  org.apache.wicket.injection.ComponentInjector.onInstantiation
> (ComponentI
> >  njector.java:52)
> >  at
> >  org.apache.wicket.Application.notifyComponentInstantiationListeners
> (Appl
> >  ication.java:973)
> >  at org.apache.wicket.Component.(Component.java:866)
> >
> >  ... truncated for brevity
> >
> >  Using getSpringContext().contains(String) either within or as an
> exposed
> >  method of SpringBeanLocator would probably be sufficient to avoid
> >  hitting this exception.
> >
> >  Thanks,
> >  Larry
> >
> >  __
> >
> >  The information contained in this message is proprietary and/or
> confidential. If you are not the
> >  intended recipient, please: (i) delete the message and all copies; (ii)
> do not disclose,
> >  distribute or use the message in any manner; and (iii) notify the
> sender immediately. In addition,
> >  please be aware that any message addressed to our domain is subject to
> archiving and review by
> >  persons other than the intended recipient. Thank you.
> >  _
> >
> >  -
> >  To unsubscribe, e-mail: [EMAIL PROTECTED]
> >  For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> __
>
> The information contained in this message is proprietary and/or
> confidential. If you are not the
> intended recipient, please: (i) delete the message and all copies; (ii) do
> not disclose,
> distribute or use the message in any manner; and (iii) notify the sender
> immediately. In addition,
> please be aware that any message addressed to our domain is subject to
> archiving and review by
>

RE: Suggested Enhancement To Spring Support

2008-03-20 Thread Zappaterrini, Larry
Thanks for the explanation, that makes perfect sense.



From: lars vonk [mailto:[EMAIL PROTECTED]
Sent: Thu 3/20/2008 10:16 AM
To: users@wicket.apache.org
Subject: Re: Suggested Enhancement To Spring Support



Spring support in Wicket works with proxies, so your services are not
Serialized by Wicket, but your Proxy is. With your suggestion your Service
will be Serialized and with it all its dependencies like DAO's etc. This
will most likely cause trouble when you are in a clustered environment and
use Session replication.

Also using this approach your Spring bean is no longer a singleton, but as
long as your beans are stateless this does not really matter.

- Lars

On Thu, Mar 20, 2008 at 2:44 PM, Zappaterrini, Larry <
[EMAIL PROTECTED]> wrote:

> I suppose I need to learn more about how Spring support is implemented in
> Wicket. My thinking was that the injected property would simply get set to
> null. Then the getter for that injected property can perform a null check
> and lazily initialize it with a default type if necessary:
>
> @SpringBean(name = "someService")
> private Service service;
>
> public Service getService() {
>if (service == null) {
>service = new DefaultService();
>}
>return service;
> }
>
> This allows for default implementation to be provided that can then be
> overridden by declaring the bean in Spring. I've used this type of pattern
> with Spring in other settings and thought it might be useful in Wicket too.
>
> 
>
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Wed 3/19/2008 5:49 PM
> To: users@wicket.apache.org
> Subject: Re: Suggested Enhancement To Spring Support
>
>
>
> you want to swallow the exception?
>
> then you would return a null into a proxy and cause an npe later...
>
> -igor
>
>
> On Wed, Mar 19, 2008 at 1:43 PM, Zappaterrini, Larry
> <[EMAIL PROTECTED]> wrote:
> > It might be a nice improvement to Wicket's Spring support to allow for
> >  missing bean definitions to be handled gracefully. This would allow for
> >  the use of a sane default in the absence of explicit declaration in the
> >  context XML. Right now using the Spring annotations support I get the
> >  following error when I don't define the object in the XML:
> >
> >  org.springframework.beans.factory.NoSuchBeanDefinitionException: No
> bean
> >  named 'beanName' is defined
> >  at
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory.get
> >  BeanDefinition(DefaultListableBeanFactory.java:355)
> >  at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.getMergedB
> >  eanDefinition(AbstractBeanFactory.java:800)
> >  at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory.isSingleto
> >  n(AbstractBeanFactory.java:343)
> >  at
> >
> org.springframework.context.support.AbstractApplicationContext.isSinglet
> >  on(AbstractApplicationContext.java:654)
> >  at
> >  org.apache.wicket.spring.SpringBeanLocator.isSingletonBean
> (SpringBeanLoc
> >  ator.java:133)
> >  at
> >
> org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.get
> >  FieldValue(AnnotProxyFieldValueFactory.java:91)
> >  at org.apache.wicket.injection.Injector.inject(Injector.java:108)
> >  at
> >  org.apache.wicket.injection.ConfigurableInjector.inject
> (ConfigurableInje
> >  ctor.java:39)
> >  at
> >  org.apache.wicket.injection.ComponentInjector.onInstantiation
> (ComponentI
> >  njector.java:52)
> >  at
> >  org.apache.wicket.Application.notifyComponentInstantiationListeners
> (Appl
> >  ication.java:973)
> >  at org.apache.wicket.Component.(Component.java:866)
> >
> >  ... truncated for brevity
> >
> >  Using getSpringContext().contains(String) either within or as an
> exposed
> >  method of SpringBeanLocator would probably be sufficient to avoid
> >  hitting this exception.
> >
> >  Thanks,
> >  Larry
> >
> >  __
> >
> >  The information contained in this message is proprietary and/or
> confidential. If you are not the
> >  intended recipient, please: (i) delete the message and all copies; (ii)
> do not disclose,
> >  distribute or use the message in any manner; and (iii) notify the
> sender immediately. In addition,
> >  please be aware that any message addressed to our domain is subject to
> archiving and review by
> >  persons other than the intended recipient. Thank you.
> >  _
> >
> >  -
> >  To unsubscribe, e-mail: [EMAIL PROTECTED]
> >  For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> __
>
> The information contained in this message is proprietary and/or
> confidential. If you are not the
> intended recipient, please: (i) delete the message

DefaultDataTable not paging correctly

2008-03-20 Thread Greg Dunn
I followed the repeater examples to create a data table backed by a
SortableDataProvider but it's not paging correctly.  When the table
first loads, everything looks great, but whenever I click a paging link
I'm only getting the first 10 records back.  My debugging indicates my
SortableDataProvider is always getting a 0 for the 'first' parameter.
Any ideas why this would happen?

Thanks.



List columns = new ArrayList();
columns.add(new AbstractColumn(new Model("Actions")) {
public void populateItem(Item cellItem, String componentId,
IModel model) {
cellItem.add(new ActionPanel(componentId, model));
}
});
columns.add(new PropertyColumn(new Model("User ID"), "userId",
"userId"));
columns.add(new PropertyColumn(new Model("Company ID"), "cmpnyId",
"cmpnyId"));
columns.add(new PropertyColumn(new Model("User Name"), "userNm",
"userNm"));
add(new DefaultDataTable("table", columns,
new SortableUserDataProvider(user.getCompanyId()), 10));


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How do I elegantly put feedback per form field?

2008-03-20 Thread mnwicket

Take a look at the "Forms with Flair" example at http://londonwicket.org/

-Craig


Ned Collyer wrote:
> 
> How can I elegantly put a feedback panel per form field
> 
> eg,
> Email address is required
> Email: [__]
> 
> This is not a valid phone number
> Phone: [asfafadsfafa]
> 
> This seems like a common scenario, but it seems rather verbose to
> implement.
> What should I extend to enable this?  A form?  A text field?  A panel and
> add the required items.
> An example would be appreciated.
> 
> Rgds
> 
> Ned
> 

-- 
View this message in context: 
http://www.nabble.com/How-do-I-elegantly-put-feedback-per-form-field--tp16172288p16180547.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DefaultDataTable not paging correctly

2008-03-20 Thread KennyS

Could you provide the code for your SortableUserDataProvider, please?


Greg Dunn-3 wrote:
> 
> My debugging indicates my
> SortableDataProvider is always getting a 0 for the 'first' parameter.
> Any ideas why this would happen?
> 

-- 
View this message in context: 
http://www.nabble.com/DefaultDataTable-not-paging-correctly-tp16180335p16180973.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: DefaultDataTable not paging correctly

2008-03-20 Thread Greg Dunn
Sorry, here it is:

NB: I'm using Spring and iBatis.  iBatis *is* returning the expected
records based on what is getting passed to my DAO's (first 0, count 10).

public class SortableUserDataProvider extends SortableDataProvider {

List users;
Integer gwCmpnyId;

public SortableUserDataProvider() {
setSort("gwUserId", true);

ApplicationContext context;
context = new ClassPathXmlApplicationContext("WEB-INF" +
File.separator + "applicationContext.xml");
IGatewayUserDao gatewayUserDao =
(GatewayUserDao)context.getBean("gatewayUserDao");
users = gatewayUserDao.selectEveryUser();
}

public SortableUserDataProvider(Integer gwCmpnyId) {
setSort("gwUserId", true);

this.gwCmpnyId = gwCmpnyId;

ApplicationContext context;
context = new ClassPathXmlApplicationContext("WEB-INF" +
File.separator + "applicationContext.xml");
IGatewayUserDao gatewayUserDao =
(GatewayUserDao)context.getBean("gatewayUserDao");
users = gatewayUserDao.selectUserByCompany(gwCmpnyId);
}

public Iterator iterator(int first, int count) {

SortParam sp = getSort();

ApplicationContext context;
context = new ClassPathXmlApplicationContext("WEB-INF" +
File.separator + "applicationContext.xml");
IGatewayUserDao gatewayUserDao =
(GatewayUserDao)context.getBean("gatewayUserDao");
if (null != gwCmpnyId) {
users = gatewayUserDao.getSortableUserData(sp.getProperty(),
first, count, gwCmpnyId);
} else {
users = gatewayUserDao.getSortableUserData(sp.getProperty(),
first, count);
}

if (sp.isAscending()) {
BeanPropertyComparator comparator =
new BeanPropertyComparator(sp.getProperty(), new
CaseInsensitiveComparator());
Collections.sort(users, comparator);
} else {
BeanPropertyComparator comparator =
new BeanPropertyComparator(sp.getProperty(), new
CaseInsensitiveReverseComparator());
Collections.sort(users, comparator);
}

return users.iterator();
}

public int size() {
  return users.size();
}

public IModel model(Object object) {
return new DetachableUserModel((UserBean)object);
}
}

-Original Message-
From: KennyS [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 10:14 AM
To: users@wicket.apache.org
Subject: Re: DefaultDataTable not paging correctly


Could you provide the code for your SortableUserDataProvider, please?


Greg Dunn-3 wrote:
> 
> My debugging indicates my
> SortableDataProvider is always getting a 0 for the 'first' parameter.
> Any ideas why this would happen?
> 

-- 
View this message in context:
http://www.nabble.com/DefaultDataTable-not-paging-correctly-tp16180335p1
6180973.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How do I elegantly put feedback per form field?

2008-03-20 Thread Ned Collyer

Thanks Craig,

Perfect.

Super perfect :)


mnwicket wrote:
> 
> Take a look at the "Forms with Flair" example at http://londonwicket.org/
> 
> -Craig
> 

-- 
View this message in context: 
http://www.nabble.com/How-do-I-elegantly-put-feedback-per-form-field--tp16172288p16181115.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Javadoc problem ?

2008-03-20 Thread Eyal Golan
Has anyone noticed that there are many missing classes in
http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/index.html

Or am I missing something?
-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/


Re: Nice absolute urls - is this possible?

2008-03-20 Thread Johan Compagner
you are worried about what is in the source?
so you dont really need it for something else like in an email?

but wicket generates for itself relative urls
if you need a full for yourself you can use RequestUtils.toAbsolutePath

On Thu, Mar 20, 2008 at 11:36 AM, Java Programmer <[EMAIL PROTECTED]>
wrote:

> Hello,
>
> I have question about generated urls e.g. in examples on
> http://wicketstuff.org/wicket13/niceurl/the/homepage/path we have
> really nice urls, but they are realtive:
> 
>
> is there posiible to make them:
> 
> without ../../ but absolute for servlet mapped as:
> 
>wicket
>/*
> 
> even if I make /somepattern/* I don't
> recieve /somepattern/my/mounted/package/Page4/ without ../../
>
> I have read about WICKET-1205, and similar people problems with not
> working relative urls, but mine consider only HTML source to be nicer
> for web spiders (SEO and such things, my boss won't be happy with
> trailings ../../, but I would understand if it's wicket feature and
> can't be changed).
>
> Any solution is possible in this matter?
>
> Best regards,
> Adr
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: How do I elegantly put feedback per form field?

2008-03-20 Thread James Carman
On 3/20/08, Ned Collyer <[EMAIL PROTECTED]> wrote:
>
>  Thanks Craig,
>
>  Perfect.
>
>  Super perfect :)
>

Yeah, that's really cool!  I think I might borrow your ideas on our
project at work.  Thanks!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Javadoc problem ?

2008-03-20 Thread Martijn Dashorst
It would help if you would specify which classes you miss.

Martijn

On 3/20/08, Eyal Golan <[EMAIL PROTECTED]> wrote:
> Has anyone noticed that there are many missing classes in
>  http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/index.html
>
>  Or am I missing something?
>
> --
>  Eyal Golan
>  [EMAIL PROTECTED]
>
>  Visit: http://jvdrums.sourceforge.net/
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Javadoc problem ?

2008-03-20 Thread Gerolf Seitz
these are just the javadocs for the wicket core project.
you can find the classes for wicket-extensions here, in case you missed one
of
the classes in there:
http://wicket.apache.org/docs/wicket-1.3.2/wicket-extensions/apidocs/index.html

more projects (datetime, spring, ...) will follow soon.

  Gerolf

On Thu, Mar 20, 2008 at 4:35 PM, Eyal Golan <[EMAIL PROTECTED]> wrote:

> Has anyone noticed that there are many missing classes in
> http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/index.html
>
> Or am I missing something?
> --
> Eyal Golan
> [EMAIL PROTECTED]
>
> Visit: http://jvdrums.sourceforge.net/
>


Re: Javadoc problem ?

2008-03-20 Thread Sergej Logis
I assume missing classes are all from wicket-extensions package. 
There is (somewhat hidden) link to the "missing" part:
http://wicket.apache.org/docs/wicket-1.3.2/wicket-extensions/index.html

---
Sincerely,
Sergej Logiš
Software developer
Exigen Services
ICQ: 12510115



"Martijn Dashorst" <[EMAIL PROTECTED]> 
2008.03.20 17:46
Please respond to
users@wicket.apache.org


To
users@wicket.apache.org
cc

Subject
Re: Javadoc problem ?






It would help if you would specify which classes you miss.

Martijn

On 3/20/08, Eyal Golan <[EMAIL PROTECTED]> wrote:
> Has anyone noticed that there are many missing classes in
>  http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/index.html
>
>  Or am I missing something?
>
> --
>  Eyal Golan
>  [EMAIL PROTECTED]
>
>  Visit: http://jvdrums.sourceforge.net/
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: DefaultDataTable not paging correctly

2008-03-20 Thread KennyS

In the constructor that takes the company id in SortableUserDataProvider, you
are retrieving all users for the specified company id and assigning that to
the "users" class-level variable.  But, in the iterator() method, you
retrieve another subset (page) of users and assign it to the same "users"
class-level variable.  The size() method would then just return the number
of records in the subset, but actually needs the total number of rows to
page.

Here's an example SortableDataProvider (mostly stolen from the Wicket
examples) which uses 2 queries... 1 to get the paged number of users and 1
to get the total count.  Notice there is no need to return all users in the
system (or in your case, for a specific company), which may be problematic
from a performance standpoint.  Feedback welcome:

public class SortableUserDataProvider extends SortableDataProvider{

private static final long serialVersionUID = 271688819644192359L;

/**
 * constructor
 */
public SortableUserDataProvider()
{
// set default sort
setSort("firstName", true);
}

protected IUserService getUserService()
{
return ((KsxApplication)Application.get())
.getUserService();
}

/**
 * @see
org.apache.wicket.markup.repeater.data.IDataProvider#iterator(int, int)
 */
public Iterator iterator(int first, int pageSize)
{
SortParam sp = getSort();
int page = 0;
if (first != 0) {
page = first / pageSize;
}

return getUserService().findPage(page, pageSize, sp.getProperty(),
sp.isAscending()).iterator();
}

/**
 * @see org.apache.wicket.markup.repeater.data.IDataProvider#size()
 */
public int size()
{
return getUserService().findTotalCount();
}

/**
 * @see
org.apache.wicket.markup.repeater.data.IDataProvider#model(java.lang.Object)
 */
public IModel model(Object object)
{
return new DetachableUserModel((User)object);
}

}
-- 
View this message in context: 
http://www.nabble.com/DefaultDataTable-not-paging-correctly-tp16180335p16181887.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Display of own message in FeedbackPanel

2008-03-20 Thread Fabien D.

Hi everybody,

I'm a new french user of wicket, and i 'm apologizing in advance for english
and comprehension mistakes.

So, I want to display in a FeedbackPanel my own messages for especially
events. For example, in my suscribing panel, the user has to write twice his
password. So I want to check if these passwords are the same, and if not, to
display in the FeedbackPanel a message.

What objets i have to manipulate to instanciate the event and the message in
the FeedbackPanel ?? Is there any documentation?

Thank you in advance for your help :)


-- 
View this message in context: 
http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16182720.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Display of own message in FeedbackPanel

2008-03-20 Thread Greg Dunn
Wicket has a gadget for that since 1.2.  In your form:

add(new EqualPasswordInputValidator(password, repeatPassword));

-Original Message-
From: Fabien D. [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 11:25 AM
To: users@wicket.apache.org
Subject: Display of own message in FeedbackPanel


Hi everybody,

I'm a new french user of wicket, and i 'm apologizing in advance for
english
and comprehension mistakes.

So, I want to display in a FeedbackPanel my own messages for especially
events. For example, in my suscribing panel, the user has to write twice
his
password. So I want to check if these passwords are the same, and if
not, to
display in the FeedbackPanel a message.

What objets i have to manipulate to instanciate the event and the
message in
the FeedbackPanel ?? Is there any documentation?

Thank you in advance for your help :)


-- 
View this message in context:
http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720
p16182720.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Display of own message in FeedbackPanel

2008-03-20 Thread Scott Swank
You can use the EqualInputValidator to compare the password values.
Then you can override resourceKey() to tell Wicket to look for your
own error message in .properties.

On Thu, Mar 20, 2008 at 9:24 AM, Fabien D. <[EMAIL PROTECTED]> wrote:
>
>  Hi everybody,
>
>  I'm a new french user of wicket, and i 'm apologizing in advance for english
>  and comprehension mistakes.
>
>  So, I want to display in a FeedbackPanel my own messages for especially
>  events. For example, in my suscribing panel, the user has to write twice his
>  password. So I want to check if these passwords are the same, and if not, to
>  display in the FeedbackPanel a message.
>
>  What objets i have to manipulate to instanciate the event and the message in
>  the FeedbackPanel ?? Is there any documentation?
>
>  Thank you in advance for your help :)
>
>
>  --
>  View this message in context: 
> http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16182720.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Display of own message in FeedbackPanel

2008-03-20 Thread Martijn Dashorst
I wouldn't advise the EIV for password fields... the default message
will show the input values...

For password fields, we have: EqualPasswordInputValidator

Martijn

On 3/20/08, Scott Swank <[EMAIL PROTECTED]> wrote:
> You can use the EqualInputValidator to compare the password values.
>  Then you can override resourceKey() to tell Wicket to look for your
>  own error message in .properties.
>
>
>  On Thu, Mar 20, 2008 at 9:24 AM, Fabien D. <[EMAIL PROTECTED]> wrote:
>  >
>  >  Hi everybody,
>  >
>  >  I'm a new french user of wicket, and i 'm apologizing in advance for 
> english
>  >  and comprehension mistakes.
>  >
>  >  So, I want to display in a FeedbackPanel my own messages for especially
>  >  events. For example, in my suscribing panel, the user has to write twice 
> his
>  >  password. So I want to check if these passwords are the same, and if not, 
> to
>  >  display in the FeedbackPanel a message.
>  >
>  >  What objets i have to manipulate to instanciate the event and the message 
> in
>  >  the FeedbackPanel ?? Is there any documentation?
>  >
>  >  Thank you in advance for your help :)
>  >
>  >
>  >  --
>  >  View this message in context: 
> http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16182720.html
>  >  Sent from the Wicket - User mailing list archive at Nabble.com.
>  >
>  >
>  >  -
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Palette and on change notifications

2008-03-20 Thread Igor Vaynberg
recorder wont get onchange because its value is changed
pragmatically...you need to find another hook. maybe one of the
buttons or select boxes.

-igor


On Thu, Mar 20, 2008 at 5:20 AM, Piller Sébastien <[EMAIL PROTECTED]> wrote:
> Hello everybody,
>
>  I'm trying to get selection change notifications with the palette
>  component (I need a notification each time a user click on an item in
>  the palette). I saw that I need to attach an ajax behavior to the
>  recorder component of the palette. But I tried several ways of doing
>  that, it works not. How am I supposed to do this?
>
>  Thanks ;)
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Display of own message in FeedbackPanel

2008-03-20 Thread Fabien D.

Thank you all for you responding speed :) Amazing

Okay i will check tomorrow for this issue.But if my condition is not take
care by Feedback 

An other exemple, i want to check if the email of the user is already in my
database, and display a error message in my FeedbackPanel in this case.

How can i link my condition, the message and the panel?
-- 
View this message in context: 
http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16183431.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mounting and intercept pages

2008-03-20 Thread Igor Vaynberg
it all depends on what url your security strategy intercepts - that is
the url continuetoorigdest will use. so if your strategy intercepts a
bookmarkable url you should be good, but if it intercepts a link url
like ?wicket:interface that is where you will go back to...

-igor


On Thu, Mar 20, 2008 at 2:55 AM, Jörn Zaefferer
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I have a bookmarkable page with a single param, something like
>  domain/item/id/1. Now, to edit the item, the user has to login or
>  register first. After doing so, either using the login form on the
>  same page or using the register form on a different page, the user
>  must land on exactly the same page as before (domain/item/id/1). The
>  register page must be bookmarkable as well (eg. domain/register).
>
>  All my attempts of using Links, BookmarkablePageLinks and
>  redirectToInterceptPage all yield nothing or yet another URL like
>  "/?wicket:interface=:2" either directly or after the
>  redirect-back-to-original-target.
>
>  Any ideas how to achieve that?
>
>  Thanks
>  Jörn
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Igor Vaynberg
are you adding the bheavior to Radio or RadioGroup, it needs to go to
Radio components

-igor

On Thu, Mar 20, 2008 at 6:21 AM, Zhubin Salehi <[EMAIL PROTECTED]> wrote:
> Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no JavaScript 
> gets added to radio buttons.
>
>
>  -Original Message-
>  From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
>  Sent: Thursday, March 20, 2008 9:18 AM
>  To: users@wicket.apache.org
>
>
> Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a 
> FormComponentPanel
>
>  onclick doesn't work either.
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  Sent: Thursday, March 20, 2008 1:56 AM
>  To: users@wicket.apache.org
>  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a 
> FormComponentPanel
>
>  also, for what its worth, onclick works a lot better for this sort of
>  thing when dealing with check/readio html components
>
>  -igor
>
>
>  On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>  > i dont think browsers support an "onschange" event :)
>  >
>  >  -igor
>  >
>  >
>  >
>  >
>  >  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi <[EMAIL PROTECTED]> wrote:
>  >  > So now I wrote this code:
>  >  >
>  >  > nanp.add(new Radio("nanpTrue", new Model(new 
> Boolean(true;
>  >  > nanp.add(new Radio("nanpFalse", new Model(new 
> Boolean(false;
>  >  > nanp.add(new 
> AjaxFormComponentUpdatingBehavior("onschange") {
>  >  >
>  >  >
>  >  > private static final long serialVersionUID = 
> -1406454064553153207L;
>  >  >
>  >  > protected void onUpdate(AjaxRequestTarget 
> target) {
>  >  >
>  >  > nanp.processInput();
>  >  > target.addComponent(areaCode);
>  >  > target.addComponent(countryDialingCode);
>  >  > target.addComponent(routingDialingCode);
>  >  > }
>  >  > });
>  >  >
>  >  >  But onUpdate() method is not called when I change selection. What 
> should I do?
>  >  >
>  >  >  Thanks,
>  >  >  Zhubin
>  >  >
>  >  >
>  >  >
>  >  >  -Original Message-
>  >  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  >  Sent: Wednesday, March 19, 2008 6:04 PM
>  >  >  To: users@wicket.apache.org
>  >  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a 
> FormComponentPanel
>  >  >
>  >  >  ajax event behavior does not send over input. try
>  >  >  ajaxformcomponentupdatingbehavior.
>  >  >
>  >  >  -igor
>  >  >
>  >  >
>  >  >  On Wed, Mar 19, 2008 at 2:19 PM, Zhubin Salehi <[EMAIL PROTECTED]> 
> wrote:
>  >  >  > Hi all,
>  >  >  >
>  >  >  >  I'm trying to update some TextFields in a FormComponentPanel when 
> the user selects a radio button from a RadioGroup.
>  >  >  >
>  >  >  >  Here is a fragment of my code that created Radio and RadioGroup 
> objects:
>  >  >  >
>  >  >  > add(nanp = new RadioGroup("nanp", new 
> PropertyModel(this, "phoneNumber.nanp")));
>  >  >  > nanp.add(new Radio("nanpTrue", new Model(new 
> Boolean(true))).add(new AjaxEventBehavior("onchange") {
>  >  >  >
>  >  >  >   private static final long serialVersionUID = 
> -1406454064553153207L;
>  >  >  >
>  >  >  >   protected void onEvent(AjaxRequestTarget target) {
>  >  >  > nanp.processInput();
>  >  >  > target.addComponent(areaCode);
>  >  >  > target.addComponent(countryDialingCode);
>  >  >  > target.addComponent(routingDialingCode);
>  >  >  >   }
>  >  >  > }));
>  >  >  > nanp.add(new Radio("nanpFalse", new Model(new 
> Boolean(false))).add(new AjaxEventBehavior("onchange") {
>  >  >  >
>  >  >  >   private static final long serialVersionUID = 
> 6475950784724594836L;
>  >  >  >
>  >  >  >   protected void onEvent(AjaxRequestTarget target) {
>  >  >  > nanp.processInput();
>  >  >  > target.addComponent(areaCode);
>  >  >  > target.addComponent(countryDialingCode);
>  >  >  > target.addComponent(routingDialingCode);
>  >  >  >   }
>  >  >  > }));
>  >  >  >
>  >  >  >  The problem is that as soon as I click on one of the radio buttons, 
> I get the following exception:
>  >  >  >
>  >  >  >  WicketMessage: Can't convert null value to a primitive class: 
> boolean for setting it on [EMAIL PROTECTED]
>  >  >  >
>  >  >  >  Root cause:
>  >  >  >
>  >  >  >  org.apache.wicket.util.convert.ConversionException: Can't convert 
> null value to a primitive class: boolean for setting it on [EMAIL PROTECTED]
>  >  >  >  at 
> org.apache.wicket.util.lang.P

Re: Suggested Enhancement To Spring Support

2008-03-20 Thread Igor Vaynberg
also injection doesnt work with getters/setters but fields...

@SpringBean private MyService service;

that is all that is needed. no need to have a getter for what is a
private field...

-igor


On Thu, Mar 20, 2008 at 7:25 AM, Zappaterrini, Larry
<[EMAIL PROTECTED]> wrote:
> Thanks for the explanation, that makes perfect sense.
>
>  
>
>  From: lars vonk [mailto:[EMAIL PROTECTED]
>  Sent: Thu 3/20/2008 10:16 AM
>
>
> To: users@wicket.apache.org
>  Subject: Re: Suggested Enhancement To Spring Support
>
>
>
>  Spring support in Wicket works with proxies, so your services are not
>  Serialized by Wicket, but your Proxy is. With your suggestion your Service
>  will be Serialized and with it all its dependencies like DAO's etc. This
>  will most likely cause trouble when you are in a clustered environment and
>  use Session replication.
>
>  Also using this approach your Spring bean is no longer a singleton, but as
>  long as your beans are stateless this does not really matter.
>
>  - Lars
>
>  On Thu, Mar 20, 2008 at 2:44 PM, Zappaterrini, Larry <
>  [EMAIL PROTECTED]> wrote:
>
>  > I suppose I need to learn more about how Spring support is implemented in
>  > Wicket. My thinking was that the injected property would simply get set to
>  > null. Then the getter for that injected property can perform a null check
>  > and lazily initialize it with a default type if necessary:
>  >
>  > @SpringBean(name = "someService")
>  > private Service service;
>  >
>  > public Service getService() {
>  >if (service == null) {
>  >service = new DefaultService();
>  >}
>  >return service;
>  > }
>  >
>  > This allows for default implementation to be provided that can then be
>  > overridden by declaring the bean in Spring. I've used this type of pattern
>  > with Spring in other settings and thought it might be useful in Wicket too.
>  >
>  > 
>  >
>  > From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  > Sent: Wed 3/19/2008 5:49 PM
>  > To: users@wicket.apache.org
>  > Subject: Re: Suggested Enhancement To Spring Support
>  >
>  >
>  >
>  > you want to swallow the exception?
>  >
>  > then you would return a null into a proxy and cause an npe later...
>  >
>  > -igor
>  >
>  >
>  > On Wed, Mar 19, 2008 at 1:43 PM, Zappaterrini, Larry
>  > <[EMAIL PROTECTED]> wrote:
>  > > It might be a nice improvement to Wicket's Spring support to allow for
>  > >  missing bean definitions to be handled gracefully. This would allow for
>  > >  the use of a sane default in the absence of explicit declaration in the
>  > >  context XML. Right now using the Spring annotations support I get the
>  > >  following error when I don't define the object in the XML:
>  > >
>  > >  org.springframework.beans.factory.NoSuchBeanDefinitionException: No
>  > bean
>  > >  named 'beanName' is defined
>  > >  at
>  > >
>  > org.springframework.beans.factory.support.DefaultListableBeanFactory.get
>  > >  BeanDefinition(DefaultListableBeanFactory.java:355)
>  > >  at
>  > >
>  > org.springframework.beans.factory.support.AbstractBeanFactory.getMergedB
>  > >  eanDefinition(AbstractBeanFactory.java:800)
>  > >  at
>  > >
>  > org.springframework.beans.factory.support.AbstractBeanFactory.isSingleto
>  > >  n(AbstractBeanFactory.java:343)
>  > >  at
>  > >
>  > org.springframework.context.support.AbstractApplicationContext.isSinglet
>  > >  on(AbstractApplicationContext.java:654)
>  > >  at
>  > >  org.apache.wicket.spring.SpringBeanLocator.isSingletonBean
>  > (SpringBeanLoc
>  > >  ator.java:133)
>  > >  at
>  > >
>  > org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.get
>  > >  FieldValue(AnnotProxyFieldValueFactory.java:91)
>  > >  at org.apache.wicket.injection.Injector.inject(Injector.java:108)
>  > >  at
>  > >  org.apache.wicket.injection.ConfigurableInjector.inject
>  > (ConfigurableInje
>  > >  ctor.java:39)
>  > >  at
>  > >  org.apache.wicket.injection.ComponentInjector.onInstantiation
>  > (ComponentI
>  > >  njector.java:52)
>  > >  at
>  > >  org.apache.wicket.Application.notifyComponentInstantiationListeners
>  > (Appl
>  > >  ication.java:973)
>  > >  at org.apache.wicket.Component.(Component.java:866)
>  > >
>  > >  ... truncated for brevity
>  > >
>  > >  Using getSpringContext().contains(String) either within or as an
>  > exposed
>  > >  method of SpringBeanLocator would probably be sufficient to avoid
>  > >  hitting this exception.
>  > >
>  > >  Thanks,
>  > >  Larry
>  > >
>  > >  __
>  > >
>  > >  The information contained in this message is proprietary and/or
>  > confidential. If you are not the
>  > >  intended recipient, please: (i) delete the message and all copies; (ii)
>  > do not disclose,
>  > >  distribute or use the message in any manner; and (iii) notify the
>  > sender immediately. In addition,
>  > >  please be aware that any message addressed to our domain is subject

RE: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Zhubin Salehi
I'm adding AjaxFormComponentUpdatingBehavior to RadioGroup. If I add it to
Radio I get a runtime exception that says AjaxFormComponentUpdatingBehavior
can only be added to a FormComponent.

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 12:59 PM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
FormComponentPanel

are you adding the bheavior to Radio or RadioGroup, it needs to go to
Radio components

-igor

On Thu, Mar 20, 2008 at 6:21 AM, Zhubin Salehi <[EMAIL PROTECTED]>
wrote:
> Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no JavaScript
gets added to radio buttons.
>
>
>  -Original Message-
>  From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
>  Sent: Thursday, March 20, 2008 9:18 AM
>  To: users@wicket.apache.org
>
>
> Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
FormComponentPanel
>
>  onclick doesn't work either.
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  Sent: Thursday, March 20, 2008 1:56 AM
>  To: users@wicket.apache.org
>  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
FormComponentPanel
>
>  also, for what its worth, onclick works a lot better for this sort of
>  thing when dealing with check/readio html components
>
>  -igor
>
>
>  On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:
>  > i dont think browsers support an "onschange" event :)
>  >
>  >  -igor
>  >
>  >
>  >
>  >
>  >  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi
<[EMAIL PROTECTED]> wrote:
>  >  > So now I wrote this code:
>  >  >
>  >  > nanp.add(new Radio("nanpTrue", new Model(new
Boolean(true;
>  >  > nanp.add(new Radio("nanpFalse", new Model(new
Boolean(false;
>  >  > nanp.add(new
AjaxFormComponentUpdatingBehavior("onschange") {
>  >  >
>  >  >
>  >  > private static final long serialVersionUID =
-1406454064553153207L;
>  >  >
>  >  > protected void onUpdate(AjaxRequestTarget
target) {
>  >  >
>  >  > nanp.processInput();
>  >  > target.addComponent(areaCode);
>  >  >
target.addComponent(countryDialingCode);
>  >  >
target.addComponent(routingDialingCode);
>  >  > }
>  >  > });
>  >  >
>  >  >  But onUpdate() method is not called when I change selection. What
should I do?
>  >  >
>  >  >  Thanks,
>  >  >  Zhubin
>  >  >
>  >  >
>  >  >
>  >  >  -Original Message-
>  >  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  >  Sent: Wednesday, March 19, 2008 6:04 PM
>  >  >  To: users@wicket.apache.org
>  >  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in
a FormComponentPanel
>  >  >
>  >  >  ajax event behavior does not send over input. try
>  >  >  ajaxformcomponentupdatingbehavior.
>  >  >
>  >  >  -igor
>  >  >
>  >  >
>  >  >  On Wed, Mar 19, 2008 at 2:19 PM, Zhubin Salehi
<[EMAIL PROTECTED]> wrote:
>  >  >  > Hi all,
>  >  >  >
>  >  >  >  I'm trying to update some TextFields in a FormComponentPanel
when the user selects a radio button from a RadioGroup.
>  >  >  >
>  >  >  >  Here is a fragment of my code that created Radio and RadioGroup
objects:
>  >  >  >
>  >  >  > add(nanp = new RadioGroup("nanp", new
PropertyModel(this, "phoneNumber.nanp")));
>  >  >  > nanp.add(new Radio("nanpTrue", new Model(new
Boolean(true))).add(new AjaxEventBehavior("onchange") {
>  >  >  >
>  >  >  >   private static final long serialVersionUID =
-1406454064553153207L;
>  >  >  >
>  >  >  >   protected void onEvent(AjaxRequestTarget
target) {
>  >  >  > nanp.processInput();
>  >  >  > target.addComponent(areaCode);
>  >  >  > target.addComponent(countryDialingCode);
>  >  >  > target.addComponent(routingDialingCode);
>  >  >  >   }
>  >  >  > }));
>  >  >  > nanp.add(new Radio("nanpFalse", new Model(new
Boolean(false))).add(new AjaxEventBehavior("onchange") {
>  >  >  >
>  >  >  >   private static final long serialVersionUID =
6475950784724594836L;
>  >  >  >
>  >  >  >   protected void onEvent(AjaxRequestTarget
target) {
>  >  >  > nanp.processInput();
>  >  >  > target.addComponent(areaCode);
>  >  >  > target.addComponent(countryDialingCode);
>  >  >  > target.addComponent(routingDialingCode);
>  >  >  >   }
>  >  >  > }));
>  >  >  >
>  >  >  >  The problem is that as soon as I click on one of the radio
buttons, I get the following exception:
>  >  >  >
>  >  >  >  WicketMessage: Can't convert null value to a primitive class:
b

Re: Display of own message in FeedbackPanel

2008-03-20 Thread Igor Vaynberg
there are two ways.

one: write a validator: email.add(new ivalidator() {
validate(ivalidatable v) { if (!validemail(v.getvalue()) v.add(new
validationerror().setresourcekey("my.error")); }

two: do it in onsubmit handler of the form

form.onsubmit() { if (!validemail(email)) { error(getString("my.error")); }}

-igor


On Thu, Mar 20, 2008 at 9:52 AM, Fabien D. <[EMAIL PROTECTED]> wrote:
>
>  Thank you all for you responding speed :) Amazing
>
>  Okay i will check tomorrow for this issue.But if my condition is not take
>  care by Feedback
>
>  An other exemple, i want to check if the email of the user is already in my
>  database, and display a error message in my FeedbackPanel in this case.
>
>  How can i link my condition, the message and the panel?
>  --
>  View this message in context: 
> http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16183431.html
>
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Display of own message in FeedbackPanel

2008-03-20 Thread Martijn Dashorst
Create your own validator, or do the check in onSubmit(), and create
the error message using error().

Martijn

On 3/20/08, Fabien D. <[EMAIL PROTECTED]> wrote:
>
>  Thank you all for you responding speed :) Amazing
>
>  Okay i will check tomorrow for this issue.But if my condition is not take
>  care by Feedback
>
>  An other exemple, i want to check if the email of the user is already in my
>  database, and display a error message in my FeedbackPanel in this case.
>
>  How can i link my condition, the message and the panel?
>
> --
>  View this message in context: 
> http://www.nabble.com/Display-of-own-message-in-FeedbackPanel-tp16182720p16183431.html
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Igor Vaynberg
right. see AjaxFormChoiceComponentUpdatingBehavior

-igor


On Thu, Mar 20, 2008 at 10:02 AM, Zhubin Salehi
<[EMAIL PROTECTED]> wrote:
> I'm adding AjaxFormComponentUpdatingBehavior to RadioGroup. If I add it to
>  Radio I get a runtime exception that says AjaxFormComponentUpdatingBehavior
>  can only be added to a FormComponent.
>
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>
>
> Sent: Thursday, March 20, 2008 12:59 PM
>  To: users@wicket.apache.org
>  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>
>  are you adding the bheavior to Radio or RadioGroup, it needs to go to
>  Radio components
>
>  -igor
>
>  On Thu, Mar 20, 2008 at 6:21 AM, Zhubin Salehi <[EMAIL PROTECTED]>
>  wrote:
>  > Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no JavaScript
>  gets added to radio buttons.
>  >
>  >
>  >  -Original Message-
>  >  From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
>  >  Sent: Thursday, March 20, 2008 9:18 AM
>  >  To: users@wicket.apache.org
>  >
>  >
>  > Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>  >
>  >  onclick doesn't work either.
>  >
>  >  -Original Message-
>  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  Sent: Thursday, March 20, 2008 1:56 AM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>  >
>  >  also, for what its worth, onclick works a lot better for this sort of
>  >  thing when dealing with check/readio html components
>  >
>  >  -igor
>  >
>  >
>  >  On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg <[EMAIL PROTECTED]>
>  wrote:
>  >  > i dont think browsers support an "onschange" event :)
>  >  >
>  >  >  -igor
>  >  >
>  >  >
>  >  >
>  >  >
>  >  >  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi
>  <[EMAIL PROTECTED]> wrote:
>  >  >  > So now I wrote this code:
>  >  >  >
>  >  >  > nanp.add(new Radio("nanpTrue", new Model(new
>  Boolean(true;
>  >  >  > nanp.add(new Radio("nanpFalse", new Model(new
>  Boolean(false;
>  >  >  > nanp.add(new
>  AjaxFormComponentUpdatingBehavior("onschange") {
>  >  >  >
>  >  >  >
>  >  >  > private static final long serialVersionUID =
>  -1406454064553153207L;
>  >  >  >
>  >  >  > protected void onUpdate(AjaxRequestTarget
>  target) {
>  >  >  >
>  >  >  > nanp.processInput();
>  >  >  > target.addComponent(areaCode);
>  >  >  >
>  target.addComponent(countryDialingCode);
>  >  >  >
>  target.addComponent(routingDialingCode);
>  >  >  > }
>  >  >  > });
>  >  >  >
>  >  >  >  But onUpdate() method is not called when I change selection. What
>  should I do?
>  >  >  >
>  >  >  >  Thanks,
>  >  >  >  Zhubin
>  >  >  >
>  >  >  >
>  >  >  >
>  >  >  >  -Original Message-
>  >  >  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  >  >  Sent: Wednesday, March 19, 2008 6:04 PM
>  >  >  >  To: users@wicket.apache.org
>  >  >  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in
>  a FormComponentPanel
>  >  >  >
>  >  >  >  ajax event behavior does not send over input. try
>  >  >  >  ajaxformcomponentupdatingbehavior.
>  >  >  >
>  >  >  >  -igor
>  >  >  >
>  >  >  >
>  >  >  >  On Wed, Mar 19, 2008 at 2:19 PM, Zhubin Salehi
>  <[EMAIL PROTECTED]> wrote:
>  >  >  >  > Hi all,
>  >  >  >  >
>  >  >  >  >  I'm trying to update some TextFields in a FormComponentPanel
>  when the user selects a radio button from a RadioGroup.
>  >  >  >  >
>  >  >  >  >  Here is a fragment of my code that created Radio and RadioGroup
>  objects:
>  >  >  >  >
>  >  >  >  > add(nanp = new RadioGroup("nanp", new
>  PropertyModel(this, "phoneNumber.nanp")));
>  >  >  >  > nanp.add(new Radio("nanpTrue", new Model(new
>  Boolean(true))).add(new AjaxEventBehavior("onchange") {
>  >  >  >  >
>  >  >  >  >   private static final long serialVersionUID =
>  -1406454064553153207L;
>  >  >  >  >
>  >  >  >  >   protected void onEvent(AjaxRequestTarget
>  target) {
>  >  >  >  > nanp.processInput();
>  >  >  >  > target.addComponent(areaCode);
>  >  >  >  > target.addComponent(countryDialingCode);
>  >  >  >  > target.addComponent(routingDialingCode);
>  >  >  >  >   }
>  >  >  >  > }));
>  >  >  >  > nanp.add(new Radio("nanpFalse", new Model(new
>  Boolean(false))).add(new AjaxEventBehavior("onchange") {
>  >  >  >  >
>  >  >  >  >   private static final long serialVersionUID =
>  6475950784724594836L;
>  >  >  >  >
>  >  >  >  >   protected void onEvent(AjaxRequestTarget
>  target) {

RE: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Zhubin Salehi
I added the AjaxFormChoiceComponentUpdatingBehavior to Radio objects and I
got a runtime exception (can only be added to...), then I added it to the
RadioGroup and nothing happens when I change the selection!

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 1:07 PM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
FormComponentPanel

right. see AjaxFormChoiceComponentUpdatingBehavior

-igor


On Thu, Mar 20, 2008 at 10:02 AM, Zhubin Salehi
<[EMAIL PROTECTED]> wrote:
> I'm adding AjaxFormComponentUpdatingBehavior to RadioGroup. If I add it to
>  Radio I get a runtime exception that says
AjaxFormComponentUpdatingBehavior
>  can only be added to a FormComponent.
>
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>
>
> Sent: Thursday, March 20, 2008 12:59 PM
>  To: users@wicket.apache.org
>  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>
>  are you adding the bheavior to Radio or RadioGroup, it needs to go to
>  Radio components
>
>  -igor
>
>  On Thu, Mar 20, 2008 at 6:21 AM, Zhubin Salehi <[EMAIL PROTECTED]>
>  wrote:
>  > Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no
JavaScript
>  gets added to radio buttons.
>  >
>  >
>  >  -Original Message-
>  >  From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
>  >  Sent: Thursday, March 20, 2008 9:18 AM
>  >  To: users@wicket.apache.org
>  >
>  >
>  > Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>  >
>  >  onclick doesn't work either.
>  >
>  >  -Original Message-
>  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  Sent: Thursday, March 20, 2008 1:56 AM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>  >
>  >  also, for what its worth, onclick works a lot better for this sort of
>  >  thing when dealing with check/readio html components
>  >
>  >  -igor
>  >
>  >
>  >  On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg
<[EMAIL PROTECTED]>
>  wrote:
>  >  > i dont think browsers support an "onschange" event :)
>  >  >
>  >  >  -igor
>  >  >
>  >  >
>  >  >
>  >  >
>  >  >  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi
>  <[EMAIL PROTECTED]> wrote:
>  >  >  > So now I wrote this code:
>  >  >  >
>  >  >  > nanp.add(new Radio("nanpTrue", new Model(new
>  Boolean(true;
>  >  >  > nanp.add(new Radio("nanpFalse", new Model(new
>  Boolean(false;
>  >  >  > nanp.add(new
>  AjaxFormComponentUpdatingBehavior("onschange") {
>  >  >  >
>  >  >  >
>  >  >  > private static final long
serialVersionUID =
>  -1406454064553153207L;
>  >  >  >
>  >  >  > protected void onUpdate(AjaxRequestTarget
>  target) {
>  >  >  >
>  >  >  > nanp.processInput();
>  >  >  > target.addComponent(areaCode);
>  >  >  >
>  target.addComponent(countryDialingCode);
>  >  >  >
>  target.addComponent(routingDialingCode);
>  >  >  > }
>  >  >  > });
>  >  >  >
>  >  >  >  But onUpdate() method is not called when I change selection.
What
>  should I do?
>  >  >  >
>  >  >  >  Thanks,
>  >  >  >  Zhubin
>  >  >  >
>  >  >  >
>  >  >  >
>  >  >  >  -Original Message-
>  >  >  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  >  >  Sent: Wednesday, March 19, 2008 6:04 PM
>  >  >  >  To: users@wicket.apache.org
>  >  >  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior
in
>  a FormComponentPanel
>  >  >  >
>  >  >  >  ajax event behavior does not send over input. try
>  >  >  >  ajaxformcomponentupdatingbehavior.
>  >  >  >
>  >  >  >  -igor
>  >  >  >
>  >  >  >
>  >  >  >  On Wed, Mar 19, 2008 at 2:19 PM, Zhubin Salehi
>  <[EMAIL PROTECTED]> wrote:
>  >  >  >  > Hi all,
>  >  >  >  >
>  >  >  >  >  I'm trying to update some TextFields in a FormComponentPanel
>  when the user selects a radio button from a RadioGroup.
>  >  >  >  >
>  >  >  >  >  Here is a fragment of my code that created Radio and
RadioGroup
>  objects:
>  >  >  >  >
>  >  >  >  > add(nanp = new RadioGroup("nanp", new
>  PropertyModel(this, "phoneNumber.nanp")));
>  >  >  >  > nanp.add(new Radio("nanpTrue", new Model(new
>  Boolean(true))).add(new AjaxEventBehavior("onchange") {
>  >  >  >  >
>  >  >  >  >   private static final long serialVersionUID =
>  -1406454064553153207L;
>  >  >  >  >
>  >  >  >  >   protected void onEvent(AjaxRequestTarget
>  target) {
>  >  >  >  > nanp.processInput();
>  >  >  >  > target.addComponent(areaCode);
>  >  >  >  >
target.addComponent(countryDialingCode);
>  >  >  >  >
target.addComponent(routingDialingCode);
>  >  >  >  >   

RE: error occurs in IE when I click on button in wicket application deployed in JBoss

2008-03-20 Thread Patel, Sanjay
Hi,
 
I am trying to deploy a small wicket application in JBoss. It works fine in 
fire fox and does not work in IE. 
I access my application at " http://localhost/";
When I click on any button in my application it goes to   
http://localhost/./  and it display "Directory Listing For /" in my browser.
It works fine if I click on any link. The problem is only when I click on any 
button.
 
If I mount the pages then it works without any problem.
 
I am using Wicket Version 1.3.2 and JBoss 4.0.5 GA.
 
My jboss-web.xml looks like as below.
 

http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd> 
http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd";>

 / 

 
My web.xml looks like below.
 

http://java.sun.com/xml/ns/j2ee> 
http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="   
http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="   
http://java.sun.com/xml/ns/j2ee  
 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
 version="2.4">
 
wicket-test-project
 
 
wicket.test

org.apache.wicket.protocol.http.WicketFilter

applicationClassName
org.nemours.test.ui.WicketApplication


   configuration
   deployment



wicket.test
/*





-Original Message-
From: Patel, Sanjay [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 9:18 AM
To: users@wicket.apache.org
Subject: error occurs in IE when I click on button in wicket application 
deployed in JBoss



I developed small wicket application. It is address book kind of application 
and it has "add new contact" , "edit", "delete" button. I deployed it in JBoss 
4.0. It works good in FireFox but in IE when I click on any button it is not 
able find the page. Please see the attached screen shot so you  have an idea.

<> 

is anybody experienced this problem? 

Sanjay Patel 
Application Engineer 
Web Team 
Nemours 

"NOTICE...This electronic transmission is intended only for the person(s) 
named. It may contain information that is (i) proprietary to the sender, and/or 
(ii) privileged, confidential and/or otherwise exempt from disclosure under 
applicable State and Federal law, including, but not limited to, privacy 
standards imposed pursuant to the federal Health Insurance Portability and 
Accountability Act of 1996 (HIPAA). Receipt by anyone other than the named 
recipient(s) is not a waiver of any applicable privilege. If you received this 
confidential communication in error, please notify the sender immediately by 
reply e-mail message and permanently delete the original message from your 
system."



RE: DefaultDataTable not paging correctly

2008-03-20 Thread Greg Dunn
Thanks, I'm keeping all my users, and the sorting and paging work now.

There is one glitch though, when I click a column header to resort, I'm
only resorting the items that are in view on the current page, not the
entire set.  That doesn't seem right, can it be rectified?

-Original Message-
From: KennyS [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 10:52 AM
To: users@wicket.apache.org
Subject: RE: DefaultDataTable not paging correctly


In the constructor that takes the company id in
SortableUserDataProvider, you
are retrieving all users for the specified company id and assigning that
to
the "users" class-level variable.  But, in the iterator() method, you
retrieve another subset (page) of users and assign it to the same
"users"
class-level variable.  The size() method would then just return the
number
of records in the subset, but actually needs the total number of rows to
page.

Here's an example SortableDataProvider (mostly stolen from the Wicket
examples) which uses 2 queries... 1 to get the paged number of users and
1
to get the total count.  Notice there is no need to return all users in
the
system (or in your case, for a specific company), which may be
problematic
from a performance standpoint.  Feedback welcome:

public class SortableUserDataProvider extends SortableDataProvider{

private static final long serialVersionUID =
271688819644192359L;

/**
 * constructor
 */
public SortableUserDataProvider()
{
// set default sort
setSort("firstName", true);
}

protected IUserService getUserService()
{
return ((KsxApplication)Application.get())
.getUserService();
}

/**
 * @see
org.apache.wicket.markup.repeater.data.IDataProvider#iterator(int, int)
 */
public Iterator iterator(int first, int pageSize)
{
SortParam sp = getSort();
int page = 0;
if (first != 0) {
page = first / pageSize;
}

return getUserService().findPage(page, pageSize,
sp.getProperty(),
sp.isAscending()).iterator();
}

/**
 * @see org.apache.wicket.markup.repeater.data.IDataProvider#size()
 */
public int size()
{
return getUserService().findTotalCount();
}

/**
 * @see
org.apache.wicket.markup.repeater.data.IDataProvider#model(java.lang.Obj
ect)
 */
public IModel model(Object object)
{
return new DetachableUserModel((User)object);
}

}
-- 
View this message in context:
http://www.nabble.com/DefaultDataTable-not-paging-correctly-tp16180335p1
6181887.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mounting and intercept pages

2008-03-20 Thread Jörn Zaefferer
I don't have or use any security strategy (yet). The user can visit
every page, but can't use everything until logged in. Though I don't
see how that should interfere with manual intercepts and bookmarkable
links.

Other ideas?

Jörn

On Thu, Mar 20, 2008 at 5:55 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> it all depends on what url your security strategy intercepts - that is
>  the url continuetoorigdest will use. so if your strategy intercepts a
>  bookmarkable url you should be good, but if it intercepts a link url
>  like ?wicket:interface that is where you will go back to...
>
>  -igor
>
>
>  On Thu, Mar 20, 2008 at 2:55 AM, Jörn Zaefferer
>
> <[EMAIL PROTECTED]> wrote:
>
>
> > Hi,
>  >
>  >  I have a bookmarkable page with a single param, something like
>  >  domain/item/id/1. Now, to edit the item, the user has to login or
>  >  register first. After doing so, either using the login form on the
>  >  same page or using the register form on a different page, the user
>  >  must land on exactly the same page as before (domain/item/id/1). The
>  >  register page must be bookmarkable as well (eg. domain/register).
>  >
>  >  All my attempts of using Links, BookmarkablePageLinks and
>  >  redirectToInterceptPage all yield nothing or yet another URL like
>  >  "/?wicket:interface=:2" either directly or after the
>  >  redirect-back-to-original-target.
>  >
>  >  Any ideas how to achieve that?
>  >
>  >  Thanks
>  >  Jörn
>  >
>
>
> >  -
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



optional components in markup

2008-03-20 Thread Andrew Broderick
Hi,

Is there a way to mark a component in markup as optional, so it renders it if 
it's there, but leaves it out if not? Or, if I don't want a certain component 
to appear (decided by logic at runtime), do I just have to insert a 
"placeholder" component, such as an empty label?

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


Re: optional components in markup

2008-03-20 Thread James Carman
On 3/20/08, Andrew Broderick <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  Is there a way to mark a component in markup as optional, so it renders it 
> if it's there, but leaves it out if not? Or, if I don't want a certain 
> component to appear (decided by logic at runtime), do I just have to insert a 
> "placeholder" component, such as an empty label?
>

Use the "visible" property on the component.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: DefaultDataTable not paging correctly

2008-03-20 Thread Kenny Stainback

I would not perform an in-memory sort of the entire collection you are
attempting to page, as in your example.  One benefit of paging is not having
to return the entire dataset from the backend.  If your company has hundreds
or thousands of users, this will become a performance issue.

In the example I posted, the backend returns the paged set of users in the
correct sort order, based on the specified page, pageSize, sort property and
asc/desc specifier:

return getUserService().findPage(page, pageSize, sp.getProperty(),
sp.isAscending()).iterator();

You can use your database specific syntax to retrieve a subset of rows (for
MySQL, you would use the "limit" function, etc.) OR if you are using
Hibernate or EJB3, use the Query object's setFirstResult() and
setMaxResult() methods.  Oops... you mentioned you are using IBatis, so take
the database-specific route.


Greg Dunn-3 wrote:
> 
> There is one glitch though, when I click a column header to resort, I'm
> only resorting the items that are in view on the current page, not the
> entire set.  That doesn't seem right, can it be rectified?
> 
 
-- 
View this message in context: 
http://www.nabble.com/DefaultDataTable-not-paging-correctly-tp16180335p16184993.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: error occurs in IE when I click on button in wicket application deployed in JBoss

2008-03-20 Thread Patel, Sanjay
some more information.

If I use sub context in jboss-web.xml then it works fine. 
e.g.

 /wtp 


One thing I found out is,
If I click on button and the response page is not mounted, it does not work.
If I click on button and the response page is mounted, it works fine.


-Original Message-
From: Patel, Sanjay [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 1:23 PM
To: users@wicket.apache.org
Subject: RE: error occurs in IE when I click on button in wicket
application deployed in JBoss


Hi,
 
I am trying to deploy a small wicket application in JBoss. It works fine in 
fire fox and does not work in IE. 
I access my application at " http://localhost/";
When I click on any button in my application it goes to   
http://localhost/./  and it display "Directory Listing For /" in my browser.
It works fine if I click on any link. The problem is only when I click on any 
button.
 
If I mount the pages then it works without any problem.
 
I am using Wicket Version 1.3.2 and JBoss 4.0.5 GA.
 
My jboss-web.xml looks like as below.
 

http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd> 
http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd";>

 / 

 
My web.xml looks like below.
 

http://java.sun.com/xml/ns/j2ee> 
http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="   
http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="   
http://java.sun.com/xml/ns/j2ee  
 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
 version="2.4">
 
wicket-test-project
 
 
wicket.test

org.apache.wicket.protocol.http.WicketFilter

applicationClassName
org.nemours.test.ui.WicketApplication


   configuration
   deployment



wicket.test
/*





-Original Message-
From: Patel, Sanjay [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 9:18 AM
To: users@wicket.apache.org
Subject: error occurs in IE when I click on button in wicket application 
deployed in JBoss



I developed small wicket application. It is address book kind of application 
and it has "add new contact" , "edit", "delete" button. I deployed it in JBoss 
4.0. It works good in FireFox but in IE when I click on any button it is not 
able find the page. Please see the attached screen shot so you  have an idea.

<> 

is anybody experienced this problem? 

Sanjay Patel 
Application Engineer 
Web Team 
Nemours 

"NOTICE...This electronic transmission is intended only for the person(s) 
named. It may contain information that is (i) proprietary to the sender, and/or 
(ii) privileged, confidential and/or otherwise exempt from disclosure under 
applicable State and Federal law, including, but not limited to, privacy 
standards imposed pursuant to the federal Health Insurance Portability and 
Accountability Act of 1996 (HIPAA). Receipt by anyone other than the named 
recipient(s) is not a waiver of any applicable privilege. If you received this 
confidential communication in error, please notify the sender immediately by 
reply e-mail message and permanently delete the original message from your 
system."



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Zhubin Salehi
OK, now I changed my code to this:

add(nanp = new RadioChoice("nanp", new PropertyModel(this,
"phoneNumber.nanp"), Arrays.asList(new String[] {
"true", "false" })));
nanp.add(new AjaxFormComponentUpdatingBehavior("onclick") {

private static final long serialVersionUID =
-1406454064553153207L;

@Override
protected void onUpdate(AjaxRequestTarget target) {
nanp.processInput();
target.addComponent(areaCode);
target.addComponent(countryDialingCode);
target.addComponent(routingDialingCode);
}
});

What I don't understand is that when I click on a radio button and
onUpdate() gets called, RadioChoice.convertedInput is null.

-Original Message-
From: Zhubin Salehi [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 1:17 PM
To: users@wicket.apache.org
Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
FormComponentPanel

I added the AjaxFormChoiceComponentUpdatingBehavior to Radio objects and I
got a runtime exception (can only be added to...), then I added it to the
RadioGroup and nothing happens when I change the selection!

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 1:07 PM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
FormComponentPanel

right. see AjaxFormChoiceComponentUpdatingBehavior

-igor


On Thu, Mar 20, 2008 at 10:02 AM, Zhubin Salehi
<[EMAIL PROTECTED]> wrote:
> I'm adding AjaxFormComponentUpdatingBehavior to RadioGroup. If I add it to
>  Radio I get a runtime exception that says
AjaxFormComponentUpdatingBehavior
>  can only be added to a FormComponent.
>
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>
>
> Sent: Thursday, March 20, 2008 12:59 PM
>  To: users@wicket.apache.org
>  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>
>  are you adding the bheavior to Radio or RadioGroup, it needs to go to
>  Radio components
>
>  -igor
>
>  On Thu, Mar 20, 2008 at 6:21 AM, Zhubin Salehi <[EMAIL PROTECTED]>
>  wrote:
>  > Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no
JavaScript
>  gets added to radio buttons.
>  >
>  >
>  >  -Original Message-
>  >  From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
>  >  Sent: Thursday, March 20, 2008 9:18 AM
>  >  To: users@wicket.apache.org
>  >
>  >
>  > Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>  >
>  >  onclick doesn't work either.
>  >
>  >  -Original Message-
>  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  Sent: Thursday, March 20, 2008 1:56 AM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>  >
>  >  also, for what its worth, onclick works a lot better for this sort of
>  >  thing when dealing with check/readio html components
>  >
>  >  -igor
>  >
>  >
>  >  On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg
<[EMAIL PROTECTED]>
>  wrote:
>  >  > i dont think browsers support an "onschange" event :)
>  >  >
>  >  >  -igor
>  >  >
>  >  >
>  >  >
>  >  >
>  >  >  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi
>  <[EMAIL PROTECTED]> wrote:
>  >  >  > So now I wrote this code:
>  >  >  >
>  >  >  > nanp.add(new Radio("nanpTrue", new Model(new
>  Boolean(true;
>  >  >  > nanp.add(new Radio("nanpFalse", new Model(new
>  Boolean(false;
>  >  >  > nanp.add(new
>  AjaxFormComponentUpdatingBehavior("onschange") {
>  >  >  >
>  >  >  >
>  >  >  > private static final long
serialVersionUID =
>  -1406454064553153207L;
>  >  >  >
>  >  >  > protected void onUpdate(AjaxRequestTarget
>  target) {
>  >  >  >
>  >  >  > nanp.processInput();
>  >  >  > target.addComponent(areaCode);
>  >  >  >
>  target.addComponent(countryDialingCode);
>  >  >  >
>  target.addComponent(routingDialingCode);
>  >  >  > }
>  >  >  > });
>  >  >  >
>  >  >  >  But onUpdate() method is not called when I change selection.
What
>  should I do?
>  >  >  >
>  >  >  >  Thanks,
>  >  >  >  Zhubin
>  >  >  >
>  >  >  >
>  >  >  >
>  >  >  >  -Original Message-
>  >  >  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  >  >  Sent: Wednesday, March 19, 2008 6:04 PM
>  >  >  >  To: users@wicket.apache.org
>  >  >  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior
in
>  a FormComponentPanel
>  >  >  >
>  >  >  >  ajax event behavior does not send over input. try
>  >  >  >  ajaxformcomponent

Re: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Igor Vaynberg
in onupdate you should be calling getmodelobject()

-igor


On Thu, Mar 20, 2008 at 10:55 AM, Zhubin Salehi
<[EMAIL PROTECTED]> wrote:
> OK, now I changed my code to this:
>
> add(nanp = new RadioChoice("nanp", new PropertyModel(this,
>  "phoneNumber.nanp"), Arrays.asList(new String[] {
> "true", "false" })));
> nanp.add(new AjaxFormComponentUpdatingBehavior("onclick") {
>
>
> private static final long serialVersionUID =
>  -1406454064553153207L;
>
> @Override
>
> protected void onUpdate(AjaxRequestTarget target) {
> nanp.processInput();
> target.addComponent(areaCode);
> target.addComponent(countryDialingCode);
> target.addComponent(routingDialingCode);
> }
> });
>
>  What I don't understand is that when I click on a radio button and
>  onUpdate() gets called, RadioChoice.convertedInput is null.
>
>
>  -Original Message-
>  From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
>
> Sent: Thursday, March 20, 2008 1:17 PM
>  To: users@wicket.apache.org
>
>
> Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>
>  I added the AjaxFormChoiceComponentUpdatingBehavior to Radio objects and I
>  got a runtime exception (can only be added to...), then I added it to the
>  RadioGroup and nothing happens when I change the selection!
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  Sent: Thursday, March 20, 2008 1:07 PM
>  To: users@wicket.apache.org
>  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>
>  right. see AjaxFormChoiceComponentUpdatingBehavior
>
>  -igor
>
>
>  On Thu, Mar 20, 2008 at 10:02 AM, Zhubin Salehi
>  <[EMAIL PROTECTED]> wrote:
>  > I'm adding AjaxFormComponentUpdatingBehavior to RadioGroup. If I add it to
>  >  Radio I get a runtime exception that says
>  AjaxFormComponentUpdatingBehavior
>  >  can only be added to a FormComponent.
>  >
>  >
>  >  -Original Message-
>  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >
>  >
>  > Sent: Thursday, March 20, 2008 12:59 PM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  >  FormComponentPanel
>  >
>  >  are you adding the bheavior to Radio or RadioGroup, it needs to go to
>  >  Radio components
>  >
>  >  -igor
>  >
>  >  On Thu, Mar 20, 2008 at 6:21 AM, Zhubin Salehi <[EMAIL PROTECTED]>
>  >  wrote:
>  >  > Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no
>  JavaScript
>  >  gets added to radio buttons.
>  >  >
>  >  >
>  >  >  -Original Message-
>  >  >  From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
>  >  >  Sent: Thursday, March 20, 2008 9:18 AM
>  >  >  To: users@wicket.apache.org
>  >  >
>  >  >
>  >  > Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
>  >  FormComponentPanel
>  >  >
>  >  >  onclick doesn't work either.
>  >  >
>  >  >  -Original Message-
>  >  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  >  Sent: Thursday, March 20, 2008 1:56 AM
>  >  >  To: users@wicket.apache.org
>  >  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  >  FormComponentPanel
>  >  >
>  >  >  also, for what its worth, onclick works a lot better for this sort of
>  >  >  thing when dealing with check/readio html components
>  >  >
>  >  >  -igor
>  >  >
>  >  >
>  >  >  On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg
>  <[EMAIL PROTECTED]>
>  >  wrote:
>  >  >  > i dont think browsers support an "onschange" event :)
>  >  >  >
>  >  >  >  -igor
>  >  >  >
>  >  >  >
>  >  >  >
>  >  >  >
>  >  >  >  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi
>  >  <[EMAIL PROTECTED]> wrote:
>  >  >  >  > So now I wrote this code:
>  >  >  >  >
>  >  >  >  > nanp.add(new Radio("nanpTrue", new Model(new
>  >  Boolean(true;
>  >  >  >  > nanp.add(new Radio("nanpFalse", new Model(new
>  >  Boolean(false;
>  >  >  >  > nanp.add(new
>  >  AjaxFormComponentUpdatingBehavior("onschange") {
>  >  >  >  >
>  >  >  >  >
>  >  >  >  > private static final long
>  serialVersionUID =
>  >  -1406454064553153207L;
>  >  >  >  >
>  >  >  >  > protected void onUpdate(AjaxRequestTarget
>  >  target) {
>  >  >  >  >
>  >  >  >  > nanp.processInput();
>  >  >  >  > target.addComponent(areaCode);
>  >  >  >  >
>  >  target.addComponent(countryDialingCode);
>  >  >  >  >
>  >  target.addComponent(routingDialingCode);
>  >  >  >  > }
>  >  >  >  > });
>  >  >  >  >
>  >  >  >  >  But onUpdate() method is not called when 

Re: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Igor Vaynberg
there is also a bug report in jira for formchoice..behavior, see if
that affects you...

-igor


On Thu, Mar 20, 2008 at 11:08 AM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> in onupdate you should be calling getmodelobject()
>
>  -igor
>
>
>  On Thu, Mar 20, 2008 at 10:55 AM, Zhubin Salehi
>
>
> <[EMAIL PROTECTED]> wrote:
>  > OK, now I changed my code to this:
>  >
>  > add(nanp = new RadioChoice("nanp", new PropertyModel(this,
>  >  "phoneNumber.nanp"), Arrays.asList(new String[] {
>  > "true", "false" })));
>  > nanp.add(new AjaxFormComponentUpdatingBehavior("onclick") {
>  >
>  >
>  > private static final long serialVersionUID =
>  >  -1406454064553153207L;
>  >
>  > @Override
>  >
>  > protected void onUpdate(AjaxRequestTarget target) {
>  > nanp.processInput();
>  > target.addComponent(areaCode);
>  > target.addComponent(countryDialingCode);
>  > target.addComponent(routingDialingCode);
>  > }
>  > });
>  >
>  >  What I don't understand is that when I click on a radio button and
>  >  onUpdate() gets called, RadioChoice.convertedInput is null.
>  >
>  >
>  >  -Original Message-
>  >  From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
>  >
>  > Sent: Thursday, March 20, 2008 1:17 PM
>  >  To: users@wicket.apache.org
>  >
>  >
>  > Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
>  >  FormComponentPanel
>  >
>  >  I added the AjaxFormChoiceComponentUpdatingBehavior to Radio objects and I
>  >  got a runtime exception (can only be added to...), then I added it to the
>  >  RadioGroup and nothing happens when I change the selection!
>  >
>  >  -Original Message-
>  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  Sent: Thursday, March 20, 2008 1:07 PM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  >  FormComponentPanel
>  >
>  >  right. see AjaxFormChoiceComponentUpdatingBehavior
>  >
>  >  -igor
>  >
>  >
>  >  On Thu, Mar 20, 2008 at 10:02 AM, Zhubin Salehi
>  >  <[EMAIL PROTECTED]> wrote:
>  >  > I'm adding AjaxFormComponentUpdatingBehavior to RadioGroup. If I add it 
> to
>  >  >  Radio I get a runtime exception that says
>  >  AjaxFormComponentUpdatingBehavior
>  >  >  can only be added to a FormComponent.
>  >  >
>  >  >
>  >  >  -Original Message-
>  >  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  >
>  >  >
>  >  > Sent: Thursday, March 20, 2008 12:59 PM
>  >  >  To: users@wicket.apache.org
>  >  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  >  >  FormComponentPanel
>  >  >
>  >  >  are you adding the bheavior to Radio or RadioGroup, it needs to go to
>  >  >  Radio components
>  >  >
>  >  >  -igor
>  >  >
>  >  >  On Thu, Mar 20, 2008 at 6:21 AM, Zhubin Salehi <[EMAIL PROTECTED]>
>  >  >  wrote:
>  >  >  > Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no
>  >  JavaScript
>  >  >  gets added to radio buttons.
>  >  >  >
>  >  >  >
>  >  >  >  -Original Message-
>  >  >  >  From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
>  >  >  >  Sent: Thursday, March 20, 2008 9:18 AM
>  >  >  >  To: users@wicket.apache.org
>  >  >  >
>  >  >  >
>  >  >  > Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
>  >  >  FormComponentPanel
>  >  >  >
>  >  >  >  onclick doesn't work either.
>  >  >  >
>  >  >  >  -Original Message-
>  >  >  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  >  >  Sent: Thursday, March 20, 2008 1:56 AM
>  >  >  >  To: users@wicket.apache.org
>  >  >  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in 
> a
>  >  >  FormComponentPanel
>  >  >  >
>  >  >  >  also, for what its worth, onclick works a lot better for this sort 
> of
>  >  >  >  thing when dealing with check/readio html components
>  >  >  >
>  >  >  >  -igor
>  >  >  >
>  >  >  >
>  >  >  >  On Wed, Mar 19, 2008 at 10:55 PM, Igor Vaynberg
>  >  <[EMAIL PROTECTED]>
>  >  >  wrote:
>  >  >  >  > i dont think browsers support an "onschange" event :)
>  >  >  >  >
>  >  >  >  >  -igor
>  >  >  >  >
>  >  >  >  >
>  >  >  >  >
>  >  >  >  >
>  >  >  >  >  On Wed, Mar 19, 2008 at 7:24 PM, Zhubin Salehi
>  >  >  <[EMAIL PROTECTED]> wrote:
>  >  >  >  >  > So now I wrote this code:
>  >  >  >  >  >
>  >  >  >  >  > nanp.add(new Radio("nanpTrue", new Model(new
>  >  >  Boolean(true;
>  >  >  >  >  > nanp.add(new Radio("nanpFalse", new Model(new
>  >  >  Boolean(false;
>  >  >  >  >  > nanp.add(new
>  >  >  AjaxFormComponentUpdatingBehavior("onschange") {
>  >  >  >  >  >
>  >  >  >  >  >
>  >  >  >  >  > private static final long
>  >  

RE: Problem with using RadioGorup and AjaxEventBehavior in a FormComponentPanel

2008-03-20 Thread Zhubin Salehi
The value is null before onUpdate() method is called. I think there is a bug 
somewhere, because I use an AjaxCheckBox instead (I had only two choices 
anyway) and it works fine. Here is the new code:

/* North American flag radio group */
add(nanp = new AjaxCheckBox("nanp", new PropertyModel(this, 
"phoneNumber.nanp")) {

private static final long serialVersionUID = 
4553185522056743596L;

@Override
protected void onUpdate(AjaxRequestTarget target) {
nanp.processInput();
if (phoneNumber.getNanp()) {
areaCode.setVisible(true);

countryDialingCode.setVisible(false);
routingDialingCode.setVisible(false);
} else {
areaCode.setVisible(false);

countryDialingCode.setVisible(true);
routingDialingCode.setVisible(true);
}

target.addComponent(PhoneNumberPanel.this);
}
});

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2008 2:08 PM
To: users@wicket.apache.org
Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a 
FormComponentPanel

in onupdate you should be calling getmodelobject()

-igor


On Thu, Mar 20, 2008 at 10:55 AM, Zhubin Salehi
<[EMAIL PROTECTED]> wrote:
> OK, now I changed my code to this:
>
> add(nanp = new RadioChoice("nanp", new PropertyModel(this,
>  "phoneNumber.nanp"), Arrays.asList(new String[] {
> "true", "false" })));
> nanp.add(new AjaxFormComponentUpdatingBehavior("onclick") {
>
>
> private static final long serialVersionUID =
>  -1406454064553153207L;
>
> @Override
>
> protected void onUpdate(AjaxRequestTarget target) {
> nanp.processInput();
> target.addComponent(areaCode);
> target.addComponent(countryDialingCode);
> target.addComponent(routingDialingCode);
> }
> });
>
>  What I don't understand is that when I click on a radio button and
>  onUpdate() gets called, RadioChoice.convertedInput is null.
>
>
>  -Original Message-
>  From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
>
> Sent: Thursday, March 20, 2008 1:17 PM
>  To: users@wicket.apache.org
>
>
> Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>
>  I added the AjaxFormChoiceComponentUpdatingBehavior to Radio objects and I
>  got a runtime exception (can only be added to...), then I added it to the
>  RadioGroup and nothing happens when I change the selection!
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  Sent: Thursday, March 20, 2008 1:07 PM
>  To: users@wicket.apache.org
>  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  FormComponentPanel
>
>  right. see AjaxFormChoiceComponentUpdatingBehavior
>
>  -igor
>
>
>  On Thu, Mar 20, 2008 at 10:02 AM, Zhubin Salehi
>  <[EMAIL PROTECTED]> wrote:
>  > I'm adding AjaxFormComponentUpdatingBehavior to RadioGroup. If I add it 
> to
>  >  Radio I get a runtime exception that says
>  AjaxFormComponentUpdatingBehavior
>  >  can only be added to a FormComponent.
>  >
>  >
>  >  -Original Message-
>  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >
>  >
>  > Sent: Thursday, March 20, 2008 12:59 PM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  >  FormComponentPanel
>  >
>  >  are you adding the bheavior to Radio or RadioGroup, it needs to go to
>  >  Radio components
>  >
>  >  -igor
>  >
>  >  On Thu, Mar 20, 2008 at 6:21 AM, Zhubin Salehi 
> <[EMAIL PROTECTED]>
>  >  wrote:
>  >  > Ok, I noticed when I use AjaxFormComponentUpdatingBehavior, no
>  JavaScript
>  >  gets added to radio buttons.
>  >  >
>  >  >
>  >  >  -Original Message-
>  >  >  From: Zhubin Salehi [mailto:[EMAIL PROTECTED]
>  >  >  Sent: Thursday, March 20, 2008 9:18 AM
>  >  >  To: users@wicket.apache.org
>  >  >
>  >  >
>  >  > Subject: RE: Problem with using RadioGorup and AjaxEventBehavior in a
>  >  FormComponentPanel
>  >  >
>  >  >  onclick doesn't work either.
>  >  >
>  >  >  -Original Message-
>  >  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  >  Sent: Thursday, March 20, 2008 1:56 AM
>  >  >  To: users@wicket.apache.org
>  >  >  Subject: Re: Problem with using RadioGorup and AjaxEventBehavior in a
>  >  Fo

Listview hierarchy problem

2008-03-20 Thread Bruce McGuire
Hello.

 

I have a panel that contains a form, which contains a list view with two
items, a label and a button. I have tried a gajillion different
combinations, but I keep getting the "unable to find component" error.

 

Any hints that you can provide would be HUGELY appreciated.

 

The panel markup is:



  



  

  



  

  





  



 

The code for the panel and so on is:

  public PageManagePanel(String id)

  {

super(id) ;

add(new PageRemoveForm("prf"));

add(new PageAddForm("paf")) ;

  }

 

PageRemoveForm:

  public PageRemoveForm(String id)

  {

super(id, Page.class);

 

uPages = Utility.getUnassignedPages() ;

unassignedPages = new ListView("uPages", uPages)

{

  private static final long serialVersionUID = 200803188L;

 

  protected void populateItem(ListItem listItem)

  {

final Page curPage = (Page)listItem.getModelObject()
;

Label pn = new Label("pn", curPage.getName()) ;

Button rp = new Button("rmvPage")

{

  private static final long serialVersionUID =
20080319L;

  public void onSubmit()

  {

Utility.removePage(curPage);

  }

};

 

add(pn) ;

add(rp) ;

  }

 

  public boolean isVisible()

  {

if (uPages.isEmpty())

{

  return (false) ;

}

return (true);

  }

};

 

add(unassignedPages) ;

  }

 

PageAddForm:

  public PageAddForm(String id)

  {

super(id, Page.class);

 

newPage = new TextField("name") ;

addPage = new Button("addPage") ;

 

add(newPage) ;

add(addPage) ;

  }

 

  @Override

  protected void onSubmit()

  {

super.onSubmit() ;

clearPersistentObject() ;

  }

 



problem adding two links to a page

2008-03-20 Thread guytom

Hi,

I am almost new to Wicket so I hope it's not a stupid question. I am
encountering an odd problem when adding two links to a single page in a
single DataView: for some reason clicking on the second link gets to the
onClick of the first one.

When I removed the first one from the page, clicking on the second worked
ok.

The reason i am doing this is that I need each row in a table to include 2
links that do different things.

Any ideas?

Thanks,
Guy
--
HTML:

# [id] 
   [name]
   [description]
   [question]
   [answer 1]
   [answer 2]
   [answer 3]
   [start time]
   [end time]
# [active] 
   

-
JAVA:
protected void populateItem(final Item item) {
   Poll poll = (Poll) item.getModelObject();

   //first link
   Link link = new Link("edit-link", item.getModel()) {
   public void onClick() {
   onEditPoll((Poll) getModelObject());
   }
   };
   link.add(new Label("poll.id",
String.valueOf(poll.getId(;

   item.add(link);

   item.add(new Label("poll.name", poll.getName()));
   item.add(new Label("poll.description",
poll.getDescription()));
   item.add(new Label("poll.question", poll.getQuestion()));
   item.add(new Label("poll.ans1", poll.getAns1()));
   item.add(new Label("poll.ans2", poll.getAns2()));
   item.add(new Label("poll.ans3", poll.getAns3()));

   DateFormat dateFormatter = new
SimpleDateFormat("MM/dd/");
   if (poll.getStartTime() != null) {
   item.add(new Label("poll.startTime", dateFormatter
   .format(poll.getStartTime(;
   } else {
   item.add(new Label("poll.startTime", ""));
   }
   if (poll.getEndTime() != null) {
   item.add(new Label("poll.endTime", dateFormatter
   .format(poll.getEndTime(;
   } else {
   item.add(new Label("poll.endTime", ""));
   }
   //second link
   Link activeLink = new Link("active-link", item.getModel()) {
   public void onClick() {
   onActivePoll((Poll) getModelObject());
   }
   };
   if (poll.isActive())
   activeLink.add(new Label("poll.active", "deactivate"));
   else
   activeLink.add(new Label("poll.active", "activate"));
   item.add(activeLink);

   item.add(new AttributeModifier("class", true,
   new LoadableDetachableModel() {
   protected Object load() {
   return (item.getIndex() % 2 == 1) ? "even"
   : "odd";
   }
   }));
   }
-- 
View this message in context: 
http://www.nabble.com/problem-adding-two-links-to-a-page-tp16185819p16185819.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Listview hierarchy problem

2008-03-20 Thread Igor Vaynberg
should be listItem.add(pn/rp)

also in the future it helps a lot if you paste the stacktrace

-igor


On Thu, Mar 20, 2008 at 11:33 AM, Bruce McGuire <[EMAIL PROTECTED]> wrote:
> Hello.
>
>
>
>  I have a panel that contains a form, which contains a list view with two
>  items, a label and a button. I have tried a gajillion different
>  combinations, but I keep getting the "unable to find component" error.
>
>
>
>  Any hints that you can provide would be HUGELY appreciated.
>
>
>
>  The panel markup is:
>
> 
>
>   
>
> 
>
>   
>
> value="Remove" />
>
> 
>
>   
>
>   
>
> 
>
> 
>
>   
>
> 
>
>
>
>  The code for the panel and so on is:
>
>   public PageManagePanel(String id)
>
>   {
>
> super(id) ;
>
> add(new PageRemoveForm("prf"));
>
> add(new PageAddForm("paf")) ;
>
>   }
>
>
>
>  PageRemoveForm:
>
>   public PageRemoveForm(String id)
>
>   {
>
> super(id, Page.class);
>
>
>
> uPages = Utility.getUnassignedPages() ;
>
> unassignedPages = new ListView("uPages", uPages)
>
> {
>
>   private static final long serialVersionUID = 200803188L;
>
>
>
>   protected void populateItem(ListItem listItem)
>
>   {
>
> final Page curPage = (Page)listItem.getModelObject()
>  ;
>
> Label pn = new Label("pn", curPage.getName()) ;
>
> Button rp = new Button("rmvPage")
>
> {
>
>   private static final long serialVersionUID =
>  20080319L;
>
>   public void onSubmit()
>
>   {
>
> Utility.removePage(curPage);
>
>   }
>
> };
>
>
>
> add(pn) ;
>
> add(rp) ;
>
>   }
>
>
>
>   public boolean isVisible()
>
>   {
>
> if (uPages.isEmpty())
>
> {
>
>   return (false) ;
>
> }
>
> return (true);
>
>   }
>
> };
>
>
>
> add(unassignedPages) ;
>
>   }
>
>
>
>  PageAddForm:
>
>   public PageAddForm(String id)
>
>   {
>
> super(id, Page.class);
>
>
>
> newPage = new TextField("name") ;
>
> addPage = new Button("addPage") ;
>
>
>
> add(newPage) ;
>
> add(addPage) ;
>
>   }
>
>
>
>   @Override
>
>   protected void onSubmit()
>
>   {
>
> super.onSubmit() ;
>
> clearPersistentObject() ;
>
>   }
>
>
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



No AjaxRadioChoice?

2008-03-20 Thread Michael Mehrle
How come there is no AjaxRadioChoice? I would like to have my form
updated cleared when one of my radio buttons is selected. What's the
best way of doing this?

Michael

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



mavn build errors

2008-03-20 Thread Ritz123

Hi,

Trying to build Wicket from svn trunk - tried mvn eclipse:eclipse and mvn
install - keep getting mojo descriptors not found error. 

[INFO] Building Wicket Quickstart Archetype
[INFO]task-segment: [install]
[INFO]

[INFO] [plugin:descriptor]
[INFO] Using 2 extractors.
[INFO] Applying extractor for language: java
[INFO] Extractor for language: java found 0 mojo descriptors.
[INFO] Applying extractor for language: bsh
[INFO] Extractor for language: bsh found 0 mojo descriptors.
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Error extracting plugin descriptor: 'No mojo descriptors found in
plugin'

-- 
View this message in context: 
http://www.nabble.com/mavn-build-errors-tp16186265p16186265.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem adding two links to a page

2008-03-20 Thread guytom

non issue, it was a javascript on the page


guytom wrote:
> 
> Hi,
> 
> I am almost new to Wicket so I hope it's not a stupid question. I am
> encountering an odd problem when adding two links to a single page in a
> single DataView: for some reason clicking on the second link gets to the
> onClick of the first one.
> 
> When I removed the first one from the page, clicking on the second worked
> ok.
> 
> The reason i am doing this is that I need each row in a table to include 2
> links that do different things.
> 
> Any ideas?
> 
> Thanks,
> Guy
> --
> HTML:
> 
> # [id] 
>[name]
>[description]
>[question]
>[answer 1]
>[answer 2]
>[answer 3]
>[start time]
>[end time]
> # [active] 
>
> 
> -
> JAVA:
> protected void populateItem(final Item item) {
>Poll poll = (Poll) item.getModelObject();
> 
>//first link
>Link link = new Link("edit-link", item.getModel()) {
>public void onClick() {
>onEditPoll((Poll) getModelObject());
>}
>};
>link.add(new Label("poll.id",
> String.valueOf(poll.getId(;
> 
>item.add(link);
> 
>item.add(new Label("poll.name", poll.getName()));
>item.add(new Label("poll.description",
> poll.getDescription()));
>item.add(new Label("poll.question", poll.getQuestion()));
>item.add(new Label("poll.ans1", poll.getAns1()));
>item.add(new Label("poll.ans2", poll.getAns2()));
>item.add(new Label("poll.ans3", poll.getAns3()));
> 
>DateFormat dateFormatter = new
> SimpleDateFormat("MM/dd/");
>if (poll.getStartTime() != null) {
>item.add(new Label("poll.startTime", dateFormatter
>.format(poll.getStartTime(;
>} else {
>item.add(new Label("poll.startTime", ""));
>}
>if (poll.getEndTime() != null) {
>item.add(new Label("poll.endTime", dateFormatter
>.format(poll.getEndTime(;
>} else {
>item.add(new Label("poll.endTime", ""));
>}
>//second link
>Link activeLink = new Link("active-link", item.getModel())
> {
>public void onClick() {
>onActivePoll((Poll) getModelObject());
>}
>};
>if (poll.isActive())
>activeLink.add(new Label("poll.active", "deactivate"));
>else
>activeLink.add(new Label("poll.active", "activate"));
>item.add(activeLink);
> 
>item.add(new AttributeModifier("class", true,
>new LoadableDetachableModel() {
>protected Object load() {
>return (item.getIndex() % 2 == 1) ? "even"
>: "odd";
>}
>}));
>}
> 

-- 
View this message in context: 
http://www.nabble.com/problem-adding-two-links-to-a-page-tp16185819p16186296.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matthew Young
On Wed, Mar 19, 2008 at 10:54 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> yes. there is a phase of processing that goes through and collects the
> feedback messages. you are reporting the error after that phase most
> likely, so it will get picked up next request. i wonder if calling
> feedbackpanel.detach() will help before you add it to the ajax request
> target...
>
> -igor
>
>
> On Wed, Mar 19, 2008 at 7:06 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
> > >>  Overriding onBeforeRender() doesn't work on Ajax, it's not called :(
> >  >
> >  >it is, but only on components that get updated via ajax...so you might
> >  >want to move the code to one of those...
> >
> >  Now the code gets call in Ajax. But the error message still doesn't
> show up
> >  in FeedbackPanel.  Does this make sense to you at all?
> >
> >
> >  On Wed, Mar 19, 2008 at 6:23 PM, Igor Vaynberg <[EMAIL PROTECTED]
> >
> >
> >
> > wrote:
> >
> >  > On Wed, Mar 19, 2008 at 5:54 PM, Matthew Young <[EMAIL PROTECTED]>
> wrote:
> >  > > Hi Igor,
> >  > >
> >  > >  Overriding onBeforeRender() doesn't work on Ajax, it's not called
> :(
> >  >
> >  > it is, but only on components that get updated via ajax...so you
> might
> >  > want to move the code to one of those...
> >  >
> >  > >  Is there anyway to handle this kind of error condition for both
> Ajax
> >  > and
> >  > >  non-Ajax?
> >  >
> >  > see above
> >  >
> >  > >  Having to abandon LoadableDeachableModel is a pity.  The code is
> much
> >  > >  clearer with LoadableDeachableModel.  Anyway, does Wicket have any
> way
> >  > to
> >  > >  let user code handle model error late in the render phase?
> >  >
> >  > yes it is a pity. we consider errors that happen inside models
> >  > unrecoverable because they can happen at a lot of different points in
> >  > the lifecycle of the component. i think throwing a
> >  > restartresponseexception from inside a model might work, but that
> will
> >  > only get you to a different pagehmm, maybe... { error("failed");
> >  > throw restartresponseexception(MyPage.this); } will work, but then
> you
> >  > gotta watch out for an infinite loop... you would have to first check
> >  > if the page contains any error messages...
> >  >
> >  > -igor
> >  >
> >  >
> >  >
> >  >
> >  > >  Thanks!
> >  > >
> >  > >  On Wed, Mar 19, 2008 at 2:53 PM, Igor Vaynberg <
> [EMAIL PROTECTED]
> >  > >
> >  > >  wrote:
> >  > >
> >  > >
> >  > >
> >  > >  > im thinking it might be too late at that point to register the
> >  > >  > messages because the feedback panel might have already
> rendered...
> >  > >  >
> >  > >  > perhaps instead of using a loadable detachable model you do
> something
> >  > like
> >  > >  > this:
> >  > >  >
> >  > >  > class mypage {
> >  > >  >  private List result;
> >  > >  >
> >  > >  >  onbeforerender() {
> >  > >  >  try {
> >  > >  >result=populatelist();
> >  > >  >  } catch (exception e) {
> >  > >  >error("foo");
> >  > >  >  }
> >  > >  >  super.onbeforerender();
> >  > >  >   }
> >  > >  >
> >  > >  >   ondetach() { result=null; super.ondetach(); }
> >  > >  >
> >  > >  >
> >  > >  >   .. add(new listview("foo", new propertymodel(this, "result"));
> >  > >  >
> >  > >  > }
> >  > >  >
> >  > >  > -igor
> >  > >  >
> >  > >  >
> >  > >  >
> >  > >  > On Wed, Mar 19, 2008 at 2:04 PM, Matthew Young <
> [EMAIL PROTECTED]>
> >  > wrote:
> >  > >  > >  I register an error to the page in the model but the feedback
> >  > message
> >  > >  > >  doesn't show in FeedbackPanel.  Only the error message
> register in
> >  > >  > >  onSubmit() event handler shows.  Please have a look.  Thanks!
> >  > >  > >
> >  > >  > >  HomePage.html:
> >  > >  > >
> >  > >  > >  
> >  > >  > >  
> >  > >  > > message will be here
> >  > >  > > 
> >  > >  > > 
> >  > >  > >  >  > wicket:id="submitButton"/>
> >  > >  > > 
> >  > >  > > FEEDBACK
> >  > >  > >  
> >  > >  > >
> >  > >  > >
> >  > >  > >  HomePage.java
> >  > >  > >
> >  > >  > >  import ...
> >  > >  > >
> >  > >  > >  public class HomePage extends WebPage {private static
> final
> >  > long
> >  > >  > >  serialVersionUID = 1L;
> >  > >  > >
> >  > >  > > private String word;
> >  > >  > >
> >  > >  > > public HomePage(final PageParameters parameters) {
> >  > >  > >
> >  > >  > > add(new
> >  > >  > >
>  FeedbackPanel("feedback").setOutputMarkupPlaceholderTag(true));
> >  > >  > > // if the word 'blowup' is entered, this model
> register a
> >  > error
> >  > >  > >  message to the page
> >  > >  > > IModel model = new Model() {private static
> >  > final
> >  > >  > long
> >  > >  > >  serialVersionUID = 1L;
> >  > >  > > @Override public Object getObject() {
> >  > >  > > if (word != null && word.equals("blowup")) {
> >  > >  > > word = "-b-l-o-w-u-p-";
> >  > >  > > HomePage.this.fatal("This message is from
> >  

Re: My Wicket Flickr Demo a la Ruby On Rails

2008-03-20 Thread Matthew Young
>if you are willing to work with us on it i think we might
be able to host it on wicket-stuff...

I'll glad to.  Just let me know what to do.

On Wed, Mar 19, 2008 at 10:53 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> ah, i see. if you are willing to work with us on it i think we might
> be able to host it on wicket-stuff...
>
> -igor
>
>
> On Wed, Mar 19, 2008 at 7:00 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
> > My original is big and hi res.  But once I upload to any one of these
> sites,
> >  they all down res file to tiny size.
> >
> >  On Wed, Mar 19, 2008 at 6:24 PM, Igor Vaynberg <[EMAIL PROTECTED]
> >
> >  wrote:
> >
> >
> >
> >  > why not use one of those desktop recording things like wink? ive seen
> >  > people put together 1024x768 screencasts with those, or even higher..
> >  >
> >  > -igor
> >  >
> >  >
> >  > On Wed, Mar 19, 2008 at 6:04 PM, Matthew Young <[EMAIL PROTECTED]>
> wrote:
> >  > > I've not found any site that support high res video.
> Photobucket.com,
> >  > >  vimeo.com are just like Youtube: take high res file and down size
> to
> >  > tiny
> >  > >  flash file.  If they can convert to big screen flash, they will
> stand
> >  > out
> >  > >  better from Youtube.
> >  > >
> >  > >  Let me see if I can find a good avi to flash converter.  If I do,
> I'll
> >  > >  re-record the screencast with sound.
> >  > >
> >  > >  On Wed, Mar 19, 2008 at 5:51 PM, Jonathan Locke <
> >  > [EMAIL PROTECTED]>
> >  > >
> >  > >
> >  > > wrote:
> >  > >
> >  > >  >
> >  > >  >
> >  > >  > shucks.  even on vimeo the resolution is still almost
> unreadable.
> >  >  and
> >  > >  > with
> >  > >  > no audio, i feel like i'm missing out still.  a nice screencast
> of
> >  > this
> >  > >  > with
> >  > >  > sound would be like a wicket infomercial... aren't there sites
> that
> >  > do
> >  > >  > video-efficient, high resolution screencasts?
> >  > >  >
> >  > >  >
> >  > >  > MYoung wrote:
> >  > >  > >
> >  > >  > >> is there supposed to be sound?
> >  > >  > >
> >  > >  > > No, it's a silent film :).
> >  > >  > >
> >  > >  > > On Wed, Mar 19, 2008 at 5:22 PM, Jonathan Locke <
> >  > >  > [EMAIL PROTECTED]>
> >  > >  > > wrote:
> >  > >  > >
> >  > >  > >>
> >  > >  > >>
> >  > >  > >> is there supposed to be sound?
> >  > >  > >>
> >  > >  > >>
> >  > >  > >> MYoung wrote:
> >  > >  > >> >
> >  > >  > >> > Ok, it there: http://vimeo.com/802144
> >  > >  > >> >
> >  > >  > >> > scroll down to the bottom to download the original.
> >  > >  > >> >
> >  > >  > >> > On Wed, Mar 19, 2008 at 8:30 AM, Frank Bille <
> >  > [EMAIL PROTECTED]>
> >  > >  > >> > wrote:
> >  > >  > >> >
> >  > >  > >> >> I would suggest uploading it to vimeo.com. It supports HD
> >  > videos as
> >  > >  > >> >> well as support for downloading the original file.
> >  > >  > >> >>
> >  > >  > >> >> Frank
> >  > >  > >> >>
> >  > >  > >> >> On Wed, Mar 19, 2008 at 3:29 AM, Jonathan Locke
> >  > >  > >> >> <[EMAIL PROTECTED]> wrote:
> >  > >  > >> >> >
> >  > >  > >> >> >
> >  > >  > >> >> >  this looks like it's probably cool, but there's no
> audio and
> >  > the
> >  > >  > >> video
> >  > >  > >> >> size
> >  > >  > >> >> >  is such that i can't read anything.
> >  > >  > >> >> >
> >  > >  > >> >> >
> >  > >  > >> >> >
> >  > >  > >> >> >  MYoung wrote:
> >  > >  > >> >> >  >
> >  > >  > >> >> >  > Hi, I am new to Wicket and to help me learn, I
> created a
> >  > Wicket
> >  > >  > >> >> version of
> >  > >  > >> >> >  > the Flickr demo like the one on the Ruby on Rails
> site
> >  > seen
> >  > >  > here
> >  > >  > >> >> >  > http://www.rubyonrails.org/screencasts. I put my
> version
> >  > in my
> >  > >  > >> blog
> >  > >  > >> >> here:
> >  > >  > >> >> >  >
> http://limboville.blogspot.com/2008_03_01_archive.html.
> >  >  Please
> >  > >  > >> take
> >  > >  > >> >> a
> >  > >  > >> >> >  > look
> >  > >  > >> >> >  > and give me some feedback.
> >  > >  > >> >> >  >
> >  > >  > >> >> >  > Thanks!
> >  > >  > >> >> >  >
> >  > >  > >> >> >  >
> >  > >  > >> >> >
> >  > >  > >> >> >  --
> >  > >  > >> >> >  View this message in context:
> >  > >  > >> >>
> >  > >  > >>
> >  > >  >
> >  >
> http://www.nabble.com/My-Wicket-Flickr-Demo-a-la-Ruby-On-Rails-tp16106896p16135954.html
> >  > >  > >> >> >  Sent from the Wicket - User mailing list archive at
> >  > Nabble.com.
> >  > >  > >> >> >
> >  > >  > >> >> >
> >  > >  > >> >> >
> >  > >  > >> >> >
> >  > >  > >> >> >
> >  > >  > >>
> >  >
>  -
> >  > >  > >> >> >  To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >  > >  > >> >> >  For additional commands, e-mail:
> >  > [EMAIL PROTECTED]
> >  > >  > >> >> >
> >  > >  > >> >> >
> >  > >  > >> >>
> >  > >  > >> >>
> >  > >  >
> -
> >  > >  > >> >> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >  > >  > >> >> For additional commands, e-mail:
> [EMAIL PROTECTED]
> >  > >  > >> >>
> >  > > 

StartFound: You can now submit/edit your own content

2008-03-20 Thread Dan Kaplan
Hi,

 

This is the second time I've mentioned StartFound.  I hope it's not
considered spam at this point.  If so, this'll be my last update about it
but this update is very important. You can now submit/edit your own content
to http://www.startfound.com    So if anyone
here has a startup or a side project they're working on and they want to let
others know about it, I encourage you to enter its profile at my new site.

 

Thanks,

Dan



Re: mavn build errors

2008-03-20 Thread James Carman
On 3/20/08, Ritz123 <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  Trying to build Wicket from svn trunk - tried mvn eclipse:eclipse and mvn
>  install - keep getting mojo descriptors not found error.
>
>  [INFO] Building Wicket Quickstart Archetype
>  [INFO]task-segment: [install]
>  [INFO]
>  
>  [INFO] [plugin:descriptor]
>  [INFO] Using 2 extractors.
>  [INFO] Applying extractor for language: java
>  [INFO] Extractor for language: java found 0 mojo descriptors.
>  [INFO] Applying extractor for language: bsh
>  [INFO] Extractor for language: bsh found 0 mojo descriptors.
>  [INFO]
>  
>  [ERROR] BUILD ERROR
>  [INFO]
>  
>  [INFO] Error extracting plugin descriptor: 'No mojo descriptors found in
>  plugin'
>
>
There has been a bug discovered in Maven's "plugin-plugin" version 2.4:

http://jira.codehaus.org/browse/MPLUGIN-102

You guys need to lock down your version to 2.3.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matthew Young
Don't know what happen to my last reply.  Try again:

>i wonder if calling
>feedbackpanel.detach() will help before you add it to the ajax request
>target...

No, this doesn't make the message show up either.

>yes. there is a phase of processing that goes through and collects the
>feedback messages. you are reporting the error after that phase most
l>ikely, so it will get picked up next request.

But why then the error message show in non-Ajax? It should have pass the
feedbackpanel render phase, too.  Yes?  But I must add this behavior is not
consistent, in my small test case, message does not show up at all no matter
Ajax or non-Ajax.  I try moving the feedbackpanel up and down in my template
and didn't make any different.

Is it possible to mark FeedbackPanel "dirty" and then Wicket render it?
Also, seems if Wicket support component render priority of early to late,
then things like FeedbackPanel can say render me last, and problem solve?

I also try "throw new RuntimeException()" and add this in my App:

@Override public RequestCycle newRequestCycle(Request request, Response
response) {
return new WebRequestCycle(this, (WebRequest) request, (WebResponse)
response) {
@Override public Page onRuntimeException(Page page,
RuntimeException e) {
// --
// case 1: message DO NOT show
//
page.fatal("An error occured: " + e.getCause
().getMessage());
return page;

// --
// case 2: message DO NOT show
//
page = new SamePage();
page.fatal("An error occured: " + e.getCause
().getMessage());
return page;

// --
// case 3: message show
//
page = new AnotherPage();
page.fatal("An error occured: " + e.getCause
().getMessage());
return page;
}
};
}


Seems Wicket just won't show error message when the page is the same, even
of a newly created instance. There must be some short cut somewhere to not
render page if type is the same.

Small wish: in GMail, when their Ajax submit fails (either user submit or
auto background submit), they don't go to a new page, they flash a message
"System error, trying again."  It would be great if Wicket can support this
way of Ajax error handling when error happen very late during render.


AjaxEventBehavior never being called

2008-03-20 Thread Michael Mehrle
I've got an inner subclass of Radio:

private class FooRadio extends Radio {

public FooRadio (String id, IModel model) {
super(id, model);
setOutputMarkupId(true);
add(new AjaxEventBehavior(new
StringBuffer(id).append("onChange").toString()) {

@Override
protected void onEvent(AjaxRequestTarget target) {

group.processInput();   
}
});
}
}

For some reason onEvent is never being called. When I tag the event
behavior to a vanilla Radio component it's being called. Am I forgetting
something?

Michael



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Igor Vaynberg
On Thu, Mar 20, 2008 at 12:59 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
>  Small wish: in GMail, when their Ajax submit fails (either user submit or
>  auto background submit), they don't go to a new page, they flash a message
>  "System error, trying again."  It would be great if Wicket can support this
>  way of Ajax error handling when error happen very late during render.

this we do support. just throw an error, and in your button add an
iajaxcalldecorator, override failed script and make it show the popup

-igor

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matej Knopp
It depends on the kind of error. Sometimes when it's xmlhttprequest
error we get no notification of it.

-Matej

On Thu, Mar 20, 2008 at 9:21 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> On Thu, Mar 20, 2008 at 12:59 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
>  >  Small wish: in GMail, when their Ajax submit fails (either user submit or
>  >  auto background submit), they don't go to a new page, they flash a message
>  >  "System error, trying again."  It would be great if Wicket can support 
> this
>  >  way of Ajax error handling when error happen very late during render.
>
>  this we do support. just throw an error, and in your button add an
>  iajaxcalldecorator, override failed script and make it show the popup
>
>  -igor
>
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Resizable and reorderable grid components.
http://www.inmethod.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matej Knopp
This doesn't work because the model.getObject method is only called
when the value is pulled out of the model, which is on label render.
Even if you refresh it on ajax request, it might be too late because
the feedback panel retrieves the feedback messages in onBeforeRender
(before actual rendering).

-Matej

On Wed, Mar 19, 2008 at 10:04 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
>  I register an error to the page in the model but the feedback message
>  doesn't show in FeedbackPanel.  Only the error message register in
>  onSubmit() event handler shows.  Please have a look.  Thanks!
>
>  HomePage.html:
>
>  
>  
> message will be here
> 
> 
> 
> 
> FEEDBACK
>  
>
>
>  HomePage.java
>
>  import ...
>
>  public class HomePage extends WebPage {private static final long
>  serialVersionUID = 1L;
>
> private String word;
>
> public HomePage(final PageParameters parameters) {
>
> add(new
>  FeedbackPanel("feedback").setOutputMarkupPlaceholderTag(true));
> // if the word 'blowup' is entered, this model register a error
>  message to the page
> IModel model = new Model() {private static final long
>  serialVersionUID = 1L;
> @Override public Object getObject() {
> if (word != null && word.equals("blowup")) {
> word = "-b-l-o-w-u-p-";
> HomePage.this.fatal("This message is from model.");
> return "BAD THING HAPPENED IN MODEL";
> } else {
> return "The word is: \"" + (word == null ? " n u l l " :
>  word) + "\"";
> }
> }
> };
> add(new Label("message", model).setOutputMarkupId(true));
> Form form = new Form("form", new CompoundPropertyModel(this));
> add(form);
> form.add(new TextField("word").setRequired(true));
>
> AjaxFallbackButton submitButton = new
>  AjaxFallbackButton("submitButton", form) {
> private static final long serialVersionUID = 1L;
> @Override protected void onSubmit(AjaxRequestTarget target, Form
>  f) {
> if (word != null && word.equals("blowup")) {
> HomePage.this.error("This message is from onSubmit.
>  There should also be a message from model");
> }
> if (target != null) {
> target.addComponent(HomePage.this.get("feedback"));
> target.addComponent(HomePage.this.get("message"));
> }
> }
>
> @Override protected void onError(AjaxRequestTarget target, Form
>  f) {
> target.addComponent(HomePage.this.get("feedback"));
>  // show updated error feedback
> }
> };
> form.add(submitButton);
> }
>  }
>



-- 
Resizable and reorderable grid components.
http://www.inmethod.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: AjaxEventBehavior never being called

2008-03-20 Thread Michael Mehrle
Never mind - not sure what I was thinking needed to name the JS
event properly.

Michael

-Original Message-
From: Michael Mehrle [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 1:06 PM
To: users@wicket.apache.org
Subject: AjaxEventBehavior never being called

I've got an inner subclass of Radio:

private class FooRadio extends Radio {

public FooRadio (String id, IModel model) {
super(id, model);
setOutputMarkupId(true);
add(new AjaxEventBehavior(new
StringBuffer(id).append("onChange").toString()) {

@Override
protected void onEvent(AjaxRequestTarget target) {

group.processInput();   
}
});
}
}

For some reason onEvent is never being called. When I tag the event
behavior to a vanilla Radio component it's being called. Am I forgetting
something?

Michael



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket throws ConcurrentModificationException in RequestCycle.detach() on rare occasions

2008-03-20 Thread Maurice Marrink
As requested by Johan i created a jira issue
https://issues.apache.org/jira/browse/WICKET-1438 and attached an
application showing the original problem.

Maurice

On Thu, Mar 20, 2008 at 12:22 AM, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> My current patch involved this:
>  for (int i = 0; i < requestTargets.size(); i++)
> {
> IRequestTarget target = 
> (IRequestTarget)requestTargets.get(i);
> if (target != null)
> {
> try
> {
> target.detach(this);
> }
> catch (RuntimeException e)
> {
> log.error("there was an error 
> cleaning up target " + target + ".", e);
> }
> }
> }
>
>  But if you copy the requestTragets before you are going to detach them
>  and then iterate over them that would work too i guess.
>  Only question is, what is more expensive copying a list/stack only a
>  few items big or needlessly detaching 1 or 2 RequestTargets which
>  should still be detached anyway.
>
>  Maurice
>
>
>
>  On Thu, Mar 20, 2008 at 12:13 AM, Johan Compagner <[EMAIL PROTECTED]> wrote:
>  > hmm we already dont do anything with the exceptions there
>  >  so we only have to copy the list of request targets to detach before
>  >  iterating over it
>  >  or use a list that can handle that somehow
>  >
>  >
>  >  On Wed, Mar 19, 2008 at 11:39 PM, Maurice Marrink <[EMAIL PROTECTED]> 
> wrote:
>  >
>  >
>  >
>  > > A couple of days ago Warren came to me with a problem. If he attached
>  >  > a behavior to a component which potentially throws a
>  >  > RestartResponseAtInterceptPageException a
>  >  > ConcurrentModificationException would bubble all the way into tomcat
>  >  > code.
>  >  > Now you probably are going to say: "Then don't do that" ;) but the
>  >  > fact that an exception escapes wicket is imo reason to investigate.
>  >  >
>  >  > So i did some digging. The situation is as follows:
>  >  > In the renderHead method of an IHeaderContributor a check is performed
>  >  > for an authenticated user, if none is found a RRAIPE is thrown.
>  >  > One of the places that executes renderHead is the onDetach of WebPage.
>  >  > Now suppose we have a Page A which has a component decorated with this
>  >  > header contributor, the page also contains a Button to log off users.
>  >  > The onsubmit for this button is as simple as log user off and
>  >  > setResponsePage(class).
>  >  > This page is usually only accessible if an authenticated user is
>  >  > available so everything works fine if that is the case.
>  >  > But then the user decides to log off, the onsubmit is triggered and
>  >  > exits normally. the request continues and reaches the point where the
>  >  > RequestCycle is detaching all RequestTargets (at that point there are
>  >  > 2 targets, 1 for the current page and 1 set during the onsubmit).
>  >  > During the detach the renderHead method is executed along with the
>  >  > check for an authenticated user. Since there isn't one anymore a
>  >  > RRAIPE is thrown, adding a 3rd target to the stack of RequestTargets.
>  >  > The RRAIPE bubbles up to RequestCycle.detach() and is caught and
>  >  > logged there. Then wicket attempts to detach the next RequestTarget
>  >  > but since an iterator is used to loop through all targets, the
>  >  > iterator detects the stack has been changed and throws a
>  >  > ConcurrentModificationException. Ultimately resulting in a tomcat
>  >  > error page.
>  >  >
>  >  > I tried changing the iterator loop to a regular for(int i=0;i < .)
>  >  > loop and this seems to fix the problem, even if later on more
>  >  > requesttargets are added wicket happily executes them and comes up
>  >  > with the desire page.
>  >  > There is one disadvantage i see with this solution: the requesttarget
>  >  > throwing the RRAIPE is not fully detached. Perhaps the RRAIPE can be
>  >  > swallowed after it has added a RequestTarget and only in the case of a
>  >  > detach phase. That way the rest of the page could be normally
>  >  > detached.
>  >  >
>  >  > If required i can provide a small application (courtesy of Warren)
>  >  > that demonstrates the problem.
>  >  >
>  >  > So what do you guys think, shall i open up a jira issue for this?
>  >  >
>  >  > Maurice
>  >  >
>  >
>  >
>  > > -
>  >  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >  >
>  >  >
>  >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matthew Young
>add an iajaxcalldecorator override failed script

Would that work if failure happen late in rendering?  By that time, Wicket
would be on the onSuccess path, right?

For my Wicket education: I notice the IAjaxCallDecorator callbacks are only
called once.  So are these for fixed static script only?  And that I should
use target.appendJavascript() for dynamic JS?


On Thu, Mar 20, 2008 at 1:21 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> On Thu, Mar 20, 2008 at 12:59 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
> >  Small wish: in GMail, when their Ajax submit fails (either user submit
> or
> >  auto background submit), they don't go to a new page, they flash a
> message
> >  "System error, trying again."  It would be great if Wicket can support
> this
> >  way of Ajax error handling when error happen very late during render.
>
> this we do support. just throw an error, and in your button add an
> iajaxcalldecorator, override failed script and make it show the popup
>
> -igor
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Igor Vaynberg
why would it be onsuccess path? this is something that runs clientside...

they are executed every time the component rendered, and no you
shouldnt touch ajaxreqesttarget from a call decorator, notice how it
is not passed in...

-igor


On Thu, Mar 20, 2008 at 2:38 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
> >add an iajaxcalldecorator override failed script
>
>  Would that work if failure happen late in rendering?  By that time, Wicket
>  would be on the onSuccess path, right?
>
>  For my Wicket education: I notice the IAjaxCallDecorator callbacks are only
>  called once.  So are these for fixed static script only?  And that I should
>  use target.appendJavascript() for dynamic JS?
>
>
>  On Thu, Mar 20, 2008 at 1:21 PM, Igor Vaynberg <[EMAIL PROTECTED]>
>  wrote:
>
>
>
>  > On Thu, Mar 20, 2008 at 12:59 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
>  > >  Small wish: in GMail, when their Ajax submit fails (either user submit
>  > or
>  > >  auto background submit), they don't go to a new page, they flash a
>  > message
>  > >  "System error, trying again."  It would be great if Wicket can support
>  > this
>  > >  way of Ajax error handling when error happen very late during render.
>  >
>  > this we do support. just throw an error, and in your button add an
>  > iajaxcalldecorator, override failed script and make it show the popup
>  >
>  > -igor
>  >
>
>
> > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matthew Young
Then what? In real app, the model is calling some flakey remote service that
can fail.  Is there no way to show error message on the same page?  That the
only thing is put up a different error page?

On Thu, Mar 20, 2008 at 1:29 PM, Matej Knopp <[EMAIL PROTECTED]> wrote:

> This doesn't work because the model.getObject method is only called
> when the value is pulled out of the model, which is on label render.
> Even if you refresh it on ajax request, it might be too late because
> the feedback panel retrieves the feedback messages in onBeforeRender
> (before actual rendering).
>
> -Matej
>
> On Wed, Mar 19, 2008 at 10:04 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
> >  I register an error to the page in the model but the feedback message
> >  doesn't show in FeedbackPanel.  Only the error message register in
> >  onSubmit() event handler shows.  Please have a look.  Thanks!
> >
> >  HomePage.html:
> >
> >  
> >  
> > message will be here
> > 
> > 
> > 
> > 
> > FEEDBACK
> >  
> >
> >
> >  HomePage.java
> >
> >  import ...
> >
> >  public class HomePage extends WebPage {private static final long
> >  serialVersionUID = 1L;
> >
> > private String word;
> >
> > public HomePage(final PageParameters parameters) {
> >
> > add(new
> >  FeedbackPanel("feedback").setOutputMarkupPlaceholderTag(true));
> > // if the word 'blowup' is entered, this model register a error
> >  message to the page
> > IModel model = new Model() {private static final
> long
> >  serialVersionUID = 1L;
> > @Override public Object getObject() {
> > if (word != null && word.equals("blowup")) {
> > word = "-b-l-o-w-u-p-";
> > HomePage.this.fatal("This message is from model.");
> > return "BAD THING HAPPENED IN MODEL";
> > } else {
> > return "The word is: \"" + (word == null ? " n u l l
> " :
> >  word) + "\"";
> > }
> > }
> > };
> > add(new Label("message", model).setOutputMarkupId(true));
> > Form form = new Form("form", new CompoundPropertyModel(this));
> > add(form);
> > form.add(new TextField("word").setRequired(true));
> >
> > AjaxFallbackButton submitButton = new
> >  AjaxFallbackButton("submitButton", form) {
> > private static final long serialVersionUID = 1L;
> > @Override protected void onSubmit(AjaxRequestTarget target,
> Form
> >  f) {
> > if (word != null && word.equals("blowup")) {
> > HomePage.this.error("This message is from onSubmit.
> >  There should also be a message from model");
> > }
> > if (target != null) {
> > target.addComponent(HomePage.this.get("feedback"));
> > target.addComponent(HomePage.this.get("message"));
> > }
> > }
> >
> > @Override protected void onError(AjaxRequestTarget target,
> Form
> >  f) {
> > target.addComponent(HomePage.this.get("feedback"));
> >  // show updated error feedback
> > }
> > };
> > form.add(submitButton);
> > }
> >  }
> >
>
>
>
> --
> Resizable and reorderable grid components.
> http://www.inmethod.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Matthew Young
> they are executed every time the component rendered

That's true for non-Ajax, but if Ajax, it's not called again.  It make sense
to me because the form is not rendered.

>no you shouldnt touch ajaxreqesttarget from a call decorator

I don't mean in the decorator. I mean in the AjaxButton#onSubmit()
#onError() because like I said, the decorator callback is not called again
in Ajax.

On Thu, Mar 20, 2008 at 2:41 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> why would it be onsuccess path? this is something that runs clientside...
>
> they are executed every time the component rendered, and no you
> shouldnt touch ajaxreqesttarget from a call decorator, notice how it
> is not passed in...
>
> -igor
>
>
> On Thu, Mar 20, 2008 at 2:38 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
> > >add an iajaxcalldecorator override failed script
> >
> >  Would that work if failure happen late in rendering?  By that time,
> Wicket
> >  would be on the onSuccess path, right?
> >
> >  For my Wicket education: I notice the IAjaxCallDecorator callbacks are
> only
> >  called once.  So are these for fixed static script only?  And that I
> should
> >  use target.appendJavascript() for dynamic JS?
> >
> >
> >  On Thu, Mar 20, 2008 at 1:21 PM, Igor Vaynberg <[EMAIL PROTECTED]
> >
> >  wrote:
> >
> >
> >
> >  > On Thu, Mar 20, 2008 at 12:59 PM, Matthew Young <[EMAIL PROTECTED]>
> wrote:
> >  > >  Small wish: in GMail, when their Ajax submit fails (either user
> submit
> >  > or
> >  > >  auto background submit), they don't go to a new page, they flash a
> >  > message
> >  > >  "System error, trying again."  It would be great if Wicket can
> support
> >  > this
> >  > >  way of Ajax error handling when error happen very late during
> render.
> >  >
> >  > this we do support. just throw an error, and in your button add an
> >  > iajaxcalldecorator, override failed script and make it show the popup
> >  >
> >  > -igor
> >  >
> >
> >
> > > -
> >  > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >  > For additional commands, e-mail: [EMAIL PROTECTED]
> >  >
> >  >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


"Redirect after post" Issue

2008-03-20 Thread Jeremy Levy
I have been having trouble with this for a couple of months, it seems that
redirects in Wicket 1.3.x seem to be writing out the URL incorrectly in our
set up.

We are running JBoss 4.2 with embedded Tomcat 5.5 using Apache/2.2.4 with
mod_proxy.

The Tomcat URL for the application is http://localhost:8080/web/

The Apache URL for the application is http://localhost

For the most part the site works well when accessed via Apache (and
perfectly directly via Tomcat), except on links/urls that involve (from what
I can tell) a redirect from Wicket.  These redirect the users browser to
/web/ which shouldn't happen from infront of the proxy.

Examples of this are:

1. Form submits (they go through, but the next page is requested with the
/web in the url)
2. Redirects from Application.getHomePage()
3. Any use of RestartResponseAtInterceptPageException
4. setResponsePage(MyPage.class) inside of an
Link.onClick(BookmarkablePageLink works fine to the same page)

Further evidence that this is a bug is that if I set my application to
IRequestCycleSettings.ONE_PASS_RENDER everything works perfectly but with
both IRequestCycleSettings.REDIRECT_TO_BUFFER and
IRequestCycleSettings.REDIRECT_TO_RENDER it fails.

Our mod_proxy / virtualhost configuration:


ServerAdmin [EMAIL PROTECTED]
ServerAlias localhost

ServerSignature On

DocumentRoot "/var/www"

ProxyRequests Off


Order deny,allow
Allow from all


RewriteEngine on

RewriteLog "/var/log/apache2/rewrite.log"
RewriteLogLevel 2

ProxyPass / http://localhost:8080/web/
ProxyPassReverse / http://localhost:8080/web/
ProxyPassReverseCookiePath  /web /
ProxyPreserveHost On

ErrorLog /var/log/apache2/error.log
LogLevel warn


I'm not 100% sure that the mod_proxy configuration is correct, but I've read
all the articles on this list about it as well as the wiki page and have run
out of ideas to mess with.

Any help is appreciated.

Jeremy


Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Igor Vaynberg
decorator generates scripts that execute on the client side. so
onfailure() is a handler that will be executed by clientside
javascript if ajax request fails, it has nothing to do with
button.onerror()

-igor


On Thu, Mar 20, 2008 at 2:54 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
> > they are executed every time the component rendered
>
>  That's true for non-Ajax, but if Ajax, it's not called again.  It make sense
>  to me because the form is not rendered.
>
>
>  >no you shouldnt touch ajaxreqesttarget from a call decorator
>
>  I don't mean in the decorator. I mean in the AjaxButton#onSubmit()
>  #onError() because like I said, the decorator callback is not called again
>  in Ajax.
>
>  On Thu, Mar 20, 2008 at 2:41 PM, Igor Vaynberg <[EMAIL PROTECTED]>
>
>
> wrote:
>
>  > why would it be onsuccess path? this is something that runs clientside...
>  >
>  > they are executed every time the component rendered, and no you
>  > shouldnt touch ajaxreqesttarget from a call decorator, notice how it
>  > is not passed in...
>  >
>  > -igor
>  >
>  >
>  > On Thu, Mar 20, 2008 at 2:38 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
>  > > >add an iajaxcalldecorator override failed script
>  > >
>  > >  Would that work if failure happen late in rendering?  By that time,
>  > Wicket
>  > >  would be on the onSuccess path, right?
>  > >
>  > >  For my Wicket education: I notice the IAjaxCallDecorator callbacks are
>  > only
>  > >  called once.  So are these for fixed static script only?  And that I
>  > should
>  > >  use target.appendJavascript() for dynamic JS?
>  > >
>  > >
>  > >  On Thu, Mar 20, 2008 at 1:21 PM, Igor Vaynberg <[EMAIL PROTECTED]
>  > >
>  > >  wrote:
>  > >
>  > >
>  > >
>  > >  > On Thu, Mar 20, 2008 at 12:59 PM, Matthew Young <[EMAIL PROTECTED]>
>  > wrote:
>  > >  > >  Small wish: in GMail, when their Ajax submit fails (either user
>  > submit
>  > >  > or
>  > >  > >  auto background submit), they don't go to a new page, they flash a
>  > >  > message
>  > >  > >  "System error, trying again."  It would be great if Wicket can
>  > support
>  > >  > this
>  > >  > >  way of Ajax error handling when error happen very late during
>  > render.
>  > >  >
>  > >  > this we do support. just throw an error, and in your button add an
>  > >  > iajaxcalldecorator, override failed script and make it show the popup
>  > >  >
>  > >  > -igor
>  > >  >
>  > >
>  > >
>  > > > -
>  > >  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > >  > For additional commands, e-mail: [EMAIL PROTECTED]
>  > >  >
>  > >  >
>  > >
>  >
>  > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to set focus to a textfield inside AJAX

2008-03-20 Thread Michael Mehrle
I have a WMC that I added an AjaxEventBehavior(onclick) to. Inside I
want to set the focus to a particular textfield - how would I do that?

I have seen some techniques on how to do this on page load, but this is
AJAX so I need something dynamic.

Anyone solved this problem before?

Michael

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: mavn build errors

2008-03-20 Thread Ritz123

Thanks for the quick response.

Just to complete the thread - for ppl like me who are not too familiar with
maven - the way to force plugin version - in our case plugin-plugin is the
plugin!! Add that to Wicket top level pom.xml file under  section
along with other plugins. Make sure in the corresponding Plugin-Management
section you provide the exact version number.

Maven gurus correct me if I am wrong - but thats how I resolved my issue.


jwcarman wrote:
> 
> On 3/20/08, Ritz123 <[EMAIL PROTECTED]> wrote:
>>
>>  Hi,
>>
>>  Trying to build Wicket from svn trunk - tried mvn eclipse:eclipse and
>> mvn
>>  install - keep getting mojo descriptors not found error.
>>
>>  [INFO] Building Wicket Quickstart Archetype
>>  [INFO]task-segment: [install]
>>  [INFO]
>>  
>>  [INFO] [plugin:descriptor]
>>  [INFO] Using 2 extractors.
>>  [INFO] Applying extractor for language: java
>>  [INFO] Extractor for language: java found 0 mojo descriptors.
>>  [INFO] Applying extractor for language: bsh
>>  [INFO] Extractor for language: bsh found 0 mojo descriptors.
>>  [INFO]
>>  
>>  [ERROR] BUILD ERROR
>>  [INFO]
>>  
>>  [INFO] Error extracting plugin descriptor: 'No mojo descriptors found in
>>  plugin'
>>
>>
> There has been a bug discovered in Maven's "plugin-plugin" version 2.4:
> 
> http://jira.codehaus.org/browse/MPLUGIN-102
> 
> You guys need to lock down your version to 2.3.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/mavn-build-errors-tp16186265p16189744.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to set focus to a textfield inside AJAX

2008-03-20 Thread Igor Vaynberg
why cant you do this with javascript without ajax?? seems like a huge
waste to have a server callback just to set focus

-igor

On Thu, Mar 20, 2008 at 3:14 PM, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> I have a WMC that I added an AjaxEventBehavior(onclick) to. Inside I
>  want to set the focus to a particular textfield - how would I do that?
>
>  I have seen some techniques on how to do this on page load, but this is
>  AJAX so I need something dynamic.
>
>  Anyone solved this problem before?
>
>  Michael
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: "Redirect after post" Issue

2008-03-20 Thread Jeremy Levy
Slight correction:

With IRequestCycleSettings.ONE_PASS_RENDER  most form submits seem to work
except in the case of continueToOriginalDestination... Everything else still
fails.

J

On Thu, Mar 20, 2008 at 6:09 PM, Jeremy Levy <[EMAIL PROTECTED]> wrote:

> I have been having trouble with this for a couple of months, it seems that
> redirects in Wicket 1.3.x seem to be writing out the URL incorrectly in
> our set up.
>
> We are running JBoss 4.2 with embedded Tomcat 5.5 using Apache/2.2.4 with
> mod_proxy.
>
> The Tomcat URL for the application is http://localhost:8080/web/
>
> The Apache URL for the application is http://localhost
>
> For the most part the site works well when accessed via Apache (and
> perfectly directly via Tomcat), except on links/urls that involve (from what
> I can tell) a redirect from Wicket.  These redirect the users browser to
> /web/ which shouldn't happen from infront of the proxy.
>
> Examples of this are:
>
> 1. Form submits (they go through, but the next page is requested with the
> /web in the url)
> 2. Redirects from Application.getHomePage()
> 3. Any use of RestartResponseAtInterceptPageException
> 4. setResponsePage(MyPage.class) inside of an 
> Link.onClick(BookmarkablePageLink works fine to the same page)
>
> Further evidence that this is a bug is that if I set my application to
> IRequestCycleSettings.ONE_PASS_RENDER everything works perfectly but with
> both IRequestCycleSettings.REDIRECT_TO_BUFFER and
> IRequestCycleSettings.REDIRECT_TO_RENDER it fails.
>
> Our mod_proxy / virtualhost configuration:
>
> 
> ServerAdmin [EMAIL PROTECTED]
> ServerAlias localhost
>
> ServerSignature On
>
> DocumentRoot "/var/www"
>
> ProxyRequests Off
>
> 
> Order deny,allow
> Allow from all
> 
>
> RewriteEngine on
>
> RewriteLog "/var/log/apache2/rewrite.log"
> RewriteLogLevel 2
>
> ProxyPass / http://localhost:8080/web/
> ProxyPassReverse / http://localhost:8080/web/
> ProxyPassReverseCookiePath  /web /
> ProxyPreserveHost On
>
> ErrorLog /var/log/apache2/error.log
> LogLevel warn
> 
>
> I'm not 100% sure that the mod_proxy configuration is correct, but I've
> read all the articles on this list about it as well as the wiki page and
> have run out of ideas to mess with.
>
> Any help is appreciated.
>
> Jeremy
>


Re: mavn build errors

2008-03-20 Thread James Carman
On 3/20/08, Ritz123 <[EMAIL PROTECTED]> wrote:
>
>  Thanks for the quick response.
>
>  Just to complete the thread - for ppl like me who are not too familiar with
>  maven - the way to force plugin version - in our case plugin-plugin is the
>  plugin!! Add that to Wicket top level pom.xml file under  section
>  along with other plugins. Make sure in the corresponding Plugin-Management
>  section you provide the exact version number.
>
>  Maven gurus correct me if I am wrong - but thats how I resolved my issue.

Yep, that's the way I did it.  The fix is in the comments of the JIRA
issue I referred to before.  There's also an example project attached
that exhibits the behavior.  The Tapestry folks think it's related to
the fact that there is no source code in the archetype.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to set focus to a textfield inside AJAX

2008-03-20 Thread Michael Mehrle
Well, it doesn't necessarily have to happen in there. What I need to do
is to bind a Radio component to a TextField component. When the Radio
gets clicked I want the focus in it's TextField to be set.

Any ideas?

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 3:28 PM
To: users@wicket.apache.org
Subject: Re: How to set focus to a textfield inside AJAX

why cant you do this with javascript without ajax?? seems like a huge
waste to have a server callback just to set focus

-igor

On Thu, Mar 20, 2008 at 3:14 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> I have a WMC that I added an AjaxEventBehavior(onclick) to. Inside I
>  want to set the focus to a particular textfield - how would I do
that?
>
>  I have seen some techniques on how to do this on page load, but this
is
>  AJAX so I need something dynamic.
>
>  Anyone solved this problem before?
>
>  Michael
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get error message register in IModel.getObject() to show up in FeedbackPanel?

2008-03-20 Thread Igor Vaynberg
in a real app people will be invested in fixing the issue and not
having someone else do their homework for them :)

like i said, right now we consider errors in models unrecoverable - eg
you go to an error page. seemed to satisfy everyone for 3? years that
wicket has been out.

that said, you can get a little creative and come up with something.
stuff below should work with regular requests, havent tested it with
ajax yet.


-igor

public abstract static class ErrorAwareModelAdapter
implements
IModel,
IComponentAssignedModel,
IWrapModel
{
private boolean error = false;
private final IModel delegate;
private Component component;

public ErrorAwareModelAdapter(IModel delegate)
{

this.delegate = delegate;
}

/** gets value that should be returned from
getobject() if exception is thrown */
protected Object getErrorResult()
{
return null;
}

/** handles the error - such as
component.getsession().error(e.getmessage()); */
protected void handleError(RuntimeException e)
{

}

@Override
public Object getObject()
{
if (error)
{
error = false;
return getErrorResult();
}
else
{
try
{
return delegate.getObject();
}
catch (RuntimeException e)
{
error = true;
handleError(e);
component.getPage().detach();
throw new 
AbstractRestartResponseException()
{
};
}
}
}


@Override
public void setObject(Object object)
{
delegate.setObject(object);
}


@Override
public void detach()
{
delegate.detach();
}


@Override
public IWrapModel wrapOnAssignment(Component component)
{
this.component = component;
return this;
}


@Override
public IModel getWrappedModel()
{
return delegate;
}

}


On Thu, Mar 20, 2008 at 2:48 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
> Then what? In real app, the model is calling some flakey remote service that
>  can fail.  Is there no way to show error message on the same page?  That the
>  only thing is put up a different error page?
>
>
>
>  On Thu, Mar 20, 2008 at 1:29 PM, Matej Knopp <[EMAIL PROTECTED]> wrote:
>
>  > This doesn't work because the model.getObject method is only called
>  > when the value is pulled out of the model, which is on label render.
>  > Even if you refresh it on ajax request, it might be too late because
>  > the feedback panel retrieves the feedback messages in onBeforeRender
>  > (before actual rendering).
>  >
>  > -Matej
>  >
>  > On Wed, Mar 19, 2008 at 10:04 PM, Matthew Young <[EMAIL PROTECTED]> wrote:
>  > >  I register an error to the page in the model but the feedback message
>  > >  doesn't show in FeedbackPanel.  Only the error message register in
>  > >  onSubmit() event handler shows.  Please have a look.  Thanks!
>  > >
>  > >  HomePage.html:
>  > >
>  > >  
>  > >  
>  > > message will be here
>  > > 
>  > > 
>  > > 
>  > > 
>  > > FEEDBACK
>  > >  
>  > >
>  > >
>  > >  HomePage.java
>  > >
>  > >  import ...
>  > >
>  > >  public class HomePage extends WebPage {private static final long
>  > >  serialVersionUID = 1L;
>  > >
>  > > private String word;
>  > >
>  > > public HomePage(final PageParameters parameters) {
>  > >
>  > > add(new
>  > >  FeedbackPanel("feedback").setOutputMarkupPlaceholderTag(true));
>  > > // if the word 'blowup' is entered, this model register a error
>  > >  message to the page
>  > > IModel model = new Model() {private static final
>  > long
>  > >  serialVersionUID = 1L;
>  > > @Override public Object getObject() {
>  > > 

Re: How to set focus to a textfield inside AJAX

2008-03-20 Thread Igor Vaynberg
textfield.setoutputmarkupid(true);
radio.add(new behavior() { oncomponenttag(tag) { tag.put("onclick",
"getelementbyid('"+textfield.getmarkupid()+"').focus()";}));

-igor


On Thu, Mar 20, 2008 at 3:51 PM, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> Well, it doesn't necessarily have to happen in there. What I need to do
>  is to bind a Radio component to a TextField component. When the Radio
>  gets clicked I want the focus in it's TextField to be set.
>
>  Any ideas?
>
>  Michael
>
>
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  Sent: Thursday, March 20, 2008 3:28 PM
>  To: users@wicket.apache.org
>  Subject: Re: How to set focus to a textfield inside AJAX
>
>  why cant you do this with javascript without ajax?? seems like a huge
>  waste to have a server callback just to set focus
>
>  -igor
>
>  On Thu, Mar 20, 2008 at 3:14 PM, Michael Mehrle <[EMAIL PROTECTED]>
>  wrote:
>  > I have a WMC that I added an AjaxEventBehavior(onclick) to. Inside I
>  >  want to set the focus to a particular textfield - how would I do
>  that?
>  >
>  >  I have seen some techniques on how to do this on page load, but this
>  is
>  >  AJAX so I need something dynamic.
>  >
>  >  Anyone solved this problem before?
>  >
>  >  Michael
>  >
>  >  -
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to set focus to a textfield inside AJAX

2008-03-20 Thread Michael Mehrle
I was actually trying something close with overriding
renderHead(IHeaderResponse iHeaderResponse). Didn't seem to stick
though...

Just for the record - would the above method be an alternative to making
this work?

Thanks a bunch - saved my day.

Cheers,

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 3:56 PM
To: users@wicket.apache.org
Subject: Re: How to set focus to a textfield inside AJAX

textfield.setoutputmarkupid(true);
radio.add(new behavior() { oncomponenttag(tag) { tag.put("onclick",
"getelementbyid('"+textfield.getmarkupid()+"').focus()";}));

-igor


On Thu, Mar 20, 2008 at 3:51 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Well, it doesn't necessarily have to happen in there. What I need to
do
>  is to bind a Radio component to a TextField component. When the Radio
>  gets clicked I want the focus in it's TextField to be set.
>
>  Any ideas?
>
>  Michael
>
>
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  Sent: Thursday, March 20, 2008 3:28 PM
>  To: users@wicket.apache.org
>  Subject: Re: How to set focus to a textfield inside AJAX
>
>  why cant you do this with javascript without ajax?? seems like a huge
>  waste to have a server callback just to set focus
>
>  -igor
>
>  On Thu, Mar 20, 2008 at 3:14 PM, Michael Mehrle
<[EMAIL PROTECTED]>
>  wrote:
>  > I have a WMC that I added an AjaxEventBehavior(onclick) to. Inside
I
>  >  want to set the focus to a particular textfield - how would I do
>  that?
>  >
>  >  I have seen some techniques on how to do this on page load, but
this
>  is
>  >  AJAX so I need something dynamic.
>  >
>  >  Anyone solved this problem before?
>  >
>  >  Michael
>  >
>  >
-
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >