Re: AjaxLazyLoadPanel question

2011-11-18 Thread heapifyman
Great, it's working.
Thanks for the quick response,

Philip



2011/11/17 Igor Vaynberg igor.vaynb...@gmail.com

 you can replace the lazy load panel instance:

 //check other selections
 myLazyLoadPanel=myLazyLoadPanel.replaceWith(new
 MyLazyLoadPanel(myLazyLoadPanel.getId(), ..)
 target.addComponent(myLazyLoadPanel);

 this will reset the state of lazyloadpanel to the not-yet-loaded

 -igor

 On Thu, Feb 3, 2011 at 11:40 AM, Matt Schmidt mschmid...@gmail.com
 wrote:
  I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
  including the service call to get the data.
 
  myLazyLoadPanel = new AjaxLazyLoadPanel(id, new
 CollectionModelPojo()) {
 public Component getLazyLoadComponent(String markupId) {
 if(getDefaultModelObject() == null) {
 setDefaultModelObject(myPojoService.readAll());
 }
 return new MyDataGridView(markupId, getDefaultModel()); //ignoring
  casting for simplicity
 }
  }
 
  That works great for loading the page before the service call is
 complete.
 
  But now I need to add a DropDownChoice to change the collection in the
 data
  grid via Ajax after the page is loaded. Is there anyway to get the
  DataGridView to be replaced with an Ajax indicator (like on page load)
  during an Ajax onchange event for the DropDownChoice? I've added an
 Ajax
  indicator to the DropDownChoice, but I would like the same behavior I
 get on
  page load for the AjaxLazyLoadPanel.
 
  This is what I have for the drop down for starters:
 
  myDropDownChoice.add(new AjaxFormComponentUpdateBehavior(onchange) {
 protected void onUpdate(AjaxRequestTarget target) {
 if(myDropDownChoice.getModelObject().equals(foo)) {
 
  myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
 }
 //check other selections
target.addComponent(myLazyLoadPanel);
 }
  }
 
  I may be looking at this entirely wrong... Any suggestions?
 

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




Re: AjaxLazyLoadPanel question

2011-11-18 Thread heapifyman
Hello again,

I have a follow-up question. Can I somehow update other components once the
AjaxLazyLoadPanel's getLazyLoadComponent() method has completed?

I thought I could use the new wicket 1.5 event mechanism for that but if I
understood correctly I would have to send the AjaxRequestTarget in the
payload to add my changed components to it, right?
And I don't really know how to get the AjaxRequestTarget in
the getLazyLoadComponent() method.

Thanks in advance for any hints,
Philip


2011/11/18 heapifyman heapify...@gmail.com

 Great, it's working.
 Thanks for the quick response,

 Philip



 2011/11/17 Igor Vaynberg igor.vaynb...@gmail.com

 you can replace the lazy load panel instance:

 //check other selections
 myLazyLoadPanel=myLazyLoadPanel.replaceWith(new
 MyLazyLoadPanel(myLazyLoadPanel.getId(), ..)
 target.addComponent(myLazyLoadPanel);

 this will reset the state of lazyloadpanel to the not-yet-loaded

 -igor

 On Thu, Feb 3, 2011 at 11:40 AM, Matt Schmidt mschmid...@gmail.com
 wrote:
  I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
  including the service call to get the data.
 
  myLazyLoadPanel = new AjaxLazyLoadPanel(id, new
 CollectionModelPojo()) {
 public Component getLazyLoadComponent(String markupId) {
 if(getDefaultModelObject() == null) {
 setDefaultModelObject(myPojoService.readAll());
 }
 return new MyDataGridView(markupId, getDefaultModel());
 //ignoring
  casting for simplicity
 }
  }
 
  That works great for loading the page before the service call is
 complete.
 
  But now I need to add a DropDownChoice to change the collection in the
 data
  grid via Ajax after the page is loaded. Is there anyway to get the
  DataGridView to be replaced with an Ajax indicator (like on page load)
  during an Ajax onchange event for the DropDownChoice? I've added an
 Ajax
  indicator to the DropDownChoice, but I would like the same behavior I
 get on
  page load for the AjaxLazyLoadPanel.
 
  This is what I have for the drop down for starters:
 
  myDropDownChoice.add(new AjaxFormComponentUpdateBehavior(onchange) {
 protected void onUpdate(AjaxRequestTarget target) {
 if(myDropDownChoice.getModelObject().equals(foo)) {
 
  myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
 }
 //check other selections
target.addComponent(myLazyLoadPanel);
 }
  }
 
  I may be looking at this entirely wrong... Any suggestions?
 

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





Re: AjaxLazyLoadPanel question

2011-11-18 Thread heapifyman
Hm, looks like AjaxRequestTarget.get() is what I was looking for?



2011/11/18 heapifyman heapify...@gmail.com

 Hello again,

 I have a follow-up question. Can I somehow update other components once
 the AjaxLazyLoadPanel's getLazyLoadComponent() method has completed?

 I thought I could use the new wicket 1.5 event mechanism for that but if I
 understood correctly I would have to send the AjaxRequestTarget in the
 payload to add my changed components to it, right?
 And I don't really know how to get the AjaxRequestTarget in
 the getLazyLoadComponent() method.

 Thanks in advance for any hints,
 Philip


 2011/11/18 heapifyman heapify...@gmail.com

 Great, it's working.
 Thanks for the quick response,

 Philip



 2011/11/17 Igor Vaynberg igor.vaynb...@gmail.com

 you can replace the lazy load panel instance:

 //check other selections
 myLazyLoadPanel=myLazyLoadPanel.replaceWith(new
 MyLazyLoadPanel(myLazyLoadPanel.getId(), ..)
 target.addComponent(myLazyLoadPanel);

 this will reset the state of lazyloadpanel to the not-yet-loaded

 -igor

 On Thu, Feb 3, 2011 at 11:40 AM, Matt Schmidt mschmid...@gmail.com
 wrote:
  I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
  including the service call to get the data.
 
  myLazyLoadPanel = new AjaxLazyLoadPanel(id, new
 CollectionModelPojo()) {
 public Component getLazyLoadComponent(String markupId) {
 if(getDefaultModelObject() == null) {
 setDefaultModelObject(myPojoService.readAll());
 }
 return new MyDataGridView(markupId, getDefaultModel());
 //ignoring
  casting for simplicity
 }
  }
 
  That works great for loading the page before the service call is
 complete.
 
  But now I need to add a DropDownChoice to change the collection in the
 data
  grid via Ajax after the page is loaded. Is there anyway to get the
  DataGridView to be replaced with an Ajax indicator (like on page load)
  during an Ajax onchange event for the DropDownChoice? I've added an
 Ajax
  indicator to the DropDownChoice, but I would like the same behavior I
 get on
  page load for the AjaxLazyLoadPanel.
 
  This is what I have for the drop down for starters:
 
  myDropDownChoice.add(new AjaxFormComponentUpdateBehavior(onchange) {
 protected void onUpdate(AjaxRequestTarget target) {
 if(myDropDownChoice.getModelObject().equals(foo)) {
 
  myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
 }
 //check other selections
target.addComponent(myLazyLoadPanel);
 }
  }
 
  I may be looking at this entirely wrong... Any suggestions?
 

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






Re: AjaxLazyLoadPanel question

2011-11-18 Thread Igor Vaynberg
yes

-igor

On Fri, Nov 18, 2011 at 8:25 AM, heapifyman heapify...@gmail.com wrote:
 Hm, looks like AjaxRequestTarget.get() is what I was looking for?



 2011/11/18 heapifyman heapify...@gmail.com

 Hello again,

 I have a follow-up question. Can I somehow update other components once
 the AjaxLazyLoadPanel's getLazyLoadComponent() method has completed?

 I thought I could use the new wicket 1.5 event mechanism for that but if I
 understood correctly I would have to send the AjaxRequestTarget in the
 payload to add my changed components to it, right?
 And I don't really know how to get the AjaxRequestTarget in
 the getLazyLoadComponent() method.

 Thanks in advance for any hints,
 Philip


 2011/11/18 heapifyman heapify...@gmail.com

 Great, it's working.
 Thanks for the quick response,

 Philip



 2011/11/17 Igor Vaynberg igor.vaynb...@gmail.com

 you can replace the lazy load panel instance:

 //check other selections
 myLazyLoadPanel=myLazyLoadPanel.replaceWith(new
 MyLazyLoadPanel(myLazyLoadPanel.getId(), ..)
 target.addComponent(myLazyLoadPanel);

 this will reset the state of lazyloadpanel to the not-yet-loaded

 -igor

 On Thu, Feb 3, 2011 at 11:40 AM, Matt Schmidt mschmid...@gmail.com
 wrote:
  I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
  including the service call to get the data.
 
  myLazyLoadPanel = new AjaxLazyLoadPanel(id, new
 CollectionModelPojo()) {
     public Component getLazyLoadComponent(String markupId) {
         if(getDefaultModelObject() == null) {
             setDefaultModelObject(myPojoService.readAll());
         }
         return new MyDataGridView(markupId, getDefaultModel());
 //ignoring
  casting for simplicity
     }
  }
 
  That works great for loading the page before the service call is
 complete.
 
  But now I need to add a DropDownChoice to change the collection in the
 data
  grid via Ajax after the page is loaded. Is there anyway to get the
  DataGridView to be replaced with an Ajax indicator (like on page load)
  during an Ajax onchange event for the DropDownChoice? I've added an
 Ajax
  indicator to the DropDownChoice, but I would like the same behavior I
 get on
  page load for the AjaxLazyLoadPanel.
 
  This is what I have for the drop down for starters:
 
  myDropDownChoice.add(new AjaxFormComponentUpdateBehavior(onchange) {
     protected void onUpdate(AjaxRequestTarget target) {
         if(myDropDownChoice.getModelObject().equals(foo)) {
 
  myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
         }
         //check other selections
        target.addComponent(myLazyLoadPanel);
     }
  }
 
  I may be looking at this entirely wrong... Any suggestions?
 

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






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



Re: AjaxLazyLoadPanel question

2011-11-17 Thread heapifyman
Hello,

I'm facing the same problem as the Matt above but honestly I must admit
that I do not really understand Pedro's advice.
Did you manage to implement his advice, Matt? Could I get a little more
information about how this IAjaxCallDecorator might actually look like?
That would be a great help.

Thanks in advance,
Philip



2011/2/4 Pedro Santos pedros...@gmail.com

 I Matt, try to decorate the AJAX javascript to show/hide the indicator
 using
 an IAjaxCallDecorator

 On Thu, Feb 3, 2011 at 5:40 PM, Matt Schmidt mschmid...@gmail.com wrote:

  I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
  including the service call to get the data.
 
  myLazyLoadPanel = new AjaxLazyLoadPanel(id, new
 CollectionModelPojo())
  {
 public Component getLazyLoadComponent(String markupId) {
 if(getDefaultModelObject() == null) {
 setDefaultModelObject(myPojoService.readAll());
 }
 return new MyDataGridView(markupId, getDefaultModel()); //ignoring
  casting for simplicity
 }
  }
 
  That works great for loading the page before the service call is
 complete.
 
  But now I need to add a DropDownChoice to change the collection in the
 data
  grid via Ajax after the page is loaded. Is there anyway to get the
  DataGridView to be replaced with an Ajax indicator (like on page load)
  during an Ajax onchange event for the DropDownChoice? I've added an
 Ajax
  indicator to the DropDownChoice, but I would like the same behavior I get
  on
  page load for the AjaxLazyLoadPanel.
 
  This is what I have for the drop down for starters:
 
  myDropDownChoice.add(new AjaxFormComponentUpdateBehavior(onchange) {
 protected void onUpdate(AjaxRequestTarget target) {
 if(myDropDownChoice.getModelObject().equals(foo)) {
 
  myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
 }
 //check other selections
target.addComponent(myLazyLoadPanel);
 }
  }
 
  I may be looking at this entirely wrong... Any suggestions?
 



 --
 Pedro Henrique Oliveira dos Santos



Re: AjaxLazyLoadPanel question

2011-11-17 Thread Igor Vaynberg
you can replace the lazy load panel instance:

//check other selections
myLazyLoadPanel=myLazyLoadPanel.replaceWith(new
MyLazyLoadPanel(myLazyLoadPanel.getId(), ..)
target.addComponent(myLazyLoadPanel);

this will reset the state of lazyloadpanel to the not-yet-loaded

-igor

On Thu, Feb 3, 2011 at 11:40 AM, Matt Schmidt mschmid...@gmail.com wrote:
 I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
 including the service call to get the data.

 myLazyLoadPanel = new AjaxLazyLoadPanel(id, new CollectionModelPojo()) {
    public Component getLazyLoadComponent(String markupId) {
        if(getDefaultModelObject() == null) {
            setDefaultModelObject(myPojoService.readAll());
        }
        return new MyDataGridView(markupId, getDefaultModel()); //ignoring
 casting for simplicity
    }
 }

 That works great for loading the page before the service call is complete.

 But now I need to add a DropDownChoice to change the collection in the data
 grid via Ajax after the page is loaded. Is there anyway to get the
 DataGridView to be replaced with an Ajax indicator (like on page load)
 during an Ajax onchange event for the DropDownChoice? I've added an Ajax
 indicator to the DropDownChoice, but I would like the same behavior I get on
 page load for the AjaxLazyLoadPanel.

 This is what I have for the drop down for starters:

 myDropDownChoice.add(new AjaxFormComponentUpdateBehavior(onchange) {
    protected void onUpdate(AjaxRequestTarget target) {
        if(myDropDownChoice.getModelObject().equals(foo)) {
            myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
        }
        //check other selections
       target.addComponent(myLazyLoadPanel);
    }
 }

 I may be looking at this entirely wrong... Any suggestions?


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



Re: AjaxLazyLoadPanel question

2011-02-04 Thread Pedro Santos
I Matt, try to decorate the AJAX javascript to show/hide the indicator using
an IAjaxCallDecorator

On Thu, Feb 3, 2011 at 5:40 PM, Matt Schmidt mschmid...@gmail.com wrote:

 I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
 including the service call to get the data.

 myLazyLoadPanel = new AjaxLazyLoadPanel(id, new CollectionModelPojo())
 {
public Component getLazyLoadComponent(String markupId) {
if(getDefaultModelObject() == null) {
setDefaultModelObject(myPojoService.readAll());
}
return new MyDataGridView(markupId, getDefaultModel()); //ignoring
 casting for simplicity
}
 }

 That works great for loading the page before the service call is complete.

 But now I need to add a DropDownChoice to change the collection in the data
 grid via Ajax after the page is loaded. Is there anyway to get the
 DataGridView to be replaced with an Ajax indicator (like on page load)
 during an Ajax onchange event for the DropDownChoice? I've added an Ajax
 indicator to the DropDownChoice, but I would like the same behavior I get
 on
 page load for the AjaxLazyLoadPanel.

 This is what I have for the drop down for starters:

 myDropDownChoice.add(new AjaxFormComponentUpdateBehavior(onchange) {
protected void onUpdate(AjaxRequestTarget target) {
if(myDropDownChoice.getModelObject().equals(foo)) {
myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
}
//check other selections
   target.addComponent(myLazyLoadPanel);
}
 }

 I may be looking at this entirely wrong... Any suggestions?




-- 
Pedro Henrique Oliveira dos Santos


AjaxLazyLoadPanel question

2011-02-03 Thread Matt Schmidt
I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel,
including the service call to get the data.

myLazyLoadPanel = new AjaxLazyLoadPanel(id, new CollectionModelPojo()) {
public Component getLazyLoadComponent(String markupId) {
if(getDefaultModelObject() == null) {
setDefaultModelObject(myPojoService.readAll());
}
return new MyDataGridView(markupId, getDefaultModel()); //ignoring
casting for simplicity
}
}

That works great for loading the page before the service call is complete.

But now I need to add a DropDownChoice to change the collection in the data
grid via Ajax after the page is loaded. Is there anyway to get the
DataGridView to be replaced with an Ajax indicator (like on page load)
during an Ajax onchange event for the DropDownChoice? I've added an Ajax
indicator to the DropDownChoice, but I would like the same behavior I get on
page load for the AjaxLazyLoadPanel.

This is what I have for the drop down for starters:

myDropDownChoice.add(new AjaxFormComponentUpdateBehavior(onchange) {
protected void onUpdate(AjaxRequestTarget target) {
if(myDropDownChoice.getModelObject().equals(foo)) {
myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo());
}
//check other selections
   target.addComponent(myLazyLoadPanel);
}
}

I may be looking at this entirely wrong... Any suggestions?


Re: AjaxLazyLoadPanel question

2008-05-11 Thread Johan Compagner
just to make it more clear to you

AjaxLazyLoadPanel == a Panel == Own markup

so what you have is not possible

you can have that code just fine in lazy load panel but the panel must have
its own markup
that is this:

form wicket:id=form
 select wicket:id=pickList
   optionoption 1/option
   optionoption 2/option
 /select
 br /br /
 input wicket:id=asubmit type=button value=Submit/input
   /form



On Mon, May 5, 2008 at 4:51 PM, taygolf [EMAIL PROTECTED] wrote:


 Hey guys,

 I have a question about the lazyloadpanel. I have a modal window. in that
 modal window I have a form with a ListChoice and an ajaxbutton. What I want
 to do is have the entire modal window or the entire form lazyload. the
 ListChoice can be very large sometime and I want do not want the page to
 load until I have the executed the quesry that populates the listchoice and
 saved the values in it.

 I tried to create a div for the ajaxlazyloadpanel and simply put all the
 code for the page in the allp but this did not work.

 What do I need to do to make this happen? I don't know if I am just
 confused
 about how this works or what. I have looked at the example on wicket stuff
 but I am still confused

 Here is the code I want to wrap in an ajaxlazyloadpanel:

 final ListChoice list = createList();

 Form form = new Form(form);
 form.add(list);
 final AjaxButton ajx = new AjaxButton(asubmit,form) {
protected void onSubmit(AjaxRequestTarget target, Form form) {
window.setWindowClosedCallback(new
 ModalWindow.WindowClosedCallback(){
public void onClose(AjaxRequestTarget target) {
targetField.setModelObject(list.getValue());
target.addComponent(targetField);
}
});
window.close(target);
}
 };
 form.add(ajx);
 add(form);

 html
 body
  center
div wicket:id=lazy
form wicket:id=form
  select wicket:id=pickList
optionoption 1/option
optionoption 2/option
  /select
  br /br /
  input wicket:id=asubmit type=button value=Submit/input
/form
/div
  /center
 /body
 /html

 Thanks for the help

 T
 --
 View this message in context:
 http://www.nabble.com/AjaxLazyLoadPanel-question-tp17063419p17063419.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: AjaxLazyLoadPanel question

2008-05-06 Thread taygolf

no one?



taygolf wrote:
 
 Hey guys,
 
 I have a question about the lazyloadpanel. I have a modal window. in that
 modal window I have a form with a ListChoice and an ajaxbutton. What I
 want to do is have the entire modal window or the entire form lazyload.
 the ListChoice can be very large sometime and I want do not want the page
 to load until I have the executed the quesry that populates the listchoice
 and saved the values in it.
 
 I tried to create a div for the ajaxlazyloadpanel and simply put all the
 code for the page in the allp but this did not work.
 
 What do I need to do to make this happen? I don't know if I am just
 confused about how this works or what. I have looked at the example on
 wicket stuff but I am still confused
 
 Here is the code I want to wrap in an ajaxlazyloadpanel:
 
 final ListChoice list = createList();
   
 Form form = new Form(form);
 form.add(list);
 final AjaxButton ajx = new AjaxButton(asubmit,form) {
 protected void onSubmit(AjaxRequestTarget target, Form form) {
 window.setWindowClosedCallback(new
 ModalWindow.WindowClosedCallback(){
   public void onClose(AjaxRequestTarget target) {
 targetField.setModelObject(list.getValue());
   target.addComponent(targetField);
   } 
 });
 window.close(target);
 }
 };
 form.add(ajx);
 add(form);
 
 html
 body
   center
 div wicket:id=lazy
   form wicket:id=form
 select wicket:id=pickList
   optionoption 1/option
   optionoption 2/option
 /select
 br /br /
 input wicket:id=asubmit type=button value=Submit/input
   /form
   /div
   /center
 /body
 /html
 
 Thanks for the help
 
 T
 

-- 
View this message in context: 
http://www.nabble.com/AjaxLazyLoadPanel-question-tp17063419p17082485.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: AjaxLazyLoadPanel question

2008-05-06 Thread taygolf

ok I have this working with IndicatingAjaxFallbackLink for my link instead of
a normal AjaxFallbackLink but I would still rather have the
lazyloadingpanel. Everytime I try to wrap my form in a div for the allp I
get an error saying that I do not have a closing tag for my div but I do.
Any help would be appreciated

Thanks

T


taygolf wrote:
 
 no one?
 
 
 
 taygolf wrote:
 
 Hey guys,
 
 I have a question about the lazyloadpanel. I have a modal window. in that
 modal window I have a form with a ListChoice and an ajaxbutton. What I
 want to do is have the entire modal window or the entire form lazyload.
 the ListChoice can be very large sometime and I want do not want the page
 to load until I have the executed the quesry that populates the
 listchoice and saved the values in it.
 
 I tried to create a div for the ajaxlazyloadpanel and simply put all the
 code for the page in the allp but this did not work.
 
 What do I need to do to make this happen? I don't know if I am just
 confused about how this works or what. I have looked at the example on
 wicket stuff but I am still confused
 
 Here is the code I want to wrap in an ajaxlazyloadpanel:
 
 final ListChoice list = createList();
  
 Form form = new Form(form);
 form.add(list);
 final AjaxButton ajx = new AjaxButton(asubmit,form) {
 protected void onSubmit(AjaxRequestTarget target, Form form) {
 window.setWindowClosedCallback(new
 ModalWindow.WindowClosedCallback(){
  public void onClose(AjaxRequestTarget target) {
 targetField.setModelObject(list.getValue());
  target.addComponent(targetField);
  } 
 });
 window.close(target);
 }
 };
 form.add(ajx);
 add(form);
 
 html
 body
   center
 div wicket:id=lazy
  form wicket:id=form
select wicket:id=pickList
  optionoption 1/option
  optionoption 2/option
/select
br /br /
input wicket:id=asubmit type=button value=Submit/input
  /form
  /div
   /center
 /body
 /html
 
 Thanks for the help
 
 T
 
 
 

-- 
View this message in context: 
http://www.nabble.com/AjaxLazyLoadPanel-question-tp17063419p17083176.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]



AjaxLazyLoadPanel question

2008-05-05 Thread taygolf

Hey guys,

I have a question about the lazyloadpanel. I have a modal window. in that
modal window I have a form with a ListChoice and an ajaxbutton. What I want
to do is have the entire modal window or the entire form lazyload. the
ListChoice can be very large sometime and I want do not want the page to
load until I have the executed the quesry that populates the listchoice and
saved the values in it.

I tried to create a div for the ajaxlazyloadpanel and simply put all the
code for the page in the allp but this did not work.

What do I need to do to make this happen? I don't know if I am just confused
about how this works or what. I have looked at the example on wicket stuff
but I am still confused

Here is the code I want to wrap in an ajaxlazyloadpanel:

final ListChoice list = createList();

Form form = new Form(form);
form.add(list);
final AjaxButton ajx = new AjaxButton(asubmit,form) {
protected void onSubmit(AjaxRequestTarget target, Form form) {
window.setWindowClosedCallback(new
ModalWindow.WindowClosedCallback(){
public void onClose(AjaxRequestTarget target) {
targetField.setModelObject(list.getValue());
target.addComponent(targetField);
} 
});
window.close(target);
}
};
form.add(ajx);
add(form);

html
body
  center
div wicket:id=lazy
form wicket:id=form
  select wicket:id=pickList
optionoption 1/option
optionoption 2/option
  /select
  br /br /
  input wicket:id=asubmit type=button value=Submit/input
/form
/div
  /center
/body
/html

Thanks for the help

T
-- 
View this message in context: 
http://www.nabble.com/AjaxLazyLoadPanel-question-tp17063419p17063419.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]