RE: listview

2008-09-09 Thread Patel, Sanjay
Thanks. This is what I want. 

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 09, 2008 5:01 PM
To: users@wicket.apache.org
Subject: Re: listview

use a gridview

-igor

On Tue, Sep 9, 2008 at 1:30 PM, Patel, Sanjay <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I have a list of String that I want to display using ListView in three

> different columns of table. I don't want to split list into three 
> lists and use three different ListViews. I just want to use only one 
> ListView and display strings in three columns.
>
> e.g.
>
> 
> Title of Table
> 
> string1   | string2   | string3
> string11  | string22  | string33
> string111 | string222 | string333
>
>
> Is there any way to do it?
>
> Thanks,
>
> -Sanjay
>
>
> -
> 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]



listview

2008-09-09 Thread Patel, Sanjay
Hi,

I have a list of String that I want to display using ListView in three
different columns of table. I don't want to split list into three lists
and use three different ListViews. I just want to use only one ListView
and display strings in three columns.

e.g.


Title of Table

string1   | string2   | string3
string11  | string22  | string33
string111 | string222 | string333


Is there any way to do it?

Thanks,

-Sanjay 


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



How to get context path

2008-06-11 Thread Patel, Sanjay
Hi,

my images in the application are in webapp/image folder. How to get
Context Path in wicket so I can prepend this path to display the image.
I am looking for something like this.

getContextPath() + "image/icon.gif";

Please suggest how to do that.

Thanks,
Sanjay.


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



RE: how to pass parameters while setting page expired error page

2008-06-05 Thread Patel, Sanjay
That's what I am doing right now. I was just wondering if there is
another way so there is no need to create another page just to add one
line (info(xxx)). 

Thanks for your time.
Sanjay.

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 05, 2008 3:39 AM
To: users@wicket.apache.org
Subject: Re: how to pass parameters while setting page expired error
page

class SessionExpiredLoginPage extends LoginPage() {
SessionExpiredLoginPage()
   {
super();
info(xx)
   }
}


On Wed, Jun 4, 2008 at 6:25 PM, Patel, Sanjay <[EMAIL PROTECTED]>
wrote:

> I want to pass some param so I can know in LoginPage that it is called

