RE: How to fail validation if ListMultipleChoice is empty

2011-05-02 Thread Coleman, Chris
That was my plan exactly but I didn't know of a way to tell which button was 
doing the form submission until now!

Thanks for that Form#findSubmittingButton works beautifully!

I don't even think it's a hack as that validation should only really a problem 
if the user is submitting the form, not when they are merely adding items to 
the list.

We are using models for the storage of which items are in the list when the 
user clicks OK.
We are also using models to keep track of which items the user has selected 
(multiple selection is turned on).

The form is a classic 'tranfer' setup - with 2 list boxes and 2 buttons 
add/remove. The user can transfer items from one list to the other.

-Original Message-
From: Clint Checketts [mailto:checke...@gmail.com] 
Sent: Monday, 2 May 2011 3:40 PM
To: users@wicket.apache.org
Subject: Re: How to fail validation if ListMultipleChoice is empty

Good catch on AjaxSubmitButton being deprecated, I guess an IDe would have
made that obvious ;)

I do have to say using the getChoices over a proper model may give you more
work than needed in updating the underlying model objects (maybe consider
overriding the getConvertedInput to return getChoices)

It sounds like you have different buttons for adding and submitting. Correct
me if this is too hackish, but you could change the validator to check if
the addBtn is the submitting button, and ignore the validation in that case:

  form.add(new AbstractFormValidator()
  {
public FormComponent[] getDependentFormComponents()
{
  return null;
}

public void validate(Form? form)
{
  List sets = targettedSetsList.getChoices();

  if ((*!addBtn.equals(form.findSubmittingButton()) * sets.size() == 0
) {
targettedSetsList.error((IValidationError)new
  ValidationError().addMessageKey(error.noSetSpecified));
  }
}
  });


-Clint

On Mon, May 2, 2011 at 12:27 AM, Coleman, Chris 
chris.cole...@thalesgroup.com.au wrote:

 According to the doco the default form processing behavior is executed for
 AjaxButton and AjaxSubmitButton (in fact AjaxSubmitButton appears to be
 deprecated - behaves the same as AjaxButton anyway?).

 I am using AjaxButton.

 I actually don't care about the selections but rather, the entries that the
 user has added to the list (whether selected or not) which is why I call
 getChoices() rather than getConvertedInput()

 The button code is:

  AjaxButton addBtn = new AjaxButton(add) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
  update(target, selectedAvailableSets, availableSetsList,
 targettedSetsList);
}

@Override
protected void onError(AjaxRequestTarget target, Form form) {
}
  };

  addBtn.setOutputMarkupId(true);

  add(addBtn);


 -Original Message-
 From: Clint Checketts [mailto:checke...@gmail.com]
 Sent: Monday, 2 May 2011 2:28 PM
 To: users@wicket.apache.org
 Subject: Re: How to fail validation if ListMultipleChoice is empty

 You are correct that the Form's validation should only fire when submitting
 the form. When an individual element is updated via ajax (as in an
 AjaxFormComponentUpdatingBehavior) then just the processing and validations
 steps are fired for the individual form component.

 It makes me wonder if you are using an AjaxSubmitButton instead of just an
 AjaxButton. (Or similarly an AjaxSubmitLink instead of an  AjaxLink) Mind
 including your button's code?

 Also, why are you calling getChoices() instead of getConvertedInput() in
 the
 validator? Choices represent the possible selection options, the converted
 input is the value of the selected choices.

 -Clint

 On Sun, May 1, 2011 at 9:25 PM, Coleman, Chris 
 chris.cole...@thalesgroup.com.au wrote:

  Yes, it's all via AJAX.
 
  In the last few minutes I've tried a different approach and it works ok
 but
  it introduces another problem:
 
   form.add(new AbstractFormValidator()
   {
 public FormComponent[] getDependentFormComponents()
 {
   return null;
 }
 
 public void validate(Form? form)
 {
   List sets = targettedSetsList.getChoices();
 
   if ( sets.size() == 0 ) {
 targettedSetsList.error((IValidationError)new
  ValidationError().addMessageKey(error.noSetSpecified));
   }
 }
   });
 
  This accurately detects when nothing is in the list and displays an error
  message but once emptied we can not add new elements to the list because
 the
  validation is also executed when the 'add' button is pressed. The
 validation
  fails because the list is empty so the 'add' fails, making it impossible
 to
  add new elements when the list is empty.
 
  I thought validation would only occur when the user submits the form but
 it
  appears to be fired off whenever the user presses the 'add' button. Is
 this
  to be expected?
 
 
  -Original Message-
  From: Clint Checketts [mailto:checke...@gmail.com]
  Sent: Monday, 2 May 2011 12:10 PM
  To: users@wicket.apache.org

