Re: Model Is Not being Refreshed

2010-08-05 Thread Nivedan Nadaraj
 to update is not part of
 the
   original
   HTML it will not be updated in the ajax response. I see that you
 are
   marking
   the component as visible and enabled. If it isn't visible during
 the
   initial
   rendering then it won't be placed in the HTML. If you mark the
  component
   with
  
  
 
 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag(booleanhttp://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag%28boolean
  )
 
 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag%28boolean%29
 
 
   setOutputMarkupPlaceholderTag(true)  then the invisible component
 will
 
   have
   a placeholder to be updated during the ajax response.
   --
   View this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html
 
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html?by-user=t
 
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
 -
   To unsubscribe, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2313107i=4
   For additional commands, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2313107i=5
  
  
  
  
  
 
 
  --
   View message @
 
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2313107.html
  To start a new topic under Wicket - User, email
  ml-node+1842947-1647783149-293...@n4.nabble.comml-node%2b1842947-1647783149-293...@n4.nabble.com
 ml-node%2b1842947-1647783149-293...@n4.nabble.comml-node%252b1842947-1647783149-293...@n4.nabble.com
 
  To unsubscribe from Wicket - User, click here
 http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=YXZyYWhhbXJAZ21haWwuY29tfDE4NDI5NDd8LTEwNzY0NzQ1ODc=
 .
 
 
 


 --
 []'s
 Avraham Rosenzweig
 avrah...@gmail.com

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2313148.html
 Sent from the Wicket - User mailing list archive at Nabble.com.






Re: Model Is Not being Refreshed

2010-08-04 Thread Nivedan Nadaraj
After a long battle..i have progressed an inch forward!

The StudyModel that implements IModel seemed to have the problem.
I did not set the object in setObject...after modifying it in the following
way..the Refresh button works.


public Object getObject() {
return this;
}

public void setObject(Object object) {
StudyModel model = (StudyModel)object;
this.studyVO = model.getStudyVO();

}

But I am not there as yet...now when I lookup and then click on an item from
the list, the form again is empty..meaning the model is not being updated.

So basically.
1.Search  Panel - Search items
2.SearchResults - onClick
3.Details- displayed correctly..., now I click cancel, tht hides the details
panel
4. I click on New/Refresh button on Search Panel
5. A new details page is loaded - the effect of modifying setObject() in the
Model
6.I click on cancel on details panel
7. And perform steps 1 to 2
8. An empty details panel is displayed...

If i can get a single thread of clue..will fix this and cement it 
Obviously I dont have a grip over Models..

Cheers
niv




On Wed, Aug 4, 2010 at 11:12 AM, Nivedan Nadaraj shravann...@gmail.comwrote:

 Hi


 After I added setOutputMarkupPlaceHolderTag(true) to the details panel, the
 Ajax function works and I can see the details panel. (Which I could not
 earlier)
 However, the problem still remains as in the model has not been updated and
 still refers to the stale/old one.

 @avrahmr
 I used the setModel but I get a wicket runtime exception.

 Thanks for your thoughts.
 Niv


 On Wed, Aug 4, 2010 at 10:25 AM, Nivedan Nadaraj shravann...@gmail.comwrote:

 Hi,

 I have attached the code as a text file. I have removed lines that don't
 really make any contribution to the problem at hand after carefully
 examining it.

 Appreciate your time if you could see any issues please let me know.

 Basically the code has the Form objects I used, and the different panels
 involved with it.

 Many thanks
 Niv


 On Tue, Aug 3, 2010 at 10:30 PM, Nivedan Nadaraj 
 shravann...@gmail.comwrote:

 Avraham and Matt,

 Thanks for the points. I will have a look at it tomorrow and post the
 code if I still haven't resolved. I don't have the code on me at the moment.
 Reg
 Niv




 On Tue, Aug 3, 2010 at 9:41 PM, mwilber matt.wil...@gmail.com wrote:


 Again without seeing more of the code some of this is guessing.

 If the component that you are trying to update is not part of the
 original
 HTML it will not be updated in the ajax response. I see that you are
 marking
 the component as visible and enabled. If it isn't visible during the
 initial
 rendering then it won't be placed in the HTML. If you mark the component
 with

 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag(boolean)http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag%28boolean%29
 setOutputMarkupPlaceholderTag(true)  then the invisible component will
 have
 a placeholder to be updated during the ajax response.
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

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







Re: Model Is Not being Refreshed

2010-08-04 Thread avrahamr

I think attachments are not good in the list, so we didn't get your code.

