[Wicket-user] Re: Re: Howto generate additional inputs to existing ListView of inpu ts.. ..

2005-10-03 Thread Trieu, Danny








Johan,

 

Thanks for your speedy responds. But sadly speaking, we just
decide to but a park on Wicket for now.

But I continue to follow wicket closely to she how it helps
solve some of our concerns. Hopefully Ajax


Implementation of Wicket will be as easy and yet powerful at
wicket right now.

 

Thank you very much guy. As an early adopter of
Struts/Tiles, I have to admit I am much more impressed

With Wicket then I were with Struts at this state.

 

--danny

 


 
  
  From: Johan Compagner <[EMAIL PROTECTED]>
  Re: Re: Howto generate
  additional inputs to existing ListView of inpu ts.. ..   
  2005-10-03 13:26 
  
 
 
     if you want a empty row then just add a Empty object (new Person() or something like that) in the model (list) of the listview Then after submit that new Person() object is filled  Ajax is still in progress and moving ok. We hope to have more really advanced things in the 1.2 version of wicket.  johan  On 10/3/05, Trieu, Danny <[EMAIL PROTECTED]> wrote: > >  Johan, > >  Thanks for reply. > >  What if I do this on the serverside. How would I do it in wicket to add > empty row and render this to > > The client? > >  Thanks, > >  --danny > >  Ps. Johan, how far do you see Ajax is coming? And plus if you switch to > Ajax in wicket, would their > > Be much or portability issues? > >   From: Johan Compagner <[EMAIL PROTECTED]> > *Re: Howto generate additional inputs to existing ListView of inputs.. ..* > 2005-10-03 03:42 > > > > > > > >  as i said in other threads. > >  When you dynamically adding things on the client side > >  Then you have to do this loading of that data completely by yourself in > >  youre Form.onSubmit() method. > >   The wicket way (without ajax at them moment) you just have to go to the > >  server there add a new record (new Person) > >  so that the ListView makes an extra empty row and renders this to the > >  client. > > > >  On 10/3/05, Trieu, Danny <[EMAIL PROTECTED]> wrote: > >  > > >  >  Hi all, > >  > > >  >  It's 3am in the morning and I still trying to do something that seems > >  > simple… and yet impossible? > >  > > >  >  Ok, I have a list of Person(s) that needs to be display in a Form for > >  > update and create. > >  > > >  >  For update, I was able to update the existing data just fine. > >  > > >  >  For create, my Form has a button, when click on it, it needs to create an > >  > additional row with inputs for > >  > > >  > All of the Person attributes. > >  > > >  >  I first tried to use _javascript_ to create the new row with all the input > >  > fields empty. I used the Wicket's path > >  > > >  > Patterns to generate these new input's name( with new index for this new > >  > entry). And on the serverside, I > >  > > >  > Do as follow: > >  > > >  > · Created a new ListView that has populateItem(…) implemented. > >  > > >  > · Overrided newItem(…) and getListItemModel(…) so that newItem(…) returns > >  > a new ListItem that associated > >  > > >  > To a new ListItemModel(I extended), return by the getListItemModel(…) that > >  > I override. > >  > > >  > · The new ListItemModel I extended has onAttach(…) overrided with logic > >  > that would add new and empty > >  > > >  > Person object to the existing List of Person, that get from my ListView. > >  > getModelObject(…). > >  > > >  > Well this doesn't work. The page did create additional row of inputs for > >  > the new person. But when I submit the Form, > >  > > >  > Nothing get update to the existing list and the page come back with just > >  > the previous data in the table and my new > >  > > >  > Person input is gone and no where to be found. > >  > > >  >  My guess is, Wicket use the existing components in the page to get posted > >  > data. And since my new entry inputs > >  > > >  > Created on the client never exist on the server. Therefore, wicket does > >  > not know to go get it. > >  > > >  >  If this is right, then how do I overcome this default behavior? And if it > >  > is impossible to add new inputs on the client > >  > > >  > Browser then How do I do it on the server? Meaning, how do I create the > >  > new inputs entries on the server so that wicket > >  > > >  > Can generate new inputs entry, and client can enter data and submit it. > >  > > >  >  Thanks for any helps, > >  > > >  >  --danny > >  > > >  >  *"The essence of knowledge is, having it, to apply it; not having it, to > >  > confess your ignorance." -Confucius* > >  > > >  > > >    *"The essence of knowledge is, having it, to apply it; not having it, to > confess your ignorance." -Confucius* > > 
 


 

 