How to fail validation if ListMultipleChoice is empty

2011-05-01 Thread Coleman, Chris
We have an app that allows people to add elements to a ListMultipleChoice by 
pressing on a button. We want the form to fail validation if the 
ListMultipleChoice contains no elements.

I've tried this:

  targettedSetsList.add(new IValidator()
  {
public void validate(IValidatable validatable) {
  // Always contains no items - strange
  Collection list = (Collection)validatable.getValue();

  if ( list.size() == 0 ) {
ValidationError ve = new ValidationError();
ve.setMessage(No sets have been specified for deployment);
validatable.error(ve);
  }
}
  });

but at validation the list.size() is always 0 even if the user has added 
elements. Am I doing it the right way? Is there a better way?



DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--



RE: How to fail validation if ListMultipleChoice is empty

2011-05-01 Thread Coleman, Chris
Yes, it's all via AJAX.

In the last few minutes I've tried a different approach and it works ok but it 
introduces another problem:

  form.add(new AbstractFormValidator()
  {
public FormComponent[] getDependentFormComponents()
{
  return null;
}

public void validate(Form? form)
{
  List sets = targettedSetsList.getChoices();

  if ( sets.size() == 0 ) {
targettedSetsList.error((IValidationError)new 
ValidationError().addMessageKey(error.noSetSpecified));
  }  
}
  });

This accurately detects when nothing is in the list and displays an error 
message but once emptied we can not add new elements to the list because the 
validation is also executed when the 'add' button is pressed. The validation 
fails because the list is empty so the 'add' fails, making it impossible to add 
new elements when the list is empty.

I thought validation would only occur when the user submits the form but it 
appears to be fired off whenever the user presses the 'add' button. Is this to 
be expected?


-Original Message-
From: Clint Checketts [mailto:checke...@gmail.com] 
Sent: Monday, 2 May 2011 12:10 PM
To: users@wicket.apache.org
Subject: Re: How to fail validation if ListMultipleChoice is empty

Lets see the code about 'adding elements by pressing on a button'.  The
'getValue()' method is returning the value from the list box's HTTP
submitted values, if the add button is submitting values via ajax or some
other means then it may need a different approach.

-Clint

On Sun, May 1, 2011 at 8:15 PM, Coleman, Chris 
chris.cole...@thalesgroup.com.au wrote:

 We have an app that allows people to add elements to a ListMultipleChoice
 by pressing on a button. We want the form to fail validation if the
 ListMultipleChoice contains no elements.

 I've tried this:

  targettedSetsList.add(new IValidator()
  {
public void validate(IValidatable validatable) {
  // Always contains no items - strange
  Collection list = (Collection)validatable.getValue();

  if ( list.size() == 0 ) {
ValidationError ve = new ValidationError();
ve.setMessage(No sets have been specified for deployment);
validatable.error(ve);
  }
}
  });

 but at validation the list.size() is always 0 even if the user has added
 elements. Am I doing it the right way? Is there a better way?




 DISCLAIMER:---
 This e-mail transmission and any documents, files and previous e-mail
 messages
 attached to it are private and confidential. They may contain proprietary
 or copyright
 material or information that is subject to legal professional privilege.
 They are for
 the use of the intended recipient only.  Any unauthorised viewing, use,
 disclosure,
 copying, alteration, storage or distribution of, or reliance on, this
 message is
 strictly prohibited. No part may be reproduced, adapted or transmitted
 without the
 written permission of the owner. If you have received this transmission in
 error, or
 are not an authorised recipient, please immediately notify the sender by
 return email,
 delete this message and all copies from your e-mail system, and destroy any
 printed
 copies. Receipt by anyone other than the intended recipient should not be
 deemed a
 waiver of any privilege or protection. Thales Australia does not warrant or
 represent
 that this e-mail or any documents, files and previous e-mail messages
 attached are
 error or virus free.

 --





DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--


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

RE: How to fail validation if ListMultipleChoice is empty

2011-05-01 Thread Coleman, Chris
According to the doco the default form processing behavior is executed for 
AjaxButton and AjaxSubmitButton (in fact AjaxSubmitButton appears to be 
deprecated - behaves the same as AjaxButton anyway?).

I am using AjaxButton.

I actually don't care about the selections but rather, the entries that the 
user has added to the list (whether selected or not) which is why I call 
getChoices() rather than getConvertedInput()