I'm not following the way you are mixing Model with the Object and I
recommend reading:
https://cwiki.apache.org/WICKET/working-with-wicket-models.html

The StudyModel should be something like this:
public class StudyModel implements IModel {

private Study study;
 public Object getObject() {
return study;
 }

public void setObject(Object object) {
this.study =  (Study)study;
 }
   ...

But if that's the case, I don't see a reason not to use the concrete Model
class: new Model(study)

Also, I see from your examples you are using Wicket 1.3.x, is that right?

With Wicket 1.4.x and generics it all becomes much more clear.

On Wed, Aug 4, 2010 at 11:38 AM, nivs [via Apache Wicket] 
ml-node+2313107-368287748-293...@n4.nabble.comml-node%2b2313107-368287748-293...@n4.nabble.com
 wrote:

 After a long battle..i have progressed an inch forward!

 The StudyModel that implements IModel seemed to have the problem.
 I did not set the object in setObject...after modifying it in the following

 way..the Refresh button works.


 public Object getObject() {
 return this;
 }

 public void setObject(Object object) {
 StudyModel model = (StudyModel)object;
 this.studyVO = model.getStudyVO();

 }

 But I am not there as yet...now when I lookup and then click on an item
 from
 the list, the form again is empty..meaning the model is not being updated.

 So basically.
 1.Search  Panel - Search items
 2.SearchResults - onClick
 3.Details- displayed correctly..., now I click cancel, tht hides the
 details
 panel
 4. I click on New/Refresh button on Search Panel
 5. A new details page is loaded - the effect of modifying setObject() in
 the
 Model
 6.I click on cancel on details panel
 7. And perform steps 1 to 2
 8. An empty details panel is displayed...

 If i can get a single thread of clue..will fix this and cement it 
 Obviously I dont have a grip over Models..

 Cheers
 niv