"The essence of knowledge is, having it, to apply it;
not having it, to confess your ignorance." -Confucius

 








[Wicket-user] Re: Howto generate additional inputs to existing ListView of inpu ts.. ..

2005-10-03 Thread Trieu, Danny








Johan,

 

Thanks for reply. 

 

What if I do this on the serverside. How would I do it in
wicket to add empty row and render this to

The client?  

 

Thanks,

 

--danny

 

Ps. Johan, how far do you see Ajax is coming? And plus if you switch to Ajax in wicket, would their

Be much or portability issues?

 


 
  
  From: Johan Compagner <[EMAIL PROTECTED]>
  Re: Howto generate
  additional inputs to existing ListView of inputs.. ..   
  2005-10-03 03:42 
  
 
 
  as i said in other threads. When you dynamically adding things on the client side Then you have to do this loading of that data completely by yourself in youre Form.onSubmit() method.  The wicket way (without ajax at them moment) you just have to go to the server there add a new record (new Person) so that the ListView makes an extra empty row and renders this to the client.   On 10/3/05, Trieu, Danny <[EMAIL PROTECTED]> wrote: > >  Hi all, > >  It's 3am in the morning and I still trying to do something that seems > simple… and yet impossible? > >  Ok, I have a list of Person(s) that needs to be display in a Form for > update and create. > >  For update, I was able to update the existing data just fine. > >  For create, my Form has a button, when click on it, it needs to create an > additional row with inputs for > > All of the Person attributes. > >  I first tried to use _javascript_ to create the new row with all the input > fields empty. I used the Wicket's path > > Patterns to generate these new input's name( with new index for this new > entry). And on the serverside, I > > Do as follow: > > · Created a new ListView that has populateItem(…) implemented. > > · Overrided newItem(…) and getListItemModel(…) so that newItem(…) returns > a new ListItem that associated > > To a new ListItemModel(I extended), return by the getListItemModel(…) that > I override. > > · The new ListItemModel I extended has onAttach(…) overrided with logic > that would add new and empty > > Person object to the existing List of Person, that get from my ListView. > getModelObject(…). > > Well this doesn't work. The page did create additional row of inputs for > the new person. But when I submit the Form, > > Nothing get update to the existing list and the page come back with just > the previous data in the table and my new > > Person input is gone and no where to be found. > >  My guess is, Wicket use the existing components in the page to get posted > data. And since my new entry inputs > > Created on the client never exist on the server. Therefore, wicket does > not know to go get it. > >  If this is right, then how do I overcome this default behavior? And if it > is impossible to add new inputs on the client > > Browser then How do I do it on the server? Meaning, how do I create the > new inputs entries on the server so that wicket > > Can generate new inputs entry, and client can enter data and submit it. > >  Thanks for any helps, > >  --danny > >  *"The essence of knowledge is, having it, to apply it; not having it, to > confess your ignorance." -Confucius* > > 
 


 

"The essence of knowledge is, having it, to apply it;
not having it, to confess your ignorance." -Confucius

 








[Wicket-user] Howto generate additional inputs to existing ListView of inputs.. ..

2005-10-03 Thread Trieu, Danny








Hi all,

 

It’s 3am in the morning and I still trying to do
something that seems simple… and yet impossible?

 

Ok, I have a list of Person(s) that needs to be display in a
Form for update and create. 

 

For update, I was able to update the existing data just
fine.

 

For create, my Form has a button, when click on it, it needs
to create an additional row with inputs for

All of the Person attributes.     

 

I first tried to use _javascript_ to create the new row with
all the input fields empty. I used the Wicket’s path 

Patterns to generate these new input’s name( with new
index for this new entry). And on the serverside, I

Do as follow:

·   
Created a new ListView that has populateItem(…)
implemented.

·   
Overrided newItem(…) and getListItemModel(…)
so that newItem(…) returns a new ListItem that associated 