The button code is:

  AjaxButton addBtn = new AjaxButton(add) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
  update(target, selectedAvailableSets, availableSetsList, 
targettedSetsList);
}

@Override
protected void onError(AjaxRequestTarget target, Form form) {
}
  };

  addBtn.setOutputMarkupId(true);

  add(addBtn);


-Original Message-
From: Clint Checketts [mailto:checke...@gmail.com] 
Sent: Monday, 2 May 2011 2:28 PM
To: users@wicket.apache.org
Subject: Re: How to fail validation if ListMultipleChoice is empty

You are correct that the Form's validation should only fire when submitting
the form. When an individual element is updated via ajax (as in an
AjaxFormComponentUpdatingBehavior) then just the processing and validations
steps are fired for the individual form component.

It makes me wonder if you are using an AjaxSubmitButton instead of just an
AjaxButton. (Or similarly an AjaxSubmitLink instead of an  AjaxLink) Mind
including your button's code?

Also, why are you calling getChoices() instead of getConvertedInput() in the
validator? Choices represent the possible selection options, the converted
input is the value of the selected choices.

-Clint

On Sun, May 1, 2011 at 9:25 PM, Coleman, Chris 
chris.cole...@thalesgroup.com.au wrote:

 Yes, it's all via AJAX.

 In the last few minutes I've tried a different approach and it works ok but
 it introduces another problem:

  form.add(new AbstractFormValidator()
  {
public FormComponent[] getDependentFormComponents()
{
  return null;
}

public void validate(Form? form)
{
  List sets = targettedSetsList.getChoices();

  if ( sets.size() == 0 ) {
targettedSetsList.error((IValidationError)new
 ValidationError().addMessageKey(error.noSetSpecified));
  }
}
  });

 This accurately detects when nothing is in the list and displays an error
 message but once emptied we can not add new elements to the list because the
 validation is also executed when the 'add' button is pressed. The validation
 fails because the list is empty so the 'add' fails, making it impossible to
 add new elements when the list is empty.

 I thought validation would only occur when the user submits the form but it
 appears to be fired off whenever the user presses the 'add' button. Is this
 to be expected?


 -Original Message-
 From: Clint Checketts [mailto:checke...@gmail.com]
 Sent: Monday, 2 May 2011 12:10 PM
 To: users@wicket.apache.org
 Subject: Re: How to fail validation if ListMultipleChoice is empty

 Lets see the code about 'adding elements by pressing on a button'.  The
 'getValue()' method is returning the value from the list box's HTTP
 submitted values, if the add button is submitting values via ajax or some
 other means then it may need a different approach.

 -Clint

 On Sun, May 1, 2011 at 8:15 PM, Coleman, Chris 
 chris.cole...@thalesgroup.com.au wrote:

  We have an app that allows people to add elements to a ListMultipleChoice
  by pressing on a button. We want the form to fail validation if the
  ListMultipleChoice contains no elements.
 
  I've tried this:
 
   targettedSetsList.add(new IValidator()
   {
 public void validate(IValidatable validatable) {
   // Always contains no items - strange
   Collection list = (Collection)validatable.getValue();
 
   if ( list.size() == 0 ) {
 ValidationError ve = new ValidationError();
 ve.setMessage(No sets have been specified for deployment);
 validatable.error(ve);
   }
 }
   });
 
  but at validation the list.size() is always 0 even if the user has added
  elements. Am I doing it the right way? Is there a better way?
 
 
 
 
 
 DISCLAIMER:---
  This e-mail transmission and any documents, files and previous e-mail
  messages
  attached to it are private and confidential. They may contain proprietary
  or copyright
  material or information that is subject to legal professional privilege.
  They are for
  the use of the intended recipient only.  Any unauthorised viewing, use,
  disclosure,
  copying, alteration, storage or distribution of, or reliance on, this
  message is
  strictly prohibited. No part may be reproduced, adapted or transmitted
  without the
  written permission of the owner. If you have received this transmission
 in
  error, or
  are not an authorised recipient, please immediately notify the sender by
  return email,
  delete this message and all

Best way to periodically refresh an inmethod DataGrid?

2011-03-24 Thread Coleman, Chris
We've got a wicket app with an inmethod DataGrid and it displays fine and we 
use an AjaxSelfUpdatingTimerBehaviour to update the grid every 5 seconds. That 
part works fine - as data changes in the database the changes are reflected in 
the table in the browser

However, if we select an item the selection dissappears when the very next 
refresh occurs. How do we refresh the DataGrid in such a way that it remembers 
its selected item after a refresh?



DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--



Calendar bug on IE8 (also occurred on IE6 7 IE7)