> because of session expired and I can show appropriate message (e.g 
> your session is expired, please login again.)
>
> -Original Message-
> From: Johan Compagner [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 04, 2008 12:11 PM
> To: users@wicket.apache.org
> Subject: Re: how to pass parameters while setting page expired error 
> page
>
> What param is that? What info do you want to pass in?
>
>
>
> On 6/4/08, Patel, Sanjay <[EMAIL PROTECTED]> wrote:
> > I want to redirect to LoginPage if session expires and want to show 
> > message that "your session expired, please login again."
> > Is there any way that I can pass parameters to LoginPage ??
> >
> > getApplicationSettings().setPageExpiredErrorPage(LoginPage.class);
> >
> > Thanks,
> > Sanjay.
> >
> >
> > 
> > - 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 pass parameters while setting page expired error page

2008-06-04 Thread Patel, Sanjay
I want to redirect to LoginPage when session expires. If I can pass page
parameter while setting expired page, I can use that parameter in
LoginPage to know that LoginPage is called because of Session is
expired.

 getApplicationSettings().setPageExpiredErrorPage(LoginPage.class, new
PageParameters("pageExpired=true"));

and in LoginPage

...
public LoginPage(final PageParameters parameters) { 
super(parameters);
parameters.getString("pageExpired")

if(pageExpired == true)
error("Your session is Expired. Pleae login
again.", this);
...
}
...


-----Original Message-
From: Patel, Sanjay [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2008 12:26 PM
To: users@wicket.apache.org
Subject: RE: how to pass parameters while setting page expired error
page

I want to pass some param so I can know in LoginPage that it is called
because of session expired and I can show appropriate message (e.g your
session is expired, please login again.)

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2008 12:11 PM
To: users@wicket.apache.org
Subject: Re: how to pass parameters while setting page expired error
page

What param is that? What info do you want to pass in?



On 6/4/08, Patel, Sanjay <[EMAIL PROTECTED]> wrote:
> I want to redirect to LoginPage if session expires and want to show 
> message that "your session expired, please login again."
> Is there any way that I can pass parameters to LoginPage ??
>
> getApplicationSettings().setPageExpiredErrorPage(LoginPage.class);
>
> Thanks,
> Sanjay.
>
>
> -
> 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 pass parameters while setting page expired error page

2008-06-04 Thread Patel, Sanjay
I want to pass some param so I can know in LoginPage that it is called
because of session expired and I can show appropriate message (e.g your
session is expired, please login again.)

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2008 12:11 PM
To: users@wicket.apache.org
Subject: Re: how to pass parameters while setting page expired error
page

What param is that? What info do you want to pass in?



On 6/4/08, Patel, Sanjay <[EMAIL PROTECTED]> wrote:
> I want to redirect to LoginPage if session expires and want to show 
> message that "your session expired, please login again."
> Is there any way that I can pass parameters to LoginPage ??
>
> getApplicationSettings().setPageExpiredErrorPage(LoginPage.class);
>
> Thanks,
> Sanjay.
>
>
> -
> 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 pass parameters while setting page expired error page

2008-06-04 Thread Patel, Sanjay
I want to redirect to LoginPage if session expires and want to show
message that "your session expired, please login again."
Is there any way that I can pass parameters to LoginPage ??

getApplicationSettings().setPageExpiredErrorPage(LoginPage.class);

Thanks,
Sanjay.


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



RE: WicketStuff Dojo Tooltip - Question

2008-05-15 Thread Patel, Sanjay
has anybody worked on Wicket Dojo Tooltip?  

-Original Message-
From: Patel, Sanjay [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 14, 2008 10:57 AM
To: users@wicket.apache.org
Subject: WicketStuff Dojo Tooltip - Question

I used WicketStuff Dojo Tooltip in my one page and it works fine. Right
now the tooltip displays on mouseover event. Is there anyway I can
display it on onClick event?

On my other page I have a link which I am hiding/showing through ajax
update (target.addComponent(..)) based on some condition. In this case
the tooltip is not being displayed.
Do I need to do anything else for that? Please see code below.
-
JAVA Code
final Label myLinkComponent= new Label("link",
objectiveDescLabelModel) {

public boolean isVisible() {
return "true or false based on
condition";
}
};
final MyPanel myPanel = new MyPanel ("panel-id",
objectiveDescLabelModel, new LoadableDetachableModel() {
private static final long serialVersionUID = 1L;

protected final Object load() {
return "Dynamic Tooltip";
}

});
DojoTooltip tooltip = new DojoTooltip("tooltip",
myLinkComponent);
tooltip.add(myPanel);
...
add(myLinkComponent);
add(tooltip);
-
HTML Code




Thanks,
Sanjay Patel


-
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]



WicketStuff Dojo Tooltip - Question

2008-05-14 Thread Patel, Sanjay
I used WicketStuff Dojo Tooltip in my one page and it works fine. Right
now the tooltip displays on mouseover event. Is there anyway I can
display it on onClick event?

On my other page I have a link which I am hiding/showing through ajax
update (target.addComponent(..)) based on some condition. In this case
the tooltip is not being displayed.
Do I need to do anything else for that? Please see code below.
-
JAVA Code
final Label myLinkComponent= new Label("link",
objectiveDescLabelModel) {

public boolean isVisible() {
return "true or false based on
condition";
}
};
final MyPanel myPanel = new MyPanel ("panel-id",
objectiveDescLabelModel, new LoadableDetachableModel() {
private static final long serialVersionUID = 1L;

protected final Object load() {
return "Dynamic Tooltip";
}

});
DojoTooltip tooltip = new DojoTooltip("tooltip",
myLinkComponent);
tooltip.add(myPanel);
...
add(myLinkComponent);
add(tooltip);
-
HTML Code




Thanks,
Sanjay Patel


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



RE: ListView is not gettting updated

2008-05-02 Thread Patel, Sanjay
 Thanks a lot. It works now. I appreciate.

 Sanjay.

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 02, 2008 9:53 AM
To: Wicket Users List
Subject: Re: ListView is not gettting updated

   final MyObject object = (MyObject)
item.getModelObject();
   final RadioGroup radioGroup = new
RadioGroup("radio-group", new Model());

   final Model radioModel1 = new
Model(myObject1);
   final Model radioModel2 = new
Model(myObject2);
   final Model radioModel3 = new
Model(myObject3);
   radioGroup.add(new
Radio("radio1",radioModel1));
   radioGroup.add(new
Radio("radio2",radioModel2));
   radioGroup.add(new
Radio("radio2",radioModel3));

   // set default value for radio.
   if (object.isTrue() != null &&
object.isTrue()) {

radioGroup.setModel(radioModel1);
   } else if (object.isFalse() != null &&
object.isFalse()) {

radioGroup.setModelObject(radioModel2.getObject());
   } else {

radioGroup.setModelObject(radioModel3.getObject());
   }
   item.add(radioGroup);


On Fri, May 2, 2008 at 3:09 PM, Patel, Sanjay <[EMAIL PROTECTED]>
wrote:

> Does anyone have any input on this? Help will be appreciated.
>
> Thanks,
> Sanjay
>
> -Original Message-
> From: Patel, Sanjay [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 01, 2008 8:52 AM
> To: users@wicket.apache.org
> Subject: RE: ListView is not gettting updated
>
> I set model of the radio on the group because I want one of the radio 
> in the group to be selected based on some condition.
>
> Let me tell you my exact requirement. There are 12 diff. rows having 
> three radio buttons in each row.  I can select only one radio in each 
> row so I put all three radios in radio group. Also I want one of the 
> radio in the group to be selected by default based on some condition 
> so I set model of radio on the group.
>
> Please let me know the better way of doing this.
>
> Thanks,
> Sanjay.
>
> -Original Message-
> From: Johan Compagner [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 30, 2008 7:27 PM
> To: users@wicket.apache.org
> Subject: Re: ListView is not gettting updated
>
> And thats logical, your code looks weird.
> You cant set the model of a radio also on the group.
> Then the submit will update the selected in the radio groups model.
> Butthen the radio model is also uopdated. So that one is still 
> selected..
>
> On 4/30/08, Patel, Sanjay <[EMAIL PROTECTED]> wrote:
> > I already tried it but it is not working.
> >
> > I have to do following (which I don't want) to update the listView 
> > after I submit the form.
> >
> > listView.setModel(new Model((Serializable) updatedList));
> >
> > -Original Message-
> > From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, April 30, 2008 2:02 PM
> > To: users@wicket.apache.org
> > Subject: Re: ListView is not gettting updated
> >
> > listview.setreuseitems(true), read listview's javadoc
> >
> > -igor
> >
> > On Wed, Apr 30, 2008 at 10:59 AM, Patel, Sanjay 
> > <[EMAIL PROTECTED]>
> > wrote:
> > >
> > >  Hi,
> > >
> > >  I am using ListView and and each item in the listview is
> RadioGroup.
> > > Now  the problem is, If radio1 is selected and I select radio2 and

> > > submit  the form the selection goes back to radio1. What is wrong 
> > > with
> >
> > > following  code?
> > >
> > >  final ListView listView = new ListView("abc", myList) {
> > > protected final void populateItem(final 
> > > ListItem
> > >  item) {
> > > final MyObject object = (MyObject)

> > > item.getModelObject();
> > > final RadioGroup radioGroup = new 
> > > RadioGroup("radio-group", new Model());
> > >
> > > final Model radioModel1 = new 
> > > Model(myObject1);
> > > final Model radioModel2 = new 
> > > Model(myObject2);
> > > final Model radioModel3 = new 
> > > Model(myObject3);
> > >
> > >  

RE: ListView is not gettting updated

2008-05-02 Thread Patel, Sanjay
Does anyone have any input on this? Help will be appreciated.

Thanks,
Sanjay

-Original Message-
From: Patel, Sanjay [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 01, 2008 8:52 AM
To: users@wicket.apache.org
Subject: RE: ListView is not gettting updated

I set model of the radio on the group because I want one of the radio in
the group to be selected based on some condition.

Let me tell you my exact requirement. There are 12 diff. rows having
three radio buttons in each row.  I can select only one radio in each
row so I put all three radios in radio group. Also I want one of the
radio in the group to be selected by default based on some condition so
I set model of radio on the group.

Please let me know the better way of doing this.

Thanks,
Sanjay.

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 30, 2008 7:27 PM
To: users@wicket.apache.org
Subject: Re: ListView is not gettting updated

And thats logical, your code looks weird.
You cant set the model of a radio also on the group.
Then the submit will update the selected in the radio groups model.
Butthen the radio model is also uopdated. So that one is still
selected..

On 4/30/08, Patel, Sanjay <[EMAIL PROTECTED]> wrote:
> I already tried it but it is not working.
>
> I have to do following (which I don't want) to update the listView 
> after I submit the form.
>
> listView.setModel(new Model((Serializable) updatedList));
>
> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 30, 2008 2:02 PM
> To: users@wicket.apache.org
> Subject: Re: ListView is not gettting updated
>
> listview.setreuseitems(true), read listview's javadoc
>
> -igor
>
> On Wed, Apr 30, 2008 at 10:59 AM, Patel, Sanjay <[EMAIL PROTECTED]>
> wrote:
> >
> >  Hi,
> >
> >  I am using ListView and and each item in the listview is
RadioGroup.
> > Now  the problem is, If radio1 is selected and I select radio2 and 
> > submit  the form the selection goes back to radio1. What is wrong 
> > with
>
> > following  code?
> >
> >  final ListView listView = new ListView("abc", myList) {
> > protected final void populateItem(final 
> > ListItem
> >  item) {
> > final MyObject object = (MyObject) 
> > item.getModelObject();
> > final RadioGroup radioGroup = new 
> > RadioGroup("radio-group", new Model());
> >
> > final Model radioModel1 = new 
> > Model(myObject1);
> > final Model radioModel2 = new 
> > Model(myObject2);
> > final Model radioModel3 = new 
> > Model(myObject3);
> >
> > radioGroup.add(new Radio("radio1", 
> > radioModel1));
> > radioGroup.add(new Radio("radio2", 
> > radioModel2));
> > radioGroup.add(new Radio("radio2", 
> > radioModel3));
> >
> > // set default value for radio.
> > if (object.isTrue() != null &&
> >  object.isTrue()) {
> >
> >  radioGroup.setModel(radioModel1);
> > } else if (object.isFalse() != null 
> > &&
> >  object.isFalse()) {
> >
> >  radioGroup.setModel(radioModel2);
> > } else {
> >
> >  radioGroup.setModel(radioModel3);
> > }
> > item.add(radioGroup);
> > }
> > };
> > form.add(listView);
> >
> >
> >  
> > 
> > -  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: ListView is not gettting updated

2008-05-01 Thread Patel, Sanjay
I set model of the radio on the group because I want one of the radio in
the group to be selected based on some condition.

Let me tell you my exact requirement. There are 12 diff. rows having
three radio buttons in each row.  I can select only one
radio in each row so I put all three radios in radio group. Also I want
one of the radio in the group to be selected based on some
condition so I set model of radio on the group.

Please let me know the better way of doing this.

Thanks,
Sanjay.

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 30, 2008 7:27 PM
To: users@wicket.apache.org
Subject: Re: ListView is not gettting updated

And thats logical, your code looks weird.
You cant set the model of a radio also on the group.
Then the submit will update the selected in the radio groups model.
Butthen the radio model is also uopdated. So that one is still
selected..

On 4/30/08, Patel, Sanjay <[EMAIL PROTECTED]> wrote:
> I already tried it but it is not working.
>
> I have to do following (which I don't want) to update the listView 
> after I submit the form.
>
> listView.setModel(new Model((Serializable) updatedList));
>
> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 30, 2008 2:02 PM
> To: users@wicket.apache.org
> Subject: Re: ListView is not gettting updated
>
> listview.setreuseitems(true), read listview's javadoc
>
> -igor
>
> On Wed, Apr 30, 2008 at 10:59 AM, Patel, Sanjay <[EMAIL PROTECTED]>
> wrote:
> >
> >  Hi,
> >
> >  I am using ListView and and each item in the listview is
RadioGroup.
> > Now  the problem is, If radio1 is selected and I select radio2 and 
> > submit  the form the selection goes back to radio1. What is wrong 
> > with
>
> > following  code?
> >
> >  final ListView listView = new ListView("abc", myList) {
> > protected final void populateItem(final 
> > ListItem
> >  item) {
> > final MyObject object = (MyObject) 
> > item.getModelObject();
> > final RadioGroup radioGroup = new 
> > RadioGroup("radio-group", new Model());
> >
> > final Model radioModel1 = new 
> > Model(myObject1);
> > final Model radioModel2 = new 
> > Model(myObject2);
> > final Model radioModel3 = new 
> > Model(myObject3);
> >
> > radioGroup.add(new Radio("radio1", 
> > radioModel1));
> > radioGroup.add(new Radio("radio2", 
> > radioModel2));
> > radioGroup.add(new Radio("radio2", 
> > radioModel3));
> >
> > // set default value for radio.
> > if (object.isTrue() != null &&
> >  object.isTrue()) {
> >
> >  radioGroup.setModel(radioModel1);
> > } else if (object.isFalse() != null 
> > &&
> >  object.isFalse()) {
> >
> >  radioGroup.setModel(radioModel2);
> > } else {
> >
> >  radioGroup.setModel(radioModel3);
> > }
> > item.add(radioGroup);
> > }
> > };
> > form.add(listView);
> >
> >
> >  
> > 
> > -  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: ListView is not gettting updated

2008-04-30 Thread Patel, Sanjay
I already tried it but it is not working.

I have to do following (which I don't want) to update the listView after
I submit the form.

listView.setModel(new Model((Serializable) updatedList)); 

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 30, 2008 2:02 PM
To: users@wicket.apache.org
Subject: Re: ListView is not gettting updated

listview.setreuseitems(true), read listview's javadoc

-igor

On Wed, Apr 30, 2008 at 10:59 AM, Patel, Sanjay <[EMAIL PROTECTED]>
wrote:
>
>  Hi,
>
>  I am using ListView and and each item in the listview is RadioGroup. 
> Now  the problem is, If radio1 is selected and I select radio2 and 
> submit  the form the selection goes back to radio1. What is wrong with

> following  code?
>
>  final ListView listView = new ListView("abc", myList) {
> protected final void populateItem(final 
> ListItem
>  item) {
> final MyObject object = (MyObject)  
> item.getModelObject();
> final RadioGroup radioGroup = new  
> RadioGroup("radio-group", new Model());
>
> final Model radioModel1 = new  
> Model(myObject1);
> final Model radioModel2 = new  
> Model(myObject2);
> final Model radioModel3 = new  
> Model(myObject3);
>
> radioGroup.add(new Radio("radio1",  
> radioModel1));
> radioGroup.add(new Radio("radio2",  
> radioModel2));
> radioGroup.add(new Radio("radio2",  
> radioModel3));
>
> // set default value for radio.
> if (object.isTrue() != null &&
>  object.isTrue()) {
>
>  radioGroup.setModel(radioModel1);
> } else if (object.isFalse() != null &&
>  object.isFalse()) {
>
>  radioGroup.setModel(radioModel2);
> } else {
>
>  radioGroup.setModel(radioModel3);
> }
> item.add(radioGroup);
> }
> };
> form.add(listView);
>
>
>  -
>  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]



ListView is not gettting updated

2008-04-30 Thread Patel, Sanjay
 
Hi,

I am using ListView and and each item in the listview is RadioGroup. Now
the problem is, If radio1 is selected and I select radio2 and submit
the form the selection goes back to radio1. What is wrong with following
code? 

final ListView listView = new ListView("abc", myList) {
protected final void populateItem(final ListItem
item) {
final MyObject object = (MyObject)
item.getModelObject();
final RadioGroup radioGroup = new
RadioGroup("radio-group", new Model());

final Model radioModel1 = new
Model(myObject1);
final Model radioModel2 = new
Model(myObject2);
final Model radioModel3 = new
Model(myObject3);

radioGroup.add(new Radio("radio1",
radioModel1));
radioGroup.add(new Radio("radio2",
radioModel2));
radioGroup.add(new Radio("radio2",
radioModel3));

// set default value for radio.
if (object.isTrue() != null &&
object.isTrue()) {

radioGroup.setModel(radioModel1);
} else if (object.isFalse() != null &&
object.isFalse()) {

radioGroup.setModel(radioModel2);
} else {

radioGroup.setModel(radioModel3);
}
item.add(radioGroup);
}
};
form.add(listView);


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



RE: help wanted for wicket autocomplete component

2008-04-16 Thread Patel, Sanjay
Thanks. It helped me.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ryan
Gravener
Sent: Tuesday, April 15, 2008 2:53 PM
To: users@wicket.apache.org
Subject: Re: help wanted for wicket autocomplete component


Set the model object in getTextValue(java.lang.Object object)

but in your renderChoice(*) do not call getTextValue!!!  make another
method called getStringValue() and return the actor name, then in
getTextValue set the modelobject and return getStringValue().

I am not positive this will work.

On Tue, Apr 15, 2008 at 2:23 PM, Patel, Sanjay <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
>  I am trying to implement a simple auto complete AJAX text box which gives me 
> the names of actors as I type in (by searching and getting the list of actors 
> from database),  and set the Model Object (which is Actor selected from the 
> auto complete drop down) for the Panel (in which this Auto complete Text 
> Field lies); In adding a Behavior to the field, I am trying to do a setModel( 
> ) for the panel (which contains the AutoCompleteTextField), but when I get 
> the object (autoCompleteTextField.getModelObject( )) inside the behavior 
> anonymous class, It returns a string, even though outside I seem to be 
> getting model Object fine (outside as in outside the anonymous class 
> declaration). Here's the full code as I know it.
>
>
>
>  final AutoCompleteTextField actorInformationAutoCompleteTextField = new 
> AutoCompleteTextField("input-auto-complete-actorForPanel-search", new 
> Model((Actor) getModel().getObject()),
>
> new AbstractAutoCompleteRenderer() {
>
>   private static final long serialVersionUID = 1L;
>
>
>
>   /**
>
>* [EMAIL PROTECTED]
>
>*/
>
>   @Override
>
>   protected String getTextValue(Object object) {
>
>  return ((Actor) object).getLastName() + COMMA_SEPARATOR + (((Actor) 
> object).getFirstName());
>
>   }
>
>
>
>   /**
>
>* [EMAIL PROTECTED]
>
>*/
>
>   @Override
>
>   protected void renderChoice(Object object, 
> Response response, String criteria) {
>
> response.write(getTextValue(object));
>
>
>
>   }
>
> }) {
>
>
>
>   private static final long serialVersionUID = 1L;
>
>
>
>   /**
>
>* [EMAIL PROTECTED]
>
>*/
>
>   @Override
>
>   @SuppressWarnings("unchecked")
>
>   protected final Iterator getChoices(final String 
> input) {
>
> System.out.println(" getChoices called 
> ---> ");
>
> if (Strings.isEmpty(input)) {
>
>   return Collections.EMPTY_LIST.iterator();
>
> }
>
>
>
> // our list of choices (this is displayed with when 
> user starts typing something)
>
> final List choices = new ArrayList(10);
>
>
>
> // set the search key for data provider ...
>
> List actors = new ActorDataProvider(input, 
> 10).search(0, 10).getCollection();
>
>
>
> for (int i = 0; i < actors.size(); i++) {
>
>   System.out.println(" Inside actors loop 
> >>>>>>>>>>>>");
>
>   System.out.println(" Actor[i] > " + 
> actors.get(i).getFirstName());
>
>   final Actor actorTemp = actors.get(i);
>
>
>
>  if (actorTemp.getFirstName().trim().contains(input) || 
> actorTemp.getLastName().contains(input)) {
>
> choices.add(actorTemp);
>
>
>
>   }
>
>
>
>   if (choices.size() == 10) {
>
> break;
>
>   }
>
> }
>
>
>
> return choices.iterator();
>
>   }
>
>
>
> };
>
>
>
>
>
>  Here is where I add Be

help wanted for wicket autocomplete component

2008-04-15 Thread Patel, Sanjay
Hi,

 

I am trying to implement a simple auto complete AJAX text box which gives me 
the names of actors as I type in (by searching and getting the list of actors 
from database),  and set the Model Object (which is Actor selected from the 
auto complete drop down) for the Panel (in which this Auto complete Text Field 
lies); In adding a Behavior to the field, I am trying to do a setModel( ) for 
the panel (which contains the AutoCompleteTextField), but when I get the object 
(autoCompleteTextField.getModelObject( )) inside the behavior anonymous class, 
It returns a string, even though outside I seem to be getting model Object fine 
(outside as in outside the anonymous class declaration). Here's the full code 
as I know it.  

 

final AutoCompleteTextField actorInformationAutoCompleteTextField = new 
AutoCompleteTextField("input-auto-complete-actorForPanel-search", new 
Model((Actor) getModel().getObject()),

new AbstractAutoCompleteRenderer() {

  private static final long serialVersionUID = 1L;

 

  /**

   * [EMAIL PROTECTED]

   */

  @Override

  protected String getTextValue(Object object) {

return ((Actor) object).getLastName() + COMMA_SEPARATOR + (((Actor) 
object).getFirstName());

  }

 

  /**

   * [EMAIL PROTECTED]

   */

  @Override

  protected void renderChoice(Object object, 
Response response, String criteria) {

response.write(getTextValue(object));

 

  }

}) {

 

  private static final long serialVersionUID = 1L;

 

  /**

   * [EMAIL PROTECTED]

   */

  @Override

  @SuppressWarnings("unchecked")

  protected final Iterator getChoices(final String 
input) {

System.out.println(" getChoices called 
---> ");

if (Strings.isEmpty(input)) {

  return Collections.EMPTY_LIST.iterator();

}

 

// our list of choices (this is displayed with when 
user starts typing something)

final List choices = new ArrayList(10);

 

// set the search key for data provider ...

List actors = new ActorDataProvider(input, 
10).search(0, 10).getCollection();

 

for (int i = 0; i < actors.size(); i++) {

  System.out.println(" Inside actors loop 
");

  System.out.println(" Actor[i] > " + 
actors.get(i).getFirstName());

  final Actor actorTemp = actors.get(i);

 

if (actorTemp.getFirstName().trim().contains(input) || 
actorTemp.getLastName().contains(input)) {

choices.add(actorTemp);

 

  }

 

  if (choices.size() == 10) {

break;

  }

}

 

return choices.iterator();

  }

 

};

 

 

Here is where I add Behavior:

actorInformationAutoCompleteTextField.add(new 
AjaxFormSubmitBehavior("onchange") {

  private static final long serialVersionUID = 1L;

 

  /**

   * [EMAIL PROTECTED]

   */

  @Override

  protected final void onSubmit(final AjaxRequestTarget target) 
{

System.out.println(" onSubmit( ) for 
AjaxFormSubmitBehavior called ");

// set the Model for the panel (with model object actor)

AbstractActorInformationPanel.this.setModelObject((Actor) 

AbstractActorInformationPanel.this.setReviewPlan(getReviewPlanForActor((Actor) 
actorInformationAutoCompleteTextField .getModelObject())); 
< When I try to do getModelObject( ) here it gives me 
Class Cast Exception! (Cannot convert from String to Actor)

  }

 

  /**

   * [EMAIL PROTECTED]

   */

  @Override

  protected final void onError(final AjaxRequestTarget target) {

System.out.println(" onError( ) for 
AjaxFormSubmitBehavior called ");

  }

});

 

 

Can someone tell me what's wrong?


-
To unsubscribe, e-mail: [EM

how to generate radio groups dynamically

2008-03-28 Thread Patel, Sanjay
Hi, See the following html. I want to group two radio buttons, one from the 
first  of first row and other is first  for second row. Then second 
 of first row and second  of second row and so on. How can I create 
this dataview dynamically and group the radio buttons ?



 
[Meets]  
















[Does Not Meet]















Sanjay 


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



RadioChoice vs RadioGroup

2008-03-24 Thread Patel, Sanjay
I am new to Wicket. Can anyone explain about the difference between RadioChoice 
and RadioGroup with example and when to use which?

Thanks,
Sanjay 


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/./> 
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> 
http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="  <http://java.sun.com/xml/ns/j2ee> 
http://java.sun.com/xml/ns/j2ee  
<http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd> 
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: 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/./> 
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> 
http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="  <http://java.sun.com/xml/ns/j2ee> 
http://java.sun.com/xml/ns/j2ee  
<http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd> 
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."



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]