To a new ListItemModel(I extended),
return by the getListItemModel(…) that I override.

·   
The new ListItemModel I extended has
onAttach(…) overrided with logic that would add new and empty

Person object to the existing List
of Person, that get from my ListView. getModelObject(…).

Well this doesn’t work. The page did create additional
row of inputs for the new person. But when I submit the Form,

Nothing get update to the existing list and the page come
back with just the previous data in the table and my new

Person input is gone and no where to be found.

 

My guess is, Wicket use the existing components in the page
to get posted data. And since my new entry inputs

Created on the client never exist on the server. Therefore,
wicket does not know to go get it. 

 

If this is right, then how do I overcome this default
behavior? And if it is impossible to add new inputs on the client

Browser then How do I do it on the server? Meaning, how do I
create the new inputs entries on the server so that wicket

Can generate new inputs entry, and client can enter data and
submit it.

 

Thanks for any helps,

 

--danny

 

"The essence of knowledge is, having it, to apply it;
not having it, to confess your ignorance." -Confucius

 








[Wicket-user] Dynamic inputs generated by JavaScript...... ?

2005-10-02 Thread Trieu, Danny








Hi all,

 

I need to create a Form that has a list of input group, e.g.
ListItem(s). The page has _javascript_ that will create

New input group, that allow user enter addition info. 

 

My question is how do implement this on the server side, so that
wicket knows there is addition nodes for the

Existing ListViewModel. Meaning, if the new input group
created on the client browser get submitted to the server.

What do I need to do on the server to capture the new input
data.  Is there any name pattern needed to follow for 

Those new inputs, so that wicket know and create new node
for the model.

 

Is there any example like this out there? That someone can
point me to?

 

Thanks for any help,

 

--danny

 

"The essence of knowledge is, having it, to apply it; not
having it, to confess your ignorance." -Confucius

 








[Wicket-user] Dynamic Form using ListView?

2005-10-02 Thread Trieu, Danny








Hi all,

 

I need to create a Form that has a list of input group, e.g.
ListItem(s). The page has _javascript_ that will create

New input group, that allow user enter addition info. 

 

My question is how do implement this on the server side, so
that wicket knows there is addition nodes for the

Existing ListViewModel. Meaning, if the new input group
created on the client browser get submitted to the server.

What do I need to do on the server to capture the new input
data.  Is there any name pattern needed to follow for 

Those new inputs, so that wicket know and create new node
for the model.

 

Is there any example like this out there? That someone can
point me to?

 

Thanks for any help,

 

--danny

 

"The essence of knowledge is, having it, to apply it;
not having it, to confess your ignorance." -Confucius

 








[Wicket-user] wicket-contrib-examples does not build..... missing import wicket .markup.html.image.resource.BlobImageResource

2005-09-29 Thread Trieu, Danny








Hi all,

 

I just downloaded the wicket-contrib-examples lately and
find out that it depends on import
wicket.markup.html.image.resource.BlobImageResource in its

EditPage.java. I couldn’t find import
wicket.markup.html.image.resource.BlobImageResource in the rc1, b4, or 1.0.1
release either. 

 

Doesn’t anyone have any idea where this, import
wicket.markup.html.image.resource.BlobImageResource, coming from?

 

Thanks,

 

--danny

 

"The essence of knowledge is, having it, to apply it;
not having it, to confess your ignorance." -Confucius

 








[Wicket-user] BoundCompoundPropertyModel doesn't seems to work correctly....

2005-09-29 Thread Trieu, Danny








Hi all,

 

I tried using the CompoundPropertyModel for my Form and it
works fine for me:

 

Class Person {

    String
firstName ;

    String
lastName ;

…. Getter/Setter….

}

 

Class MyForm extends Form {



    Super(
id, new CompoundPropertyModel(new Person()) ) ;

    add(
new TextField(“firstName”) ) ;

    add(
new TextField(“lastName”) ) ;

….

}

 

HTML

…..

    

    

 

However, when I tried to use BoundCompoundPropertyModel as
follow:

 

Class PersonWrapper {

    Person
person ;

….Getter/Setter….

}

 