2011-03-24 Thread Coleman, Chris
IE seems to have a problem when executing the following line when bringing up a 
form within a modal dialog that contains a DateTimeField. Does anyone know why 
this line would cause such an error and if there is a simple work around. 
Apparently it works if the Form wraps the ModalWindow but not the way we have 
it where the form is inside the Modal content but change that architecture is a 
problem for us now.

   /**
   * Renders the calendar after it has been configured. The render() method 
has a specific call chain that will execute
   * when the method is called: renderHeader, renderBody, renderFooter.
   * Refer to the documentation for those methods for information on
   * individual render tasks.
   * @method render
   */
   render : function() {
  this.beforeRenderEvent.fire();

  // Find starting day of the current month
  var workingDate = 
DateMath.findMonthStart(this.cfg.getProperty(DEF_CFG.PAGEDATE.key));

  this.resetRenderers();
  this.cellDates.length = 0;

  Event.purgeElement(this.oDomContainer, true);

  var html = [];

  html[html.length] = 'table cellSpacing=0 class=' + 
this.Style.CSS_CALENDAR + ' y' + workingDate.getFullYear() + ' id=' + this.id 
+ '';
  html = this.renderHeader(html);
  html = this.renderBody(workingDate, html);
  html = this.renderFooter(html);
  html[html.length] = '/table';

 this.oDomContainer.innerHTML = html.join(\n);     gives 
calendar.js.line 3225 Unknown Error

  this.applyListeners();
  this.cells = this.oDomContainer.getElementsByTagName(td);

  this.cfg.refireEvent(DEF_CFG.TITLE.key);
  this.cfg.refireEvent(DEF_CFG.CLOSE.key);
  this.cfg.refireEvent(DEF_CFG.IFRAME.key);

  this.renderEvent.fire();
   },



DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--



RE: [VOTE] WICKET-3218 - Component#onInitialize is broken for Pages

2011-03-10 Thread Coleman, Chris
+1 for the approach you mention where onInitialize is called from the framework 
and not as a surprise side effect of calling page#add().

From: Maarten Billemont [mailto:lhun...@gmail.com] 

On 10 Mar 2011, at 00:42, Igor Vaynberg wrote:
 i am +0 for refactoring the code so that oninitialize() cascade is not
 started from page#add() but from somewhere before page#onconfigure().
 this way oninitialize() is safe to override in pages because it will
 not be invoked from page's constructor but from some framework code at
 a later time.

Then I think that's the only actual solution that has positive votes.  Without 
any further feedback, can we agree to leave constructors as they are, make 
onInitialize overridable and do it this way?
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--


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



Wicket thinks setOutputMarkupId property is not set to true

2011-03-10 Thread Coleman, Chris
I get this error even though I set output markup ID to true on the component 
that is being replaced (and the one that is replacing it):


Root cause:

java.lang.IllegalArgumentException: cannot update component that does not have 
setOutputMarkupId property set to true. Component: [PackageDetailsPanel 
[Component id = panel]]
 at org.apache.wicket.ajax.AjaxRequestTarget.add(AjaxRequestTarget.java:375)
 at 
org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:356)
Any idea how this can happen?



DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--



RE: Wicket thinks setOutputMarkupId property is not set to true

2011-03-10 Thread Coleman, Chris
I should add that this is on 1.5-rc2. Previously on 1.4.16 the exact same code 
(except for package renames) worked fine.

Chris

-Original Message-
From: Coleman, Chris [mailto:chris.cole...@thalesgroup.com.au] 
Sent: Friday, 11 March 2011 4:02 PM
To: users@wicket.apache.org
Subject: Wicket thinks setOutputMarkupId property is not set to true

I get this error even though I set output markup ID to true on the component 
that is being replaced (and the one that is replacing it):


Root cause:

java.lang.IllegalArgumentException: cannot update component that does not have 
setOutputMarkupId property set to true. Component: [PackageDetailsPanel 
[Component id = panel]]
 at org.apache.wicket.ajax.AjaxRequestTarget.add(AjaxRequestTarget.java:375)
 at 
org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:356)
Any idea how this can happen?



DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--




DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--


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



RE: Wicket thinks setOutputMarkupId property is not set to true

2011-03-10 Thread Coleman, Chris
Hmmm, it is in a tab panel so it could be the scenario you mention. I'll check 
out that theory.

Chris

-Original Message-
From: Bertrand Guay-Paquet [mailto:ber...@step.polymtl.ca] 
Sent: Friday, 11 March 2011 4:56 PM
To: users@wicket.apache.org
Subject: Re: Wicket thinks setOutputMarkupId property is not set to true