 On Wed, Aug 4, 2010 at 11:12 AM, Nivedan Nadaraj [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=2313107i=0wrote:


  Hi
 
 
  After I added setOutputMarkupPlaceHolderTag(true) to the details panel,
 the
  Ajax function works and I can see the details panel. (Which I could not
  earlier)
  However, the problem still remains as in the model has not been updated
 and
  still refers to the stale/old one.
 
  @avrahmr
  I used the setModel but I get a wicket runtime exception.
 
  Thanks for your thoughts.
  Niv
 
 
  On Wed, Aug 4, 2010 at 10:25 AM, Nivedan Nadaraj [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2313107i=1wrote:

 
  Hi,
 
  I have attached the code as a text file. I have removed lines that don't

  really make any contribution to the problem at hand after carefully
  examining it.
 
  Appreciate your time if you could see any issues please let me know.
 
  Basically the code has the Form objects I used, and the different panels

  involved with it.
 
  Many thanks
  Niv
 
 
  On Tue, Aug 3, 2010 at 10:30 PM, Nivedan Nadaraj [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2313107i=2wrote:

 
  Avraham and Matt,
 
  Thanks for the points. I will have a look at it tomorrow and post the
  code if I still haven't resolved. I don't have the code on me at the
 moment.
  Reg
  Niv
 
 
 
 
  On Tue, Aug 3, 2010 at 9:41 PM, mwilber [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2313107i=3
 wrote:
 
 
  Again without seeing more of the code some of this is guessing.
 
  If the component that you are trying to update is not part of the
  original
  HTML it will not be updated in the ajax response. I see that you are
  marking
  the component as visible and enabled. If it isn't visible during the
  initial
  rendering then it won't be placed in the HTML. If you mark the
 component
  with
 
 
 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag(boolean
 )
 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag%28boolean%29

  setOutputMarkupPlaceholderTag(true)  then the invisible component will

  have
  a placeholder to be updated during the ajax response.
  --
  View this message in context:
 
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.htmlhttp://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html?by-user=t
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2313107i=4
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2313107i=5
 
 
 
 
 


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2313107.html
 To start a new topic

Re: Model Is Not being Refreshed

2010-08-04 Thread Nivedan Nadaraj
 this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html
 
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html?by-user=t
 
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
 -
   To unsubscribe, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2313107i=4
   For additional commands, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2313107i=5
  
  
  
  
  
 
 
  --
   View message @
 
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2313107.html
  To start a new topic under Wicket - User, email
  ml-node+1842947-1647783149-293...@n4.nabble.comml-node%2b1842947-1647783149-293...@n4.nabble.com
 ml-node%2b1842947-1647783149-293...@n4.nabble.comml-node%252b1842947-1647783149-293...@n4.nabble.com
 
  To unsubscribe from Wicket - User, click here
 http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=YXZyYWhhbXJAZ21haWwuY29tfDE4NDI5NDd8LTEwNzY0NzQ1ODc=
 .
 
 
 


 --
 []'s
 Avraham Rosenzweig
 avrah...@gmail.com

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2313148.html
 Sent from the Wicket - User mailing list archive at Nabble.com.



Re: Model Is Not being Refreshed

2010-08-04 Thread Nivedan Nadaraj
/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag%28boolean%29
 
 
   setOutputMarkupPlaceholderTag(true)  then the invisible component
 will
 
   have
   a placeholder to be updated during the ajax response.
   --
   View this message in context:
  
 
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html
 
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html?by-user=t
 
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
 -
   To unsubscribe, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2313107i=4
   For additional commands, e-mail: [hidden email]
 http://user/SendEmail.jtp?type=nodenode=2313107i=5
  
  
  
  
  
 
 
  --
   View message @
 
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2313107.html
  To start a new topic under Wicket - User, email
  ml-node+1842947-1647783149-293...@n4.nabble.comml-node%2b1842947-1647783149-293...@n4.nabble.com
 ml-node%2b1842947-1647783149-293...@n4.nabble.comml-node%252b1842947-1647783149-293...@n4.nabble.com
 
  To unsubscribe from Wicket - User, click here
 http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=YXZyYWhhbXJAZ21haWwuY29tfDE4NDI5NDd8LTEwNzY0NzQ1ODc=
 .
 
 
 


 --
 []'s
 Avraham Rosenzweig
 avrah...@gmail.com

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2313148.html
 Sent from the Wicket - User mailing list archive at Nabble.com.



/*

 The Form object that is used to capture input from the Search panel and the 
events such as New, Reset and Search.
 Added the Refresh button which is the same as new only thatI am using it to 
test with Ajax to resolve the problem*/ 

public class SearchStudyForm extends FormStudy{

TextFieldString studyIdTxtFld =new 
TextFieldString(Constants.STUDY_SEARCH_KEY);
//rest of the fields
Button searchButton;
Button resetButton;
ListStudyStatus  studyStatusList;

/* The new and Refresh button*/
Button newButton;
AjaxButton refresh;

/* Constructor */
public SearchStudyForm(String id, Study study, String panelId, 
ListStudyStatus  studyStatusList, final Details detailsPanel ){

super(id, new CompoundPropertyModelStudy(study));

this.studyStatusList = studyStatusList;

refresh = new AjaxButton(refresh) {

@Override
protected void onSubmit(AjaxRequestTarget target, 
Form? form) {
detailsPanel.getStudyForm().setModelObject(new 
StudyModel());
detailsPanel.setVisible(true);
onNew(new Study());
target.addComponent(detailsPanel);
}
};


searchButton  = new Button(Constants.SEARCH, new 
StringResourceModel(page.search, this, null))
{
public void onSubmit()
{

onSearch((Study) getForm().getModelObject());
}
};

newButton =  new Button(Constants.NEW, new 
StringResourceModel(page.new, this, null))
{
public void onSubmit()
{

onNew(new Study());
}
};

resetButton = new Button(reset, new 
StringResourceModel(page.form.reset.button, this, null) ){
public void onSubmit(){
clearInput();
updateFormComponentModels();
}
};

addComponentsToForm();
}

protected void onSearch(Study Study){
}

protected void onNew(Study study){}

protected void onReset(){}
}

/* The Model that will be used by Details */

@SuppressWarnings(serial)
public class StudyModel implements IModel{

private Study study;
private SetString lmcAvailableApps = new HashSetString();
private SetString lmcSelectedApps = new HashSetString();

public StudyModel(){
study = new Study();
}
public Study getStudy() {
return study;
}

public void setStudy(Study study) {
this.study = study;
}

public SetString getLmcAvailableApps() {
return lmcAvailableApps

Model Is Not being Refreshed

2010-08-03 Thread Nivedan Nadaraj
Hi

Can someone point me the right direction.

I have a search panel that does a look up and renders a resultsPanel. I
don't use detachable model here and used PageableListView
On the resultsPanel,onClick, I use the hibernate entity and pass it as a
model to the DetailsPanel. The detailsPanel renders it right no issue here.

Now When I hit the New button(acutally after I click cancel button on
Details, the details panel is set to visible=false).  on the search, I
expect to see a fresh page in details panel, but
the details panel uses the old values I selected and renders it.

This is what I do on onNew submit button.

I reset the model and set it to the form which should call
setDefaultObjectModel.

SearchPanel

 onNew(){
studyModel = new StudyModel();
studyModel.setStudy(new Study());
detailsPanel.getStudyForm().setModelObject(studyModel);
detailsPanel.setVisible(true);
}

After onNew is executed, I don't see the model being updated. A bit lost
here, any ideas?

Thanks again
Reg
Niv


Re: Model Is Not being Refreshed

2010-08-03 Thread Niv

Just wanted to add that this issue is not exactly the same as i posted
earlier but related in a way. But it is a separate issue. - I am making sure
it is not  re-post. Thank you

http://apache-wicket.1842946.n4.nabble.com/How-to-Update-contents-of-a-child-component-td2307756.html#a2307756

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311460.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Model Is Not being Refreshed

2010-08-03 Thread vov

Create AjaxButton for refreshing your data:
new AjaxButton(refresh)
{
onSubmit(AjaxRequestTarget target)
{
 onNew();
 targer.addComponent(detailsPanel);
}
}
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311537.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Model Is Not being Refreshed

2010-08-03 Thread Nivedan Nadaraj
Thanks for the response. It still does not work.

I added the ajax button on the SearchForm that has the New,Cancel and I
added this Refresh button just to test.

I added setOutputMarkupId(true) to the detailsPanle and then  in SearchForm
that extends Form added the AjaxButton

protected void onSubmit(AjaxRequestTarget target, Form? form) {
detailsPanel.getStudyForm().setDefaultModelObject(new
StudyModel());

detailsPanel.getStudyForm().getStudyIdTxtFld().setEnabled(false);

detailsPanel.getStudyForm().getStudyNameTxtFld().setEnabled(true);
detailsPanel.setVisible(true);
target.addComponent(detailsPanel);
}

I debugged it, and onSubmit does get invoked upto the last line
target.addComponent(), the detailsPanel is not being made visible. So I
cannot see if it has refreshed it!

Thanks again,
Niv


On Tue, Aug 3, 2010 at 5:23 PM, vov vov...@mail.ru wrote:


 Create AjaxButton for refreshing your data:
 new AjaxButton(refresh)
 {
onSubmit(AjaxRequestTarget target)
{
 onNew();
 targer.addComponent(detailsPanel);
}
 }
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311537.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

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




Re: Model Is Not being Refreshed

2010-08-03 Thread avrahamr

Without seeing the code I can't be of much help, but I think the line:

 detailsPanel.getStudyForm().setModelObject(studyModel);

Should be:

 detailsPanel.getStudyForm().setModel(studyModel);

You could also keep a reference to the studyModel when you construct the
Form and just call:

 studyModel.setStudy();

But, it really depends on how you implement the StudyModel and how you
access it.

Cheers,
   Avraham

On Tue, Aug 3, 2010 at 11:17 AM, nivs [via Apache Wicket] 
ml-node+2311457-311556210-293...@n4.nabble.comml-node%2b2311457-311556210-293...@n4.nabble.com
 wrote:

 Hi

 Can someone point me the right direction.

 I have a search panel that does a look up and renders a resultsPanel. I
 don't use detachable model here and used PageableListView
 On the resultsPanel,onClick, I use the hibernate entity and pass it as a
 model to the DetailsPanel. The detailsPanel renders it right no issue here.


 Now When I hit the New button(acutally after I click cancel button on
 Details, the details panel is set to visible=false).  on the search, I
 expect to see a fresh page in details panel, but
 the details panel uses the old values I selected and renders it.

 This is what I do on onNew submit button.

 I reset the model and set it to the form which should call
 setDefaultObjectModel.

 SearchPanel

  onNew(){
 studyModel = new StudyModel();
 studyModel.setStudy(new Study());
 detailsPanel.getStudyForm().setModelObject(studyModel);
 detailsPanel.setVisible(true);
 }

 After onNew is executed, I don't see the model being updated. A bit lost
 here, any ideas?

 Thanks again
 Reg
 Niv


 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311457.html
 To start a new topic under Wicket - User, email
 ml-node+1842947-1647783149-293...@n4.nabble.comml-node%2b1842947-1647783149-293...@n4.nabble.com
 To unsubscribe from Wicket - User, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=YXZyYWhhbXJAZ21haWwuY29tfDE4NDI5NDd8LTEwNzY0NzQ1ODc=.





-- 
[]'s
Avraham Rosenzweig
avrah...@gmail.com

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311658.html
Sent from the Wicket - User mailing list archive at Nabble.com.


Re: Model Is Not being Refreshed

2010-08-03 Thread mwilber

Again without seeing more of the code some of this is guessing.

If the component that you are trying to update is not part of the original
HTML it will not be updated in the ajax response. I see that you are marking
the component as visible and enabled. If it isn't visible during the initial
rendering then it won't be placed in the HTML. If you mark the component
with 
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag(boolean)
setOutputMarkupPlaceholderTag(true)  then the invisible component will have
a placeholder to be updated during the ajax response.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Model Is Not being Refreshed

2010-08-03 Thread Nivedan Nadaraj
Avraham and Matt,

Thanks for the points. I will have a look at it tomorrow and post the code
if I still haven't resolved. I don't have the code on me at the moment.
Reg
Niv



On Tue, Aug 3, 2010 at 9:41 PM, mwilber matt.wil...@gmail.com wrote:


 Again without seeing more of the code some of this is guessing.

 If the component that you are trying to update is not part of the
 original
 HTML it will not be updated in the ajax response. I see that you are
 marking
 the component as visible and enabled. If it isn't visible during the
 initial
 rendering then it won't be placed in the HTML. If you mark the component
 with

 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag(boolean)http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag%28boolean%29
 setOutputMarkupPlaceholderTag(true)  then the invisible component will have
 a placeholder to be updated during the ajax response.
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

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




Re: Model Is Not being Refreshed

2010-08-03 Thread Nivedan Nadaraj
Hi,

I have attached the code as a text file. I have removed lines that don't
really make any contribution to the problem at hand after carefully
examining it.

Appreciate your time if you could see any issues please let me know.

Basically the code has the Form objects I used, and the different panels
involved with it.

Many thanks
Niv

On Tue, Aug 3, 2010 at 10:30 PM, Nivedan Nadaraj shravann...@gmail.comwrote:

 Avraham and Matt,

 Thanks for the points. I will have a look at it tomorrow and post the code
 if I still haven't resolved. I don't have the code on me at the moment.
 Reg
 Niv




 On Tue, Aug 3, 2010 at 9:41 PM, mwilber matt.wil...@gmail.com wrote:


 Again without seeing more of the code some of this is guessing.

 If the component that you are trying to update is not part of the
 original
 HTML it will not be updated in the ajax response. I see that you are
 marking
 the component as visible and enabled. If it isn't visible during the
 initial
 rendering then it won't be placed in the HTML. If you mark the component
 with

 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag(boolean)http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag%28boolean%29
 setOutputMarkupPlaceholderTag(true)  then the invisible component will
 have
 a placeholder to be updated during the ajax response.
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 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: Model Is Not being Refreshed

2010-08-03 Thread Nivedan Nadaraj
Hi


After I added setOutputMarkupPlaceHolderTag(true) to the details panel, the
Ajax function works and I can see the details panel. (Which I could not
earlier)
However, the problem still remains as in the model has not been updated and
still refers to the stale/old one.

@avrahmr
I used the setModel but I get a wicket runtime exception.

Thanks for your thoughts.
Niv

On Wed, Aug 4, 2010 at 10:25 AM, Nivedan Nadaraj shravann...@gmail.comwrote:

 Hi,

 I have attached the code as a text file. I have removed lines that don't
 really make any contribution to the problem at hand after carefully
 examining it.

 Appreciate your time if you could see any issues please let me know.

 Basically the code has the Form objects I used, and the different panels
 involved with it.

 Many thanks
 Niv


 On Tue, Aug 3, 2010 at 10:30 PM, Nivedan Nadaraj shravann...@gmail.comwrote:

 Avraham and Matt,

 Thanks for the points. I will have a look at it tomorrow and post the code
 if I still haven't resolved. I don't have the code on me at the moment.
 Reg
 Niv




 On Tue, Aug 3, 2010 at 9:41 PM, mwilber matt.wil...@gmail.com wrote:


 Again without seeing more of the code some of this is guessing.

 If the component that you are trying to update is not part of the
 original
 HTML it will not be updated in the ajax response. I see that you are
 marking
 the component as visible and enabled. If it isn't visible during the
 initial
 rendering then it won't be placed in the HTML. If you mark the component
 with

 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag(boolean)http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag%28boolean%29
 setOutputMarkupPlaceholderTag(true)  then the invisible component will
 have
 a placeholder to be updated during the ajax response.
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

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