Class MyForm extends Form {



    super(
id ) ;

    BoundCompoundPropertyModel
theFormModel = new BoundCompoundPropertyModel( new PersonWrapper( new Person()
) ) ;

    setModel(
theFormModel ) ;

 

    add(
theFormModel.bind(new TextField(“firstName”), “person.firstName”)
 ) ;

    add(
theFormModel.bind(new TextField(“lastName”), “person. lastName”)
 ) ;

….

}

HTML

…..

    

    

 

Then I got RuntimeException:

 

ERROR -
RequestCycle  
- Unexpected runtime exception [page = [Page class =
com.tickets.patron.web.PatronDetailsPage, id = 2]]

wicket.markup.MarkupException: Unable to find component with id
'firstName' in [MarkupContainer [Component id = patronForm, page =
com.tickets.patron.web.PatronDetailsPage, path =
2:boxBorder:patronForm.PatronDetailsPage$PersonForm, isVisible = true,
isVersioned = false]]. This means that you declared wicket:id=firstName in your
markup, but that you either did not add the component to your page at all, or
that the hierarchy does not match.

[markup
=
file:/C:/work/web/target/classes/com/tickets/patron/web/PatronDetailsPage.html,
index = 22, current = '' (line 41, column 108)]

 

But if I changed
the markup to its OGNL _expression_ like:

HTML

…..

    

    

…..

 

Then it works
just fine.

 

Can anyone
explain what is going on? Or if anyone can point me to a working example of
using the BoundCompoundPropertyModel.

I read the newUserGuide and wiki section on Model and it was
very simple and straight forward. However, I just couldn’t understand why
it wouldn’t work for the

Simple case I have. I tried to look into the example apps
and none are using the BoundCompoundPropertyModel. I am very frustrated and
really need OGNL expr 

To work in order to use nested Domain model objects.

 

Thanks for any help,

 

--danny

 

 

 

"The essence of knowledge is, having it, to apply it;
not having it, to confess your ignorance." -Confucius

 








[Wicket-user] cdapps and Spring/Hibernate example?

2005-09-27 Thread Trieu, Danny








Hi all,

 

Can someone help point out where I can download the CDApps
and the Spring and/or Hibernate examples? I download 

The contrib. package from http://sourceforge.net/project/showfiles.php?group_id=134391
but I couldn’t find the examples.

 

Thanks for any help.

 

-danny

 

"The essence of knowledge is, having it, to apply it;
not having it, to confess your ignorance." -Confucius

 








[Wicket-user] Howto setResponsePage( Using an existing page ) ?

2005-09-27 Thread Trieu, Danny








Hi all,

 

Instead of setting response page using the page’s
class and/or Parammeters. How can I avoid creating a 

New page and find the existing page to set, giving the page
has be visited and is in the session pagemap.

 

My reason is, constructing a new page every time is
expensive especially within clustering environment.

 

Thanks for any help.

 

--dannny

 

"The essence of knowledge is, having it, to apply it;
not having it, to confess your ignorance." -Confucius

 








[Wicket-user] How to reuse an existing page?

2005-09-26 Thread Trieu, Danny








Hi all,

 

It seems like every time you go to a Page, via click on a
Link on a page or by setting setResponsePage(…) method

You always create a new page. And this new page will end up
added to the PageMap of the current Session. 

 

My question is, why do we have to create a new page every
time?  If no, we don’t have to create a new page every time

Then How do you set response page to an existing page in
PageMap? … and Is there any common pratices and howto 

Example that I can refer to?

 

My reason for asking these question is because the overhead
of constructing a new page on every single request can 

Be a performance issues and that I need to understand the
issues to make recommendation.

 

Thanks for any help. 

 

--danny

 

"The essence of knowledge is, having it, to apply it;
not having it, to confess your ignorance." -Confucius

 








[Wicket-user] properties files.

2005-09-15 Thread Trieu, Danny








All,

 

I am new to wicket and have a question that I hope someone
can help me with.

 

Instead of having properties
file pair up with each components

which result in many files, plus
redundant msg resource. Can someone

point me to where/How I can
just have all the resource

properties in one single
properties file?

 

Thanks,

 

-danny

 

 

 

"The essence of knowledge is, having it, to apply it;
not having it, to confess your ignorance." -Confucius