You did say that you set output markup ID to true on both components, 
but maybe you should double check that. I had a very similar problem 
once with an AjaxTabbedPanel that went like this:

1-The first displayed panel (tab) did not have setOutputMarkupId(true);
2-When the second tab is selected Wicket does a replace() to replace the 
first tab panel and overwrites the OutputMarkupId flag of the second 
panel which does setOutputMarkupId(true) in its constructor.

Maybe you have a chain of replaces where the first panel doesn't have 
setOutputMarkupId(true)?

Regards,
Bertrand

On 11/03/2011 12:04 AM, Coleman, Chris wrote:
 I should add that this is on 1.5-rc2. Previously on 1.4.16 the exact same 
 code (except for package renames) worked fine.

 Chris

 -Original Message-
 From: Coleman, Chris [mailto:chris.cole...@thalesgroup.com.au]
 Sent: Friday, 11 March 2011 4:02 PM
 To: users@wicket.apache.org
 Subject: Wicket thinks setOutputMarkupId property is not set to true

 I get this error even though I set output markup ID to true on the component 
 that is being replaced (and the one that is replacing it):


 Root cause:

 java.lang.IllegalArgumentException: cannot update component that does not 
 have setOutputMarkupId property set to true. Component: [PackageDetailsPanel 
 [Component id = panel]]
   at 
 org.apache.wicket.ajax.AjaxRequestTarget.add(AjaxRequestTarget.java:375)
   at 
 org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:356)
 Any idea how this can happen?



 DISCLAIMER:---
 This e-mail transmission and any documents, files and previous e-mail messages
 attached to it are private and confidential. They may contain proprietary or 
 copyright
 material or information that is subject to legal professional privilege. They 
 are for
 the use of the intended recipient only.  Any unauthorised viewing, use, 
 disclosure,
 copying, alteration, storage or distribution of, or reliance on, this message 
 is
 strictly prohibited. No part may be reproduced, adapted or transmitted 
 without the
 written permission of the owner. If you have received this transmission in 
 error, or
 are not an authorised recipient, please immediately notify the sender by 
 return email,
 delete this message and all copies from your e-mail system, and destroy any 
 printed
 copies. Receipt by anyone other than the intended recipient should not be 
 deemed a
 waiver of any privilege or protection. Thales Australia does not warrant or 
 represent
 that this e-mail or any documents, files and previous e-mail messages 
 attached are
 error or virus free.
 --




 DISCLAIMER:---
 This e-mail transmission and any documents, files and previous e-mail messages
 attached to it are private and confidential. They may contain proprietary or 
 copyright
 material or information that is subject to legal professional privilege. They 
 are for
 the use of the intended recipient only.  Any unauthorised viewing, use, 
 disclosure,
 copying, alteration, storage or distribution of, or reliance on, this message 
 is
 strictly prohibited. No part may be reproduced, adapted or transmitted 
 without the
 written permission of the owner. If you have received this transmission in 
 error, or
 are not an authorised recipient, please immediately notify the sender by 
 return email,
 delete this message and all copies from your e-mail system, and destroy any 
 printed
 copies. Receipt by anyone other than the intended recipient should not be 
 deemed a
 waiver of any privilege or protection. Thales Australia does not warrant or 
 represent
 that this e-mail or any documents, files and previous e-mail messages 
 attached are
 error or virus free.
 --


 -
 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




DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary

RE: [VOTE] WICKET-3218 - Component#onInitialize is broken for Pages

2011-03-09 Thread Coleman, Chris
 yep, calling overridable methods from constructors is bad - 

Yes I agree...

 you just made the case for making page.oninitialize() final...

But isn't that the very thing that the whole overridable onInitialize method 
was intended to avoid as it gets called after construction by the framework. 
Any post construction code can simply be put in the onInitialize method.



DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--


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



Models doco page typo?

2011-03-08 Thread Coleman, Chris
At the bottom of this page:

https://cwiki.apache.org/WICKET/working-with-wicket-models.html

it says that the IModel interface was simplified in Wicket 2.0... should that 
really be Wicket 1.2?

Never heard of Wicket 2 and I can see the 'new' style interface in Javadocs for 
1.5.



DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--



CompoundPropertyModel deprecated in 1.5 - what is the replacement?

2011-03-08 Thread Coleman, Chris
I noticed that CompoundPropertyModel is deprecated in 1.5 but I can't find 
anything relating to this on the Migration to Wicket 1.5 page.

What is meant to be used instead of this class?



DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--