Re: Feedback messages not showing on first request

2019-12-02 Thread Sven Meier

Hi,

your isVisible() might be called to often or early.

FeedbackMessagesModel caches the messages during request, so the call to 
#anyMessage() might result in a premature collection of messages.


Try override #onConfigure() instead, this is preferred over overriding 
#isVisible():


            @Override
            protected void onConfigure()
            {
                super.onConfigure();
                setVisible(anyMessage());
            }

Have fun
Sven


On 02.12.19 14:32, Entropy wrote:

The isVisible():

assetLookupOptionsFP = new 
FeedbackPanel("assetLookupOptionsFP"){
private static final long serialVersionUID = 1L;

@Override
public boolean isVisible() {
if (anyMessage()){
return true;
} else {
return false;
}
}
};

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

-
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: Feedback messages not showing on first request

2019-12-02 Thread Entropy
The isVisible():

assetLookupOptionsFP = new 
FeedbackPanel("assetLookupOptionsFP"){
private static final long serialVersionUID = 1L;

@Override
public boolean isVisible() {
if (anyMessage()){
return true;
} else {
return false;
}
}
};

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Feedback messages not showing on first request

2019-11-28 Thread Sven Meier

Hi,

hard to tell from your code snippet.

Could you remove the irrelevant part (the request attribute) and show us 
the visibility control instead?


A quickstart would help too.

Have fun
Sven


On 26.11.19 16:53, Entropy wrote:

We have a page where we are being required to have multiple feedback panels,
and to show messages in various ones depending on the error.  Our solution
was to use message filters and to put the messages against certain
containers to say 'any message in container X goes to feedback panel X'.

You can see the code below for example.  The request thing is just to set
the class of the feedbackpanel to a different value.  But we also control
the visibility of the panel by checking 'anyMessage()'.  So if there's no
errors, no feedback shows.

This all works...except on the first request.  For some reason when I click
the button, I can see the error (it's added during the onSubmit(), not
during the normal validation step if that makes a difference) added to the
assetLookupOptionsWMC, but then when anyMessage() runs, it doesn't find the
error.  Click the button a second time, and it works perfectly.

Any idea why?

assetLookupOptionsFP.setFilter(new IFeedbackMessageFilter(){
private static final long serialVersionUID = 1L;

@Override
public boolean accept(FeedbackMessage msg) {
Component reporter = msg.getReporter();
HttpServletRequest request = 
((HttpServletRequest)
getRequest().getContainerRequest());

if 
(reporter.getId().equals("assetLookupOptionsWMC")){
if(msg.isError())

request.setAttribute("assetLookupOptionsFeedbackPanelHasError",
"TRUE");
return true;
} else if
(reporter.getParent().getId().equals("assetLookupOptionsWMC")){
if(msg.isError())

request.setAttribute("assetLookupOptionsFeedbackPanelHasError",
"TRUE");
return true;
} else {
return false;
}
}

});

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

-
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: Feedback Messages across Requests / Problem

2015-05-06 Thread Patrick Davids
Hm... yes, already thought about a similar solution, but I would like to 
avoid any custom feedback handlings. I like the way wicket does.


The only custom requierment I have is, just showing 1 message.

I think the problem I is more related to the across requests issue in 
combination with ajax requests.


Any other ideas?

Am 05.05.2015 um 16:12 schrieb Ernesto Reinaldo Barreiro:

Store messages somewhere else? And on constructor check if there are any
and add them to the page?

On Tue, May 5, 2015 at 11:49 AM, Patrick Davids 
patrick.dav...@nubologic.com wrote:


Hi all,

I have have a quite complicated feedback message case here.
Could someone help me, please...

We only want to show a single feedback message.
No matter, how much errors a form validation procudes.

So, I use setMaxMessages(1) on the feedback panel.
To avoid having them all showed up one by one while clicking reload, I
implemented a FeedbackCollector and do a feedbackMessage.markAsRendered()
somewhere on detach().
(maybe someone remember my post some months ago ;-) )

This all works pretty good... but:

In a special case I need to use setResponsePage(getPage()) on an
AjaxRequest, instead of target.add(...).

To add feedback messages across requests, I have to use
Session.get().error(my error).

But on a ajax request, it seems there is a second detach() more when using
setResponsePage(), so my message will never get displayed, even when I used
Session.get().error(...).

I read about a redirect issue, when using setReponsePage() in ajax cases.

Does this redirect accidently marks my messages as rendered, caused by an
implicit second detach() (- my own markAsRendered())?

Could some one confirm that? And if yes, is there any way to prevent it?

thanx and kind regards
Patrick

-
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: Feedback Messages across Requests / Problem

2015-05-05 Thread Ernesto Reinaldo Barreiro
Store messages somewhere else? And on constructor check if there are any
and add them to the page?

On Tue, May 5, 2015 at 11:49 AM, Patrick Davids 
patrick.dav...@nubologic.com wrote:

 Hi all,

 I have have a quite complicated feedback message case here.
 Could someone help me, please...

 We only want to show a single feedback message.
 No matter, how much errors a form validation procudes.

 So, I use setMaxMessages(1) on the feedback panel.
 To avoid having them all showed up one by one while clicking reload, I
 implemented a FeedbackCollector and do a feedbackMessage.markAsRendered()
 somewhere on detach().
 (maybe someone remember my post some months ago ;-) )

 This all works pretty good... but:

 In a special case I need to use setResponsePage(getPage()) on an
 AjaxRequest, instead of target.add(...).

 To add feedback messages across requests, I have to use
 Session.get().error(my error).

 But on a ajax request, it seems there is a second detach() more when using
 setResponsePage(), so my message will never get displayed, even when I used
 Session.get().error(...).

 I read about a redirect issue, when using setReponsePage() in ajax cases.

 Does this redirect accidently marks my messages as rendered, caused by an
 implicit second detach() (- my own markAsRendered())?

 Could some one confirm that? And if yes, is there any way to prevent it?

 thanx and kind regards
 Patrick

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




-- 
Regards - Ernesto Reinaldo Barreiro


Re: Feedback Messages prevent DropDownChoice updating Textfields

2014-02-12 Thread Daniela L
Hi,
sometimes one doesn't see the obvious things,
I simply had to add a lastName.clearInput(); in the
onUpdate method and everything works as expected.
I hope that helps anybody having the same problem :-)
Best Regards
Daniela


Hi,
I am trying to implement a Feedback for every Form Component and
a catch all Feedback Panel in wicket 6.12.0. Everything works fine except
for the case
when a user causes a error which is shown in the Feedback Panel of the
Component,
e.g. the Textfield firstName is left empty. After that the select of the
DropDownChoice
does not update the Textfields anymore. Where is my mistake? Thanks a lot
in advance.
Daniela

Here is my code:

public class EditEmployeePage extends BasePage {
private FormComponentString firstName;
private DropDownChoiceEmployee employeeDDC;
private final FormEmployee employeListForm;
private ModelEmployee employeeModel;
private Employee employee;
@SpringBean(name=employeeService)
private EmployeeService employeeService;
private Button saveEmployeeButton;
private Button resetButton;

public EditEmployeePage(final PageParameters parameters) {
super();
employee = new Employee();
employeeModel = new ModelEmployee(employee);//for dropDownChoice
final CompoundPropertyModelEmployee employeeCpm = new
CompoundPropertyModelEmployee(employeeModel); //for form
employeListForm = new FormEmployee(employeListForm,
employeeCpm);
employeListForm.setOutputMarkupId(true);
add(employeListForm);
addEmployeeDropDown();
addFirstNameTextField();
//more fields
 }

private void addEmployeeDropDown() {
Label chooseEmployeeLabel = new Label(chooseEmployeeLabel,
Mitarbeiter wählen:*);
employeListForm.add(chooseEmployeeLabel);

// Employee DropdownChoice
LoadableDetachableModelListEmployee employeeValueChoices = new
LoadableDetachableModelListEmployee() {
private static final long serialVersionUID = 1L;

protected ListEmployee load() {
ListEmployee employees = Collections.emptyList();
employees = employeeService.findallEmployees(getCompany());
if (!employees.isEmpty()){
employeeModel.setObject(employees.get(0));
}
return employees;
}

};

employeeDDC = new DropDownChoiceEmployee(employee,
employeeModel,
employeeValueChoices.getObject(),
new TwoPropertiesChoiceRendererEmployee(employeeId,
lastName, firstName, ,));
employeeDDC.setLabel(new ModelString(Mitarbeiter
wählen));
employeeDDC.add(new
AjaxFormComponentUpdatingBehavior(onchange) {
@Override
protected void onUpdate(AjaxRequestTarget target) {
   target.add(employeListForm);
}
  });

employeeDDC.setRequired(true);
employeListForm.add(employeeDDC);
}

private void addFirstNameTextField() {
// first name label and field on page
Label firstNameLabel = new Label(firstNameLabel, Vorname:*);
employeListForm.add(firstNameLabel);
firstName = new TextFieldString(firstName);
firstName.setLabel(new ModelString(Vorname));
firstName.setOutputMarkupPlaceholderTag(true);
FeedbackPanel firstNameFeedback =  (FeedbackPanel) new
FeedbackPanel(firstNameFeedback, firstName).setOutputMarkupId(true);
employeListForm.add(firstNameFeedback);
employeListForm.add(firstName);
firstName.setRequired(true);
}
...
}

public abstract class BasePage extends WebPage {
   private final FeedbackPanel pageFeedback = new
FeedbackPanel(feedback);
   public BasePage() {
  super();
  pageFeedback.setOutputMarkupId(true);
  add(pageFeedback);
   }


Re: feedback messages not appearing using ajax button

2011-12-01 Thread Adam Gray
Perhaps you aren't overriding onError(AjaxRequestTarget) ?  Add the
feedback panel in there.

On Fri, Dec 2, 2011 at 12:22 AM, Squash james.stewart...@gmail.com wrote:

 I am using a SecureAjaxButton to do some business functionality. This
 function throws an exception which I catch and then set an error. I then
 add
 the feedback panel to the AjaxRequestTarget.
 Unfortunately the feedback panel is always empty when I view it in the
 debug
 window.

 If I however create a new page of the same type and return it then the
 messages appear. It is as if wicket ignores the fact that there is a
 message
 in the ajax call. Does it cache the messages or have some sort of dirty
 flag
 that is not set?

 Some code snippets with details changed as it is proprietary application.

  private class PayButton extends SecureAjaxButton {
 ...

@Override
protected void onSubmit(AjaxRequestTarget target, Form? form) {
target.addComponent(feedbackPanel);
doStuff(target);
 ...


private void doStuff(AjaxRequestTarget target) {
try {
 
 info(Success);
} catch (EJBException e) {
 error(e.getMessage());
}
 ...



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/feedback-messages-not-appearing-using-ajax-button-tp4145174p4145174.html
 Sent from the Users forum 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: feedback messages not appearing using ajax button

2011-12-01 Thread Squash
The feeback panel is being added to the AjaxTargetRequest as I can see it in
the ajax debug window. The problem is that it is empty.

I already have the onError method overriden for the button. I forgot to
mention that in the previous post.

@Override
protected void onError(AjaxRequestTarget target, Form? form) {
target.addComponent(feedbackPanel);
}

I also have an info message that I want to display upon success so it isn't
necessarily an error that I want to display. Hence onError would only solve
part of the problem (if it was the problem).

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/feedback-messages-not-appearing-using-ajax-button-tp4145174p4145379.html
Sent from the Users forum 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: feedback messages not appearing using ajax button

2011-12-01 Thread Martin Grigorov
https://issues.apache.org/jira/browse/WICKET-2705 ?!

On Fri, Dec 2, 2011 at 7:12 AM, Squash james.stewart...@gmail.com wrote:
 The feeback panel is being added to the AjaxTargetRequest as I can see it in
 the ajax debug window. The problem is that it is empty.

 I already have the onError method overriden for the button. I forgot to
 mention that in the previous post.

        @Override
        protected void onError(AjaxRequestTarget target, Form? form) {
            target.addComponent(feedbackPanel);
        }

 I also have an info message that I want to display upon success so it isn't
 necessarily an error that I want to display. Hence onError would only solve
 part of the problem (if it was the problem).

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/feedback-messages-not-appearing-using-ajax-button-tp4145174p4145379.html
 Sent from the Users forum 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





-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Feedback messages with parameter substitution

2011-01-06 Thread MZemeck
Or...

Object[] vars = ...add dynamic file name object
StringResourceModel rModel = new 
StringResourceModel(message.fileAlreadyUploaded, null, vars);
error(rModel.getObject());




From:   James james.eliye...@gmail.com
To: users@wicket.apache.org
Date:   01/04/2011 09:22 PM
Subject:Re: Feedback messages with parameter substitution



Folks,

I found the solution from the thread Using getString with
parameters
http://apache-wicket.1842946.n4.nabble.com/Usage-of-getString-with-parameters-model-td1875254.html

.

And this is what I did in the properties file..

premessage.fileAlreadyUploaded=The file ${0} is already uploaded/pre
(Note the $ sign)

And in the java code..

error(getString(message.fileAlreadyUploaded, new Model(new
String[]{fileUpload.getClientFileName()})));

It worked like a charm.

On Wed, Jan 5, 2011 at 10:00 AM, James james.eliye...@gmail.com wrote:

 Dear friends,

 Please forgive me if this question is asked before and answered. I
 seriously searched for this in the mailing list and other areas and 
couldn't
 find any solution.

 I've seen great examples of using StringResourceModel for parameter
 substitution in components like Label.

 But what I want is to display a feedback message, say an error message 
with
 some dynamic values in it. Something like The file abc.txt is already
 uploaded, where abc.txt shall be dynamic.

 So the localized text in the properties file would be something like
 message.fileAlreadyUploaded=The file {0} is already uploaded.

 I've tried using something like this...

 code
 error(getString(message.fileAlreadyUploaded, new Model(new
 String[]{fileUpload.getClientFileName()})));
 /code

 but that' doesn't work..I also tried using StringResourceModel but to no
 avail.

 I know I'm doing something wrong, please guide me to solve this problem.

 --
 Thanks  Regards,
 James




-- 
Thanks  Regards,
James





Notice: This communication, including any attachments, is intended solely 
for the use of the individual or entity to which it is addressed. This 
communication may contain information that is protected from disclosure 
under State and/or Federal law. Please notify the sender immediately if 
you have received this communication in error and delete this email from 
your system. If you are not the intended recipient, you are requested not 
to disclose, copy, distribute or take any action in reliance on the 
contents of this information.

Re: Feedback messages with parameter substitution

2011-01-04 Thread James
Folks,

I found the solution from the thread Using getString with
parametershttp://apache-wicket.1842946.n4.nabble.com/Usage-of-getString-with-parameters-model-td1875254.html
.

And this is what I did in the properties file..

premessage.fileAlreadyUploaded=The file ${0} is already uploaded/pre
(Note the $ sign)

And in the java code..

error(getString(message.fileAlreadyUploaded, new Model(new
String[]{fileUpload.getClientFileName()})));

It worked like a charm.

On Wed, Jan 5, 2011 at 10:00 AM, James james.eliye...@gmail.com wrote:

 Dear friends,

 Please forgive me if this question is asked before and answered. I
 seriously searched for this in the mailing list and other areas and couldn't
 find any solution.

 I've seen great examples of using StringResourceModel for parameter
 substitution in components like Label.

 But what I want is to display a feedback message, say an error message with
 some dynamic values in it. Something like The file abc.txt is already
 uploaded, where abc.txt shall be dynamic.

 So the localized text in the properties file would be something like
 message.fileAlreadyUploaded=The file {0} is already uploaded.

 I've tried using something like this...

 code
 error(getString(message.fileAlreadyUploaded, new Model(new
 String[]{fileUpload.getClientFileName()})));
 /code

 but that' doesn't work..I also tried using StringResourceModel but to no
 avail.

 I know I'm doing something wrong, please guide me to solve this problem.

 --
 Thanks  Regards,
 James




-- 
Thanks  Regards,
James


Re: Feedback Messages Not Getting Displayed When Using AjaxSubmitLink

2009-12-18 Thread Martin Willitts

I found I needed to use form.error(message) in the onSubmit method.



luther.baker wrote:
 
 I'm not at a computer to try this ... but I do this all the time so it
 definitely works like you're hoping.
 
 You've posted alot of code so its a bit difficult to trace what is
 commented
 out and what is not ... but starting with your original post, uncomment
 the
 following:
 
 final FeedbackPanel feedback = new FeedbackPanel(feedback);
 feedback.setOutputMarkupId(true);
 add(feedback);
 
 Now, be sure to add this (I think this is the part you're missing - or I
 missed in reading your snippets):
 
 feedback.setOutputMarkupPlaceholderTag(true);
 
 And then make sure you add it to the target in the submit handler:
 
 target.addComponent(feedback);
 
 I think you're doing/done all of this at one time with varied components -
 but my guess is that you've got to double check and make sure you're doing
 all three things specifically for the feedback panel.
 
 Hope this helps,
 
 -Luther
 
 
 
 Its hard to tell what
 
 On Fri, Jun 19, 2009 at 4:21 PM, jpalmer1026 jpalmer1...@mchsi.com
 wrote:
 

 Actually, validation messages are now getting displayed for validation
 performed on components but I am still unable to get error messages that
 I
 have added to be displayed. For example, in the following code, I need a
 way
 to display the line No PIN found for PIN but I am not sure how to do
 that.
 Any ideas?

 final AjaxSubmitLink verifyPinLink = new AjaxSubmitLink(verifyPinLink)
 {
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
 //target.addComponent(feedback);
 //onError(target, form);

Declaration declaration = (Declaration)
 form.getModelObject();
ParcelIdentification pid =
 declarationService.findParcelIdentification(declaration.getPin());
if (pid == null) {
error(No PIN found for PIN  + declaration.getPin());
} else {
InitiateDeclarationVerifyPanel decVerifyPanel = new
 InitiateDeclarationVerifyPanel(verifyPanel, pid);
parent.addOrReplace(decVerifyPanel);
parent.setVisible(true);
this.setEnabled(false);
reenterPinLink.setVisible(true);
target.addComponent(this);
target.addComponent(parent);
target.addComponent(reenterPinLink);
}
}

 @Override
public void onError(AjaxRequestTarget target, Form form) {
target.addComponent(feedback);
}
};


 jpalmer1026 wrote:
 
  I called target.addComponent for the feedbackpanel but still no luck.
 My
  updated code is as follows:
 
   final AjaxSubmitLink verifyPinLink = new
 AjaxSubmitLink(verifyPinLink)
  {
  @Override
  public void onSubmit(AjaxRequestTarget target, Form form) {
  target.addComponent(feedback);
  onError(target, form);
 
  Declaration declaration = (Declaration)
  form.getModelObject();
  ParcelIdentification pid =
  declarationService.findParcelIdentification(declaration.getPin());
  if (pid == null) {
  error(No PIN found for PIN  +
 declaration.getPin());
  } else {
  InitiateDeclarationVerifyPanel decVerifyPanel = new
  InitiateDeclarationVerifyPanel(verifyPanel, pid);
  parent.addOrReplace(decVerifyPanel);
  parent.setVisible(true);
  this.setEnabled(false);
  reenterPinLink.setVisible(true);
  target.addComponent(this);
  target.addComponent(parent);
  target.addComponent(reenterPinLink);
  }
  }
  };
 
  Erik van Oosten wrote:
 
  You did not call target.addComponent for the feedbackpanel or any of
 its
  parents.
 
  Regards,
  Erik.
 
 
  jpalmer1...@mchsi.com schreef:
  I am using an AjaxSubmitLink to submit form data. Using this,
 however,
  is preventing feedback messages from being displayed.
 
  My code is as follows:
 
  public class InitiateDeclarationPage extends EzdecBaseWebPage {
  @SpringBean
  private IDeclarationService declarationService;
 
  AjaxFallbackLink reenterPinLink;
 
  public InitiateDeclarationPage() {
  final Declaration declaration = new
  Declaration(EzdecSession.getCurrentUser().getAccount(),
  EzdecSession.getCurrentUser(), , County.COOK,
  State.ILLINOIS);
  //final FeedbackPanel feedback = new
 FeedbackPanel(feedback);
  //feedback.setOutputMarkupId(true);
  //add(feedback);
  add(new FeedbackPanel(feedback));
 
  final Form form = new 

Re: Feedback Messages Not Getting Displayed When Using AjaxSubmitLink

2009-12-18 Thread Pieter Degraeuwe
Or you just implement (override) the onError(...) method of your
AjaxSubmitLink()... there you can 'refresh' your feedbackpanel by adding it
to the ajaxRequestTarget

(It's on the todo list to make it abstract, so you have to implement it,
just like the onSubmit(...)



On Fri, Dec 18, 2009 at 4:01 PM, Martin Willitts martin.willi...@bcs.org.uk
 wrote:


 I found I needed to use form.error(message) in the onSubmit method.



 luther.baker wrote:
 
  I'm not at a computer to try this ... but I do this all the time so it
  definitely works like you're hoping.
 
  You've posted alot of code so its a bit difficult to trace what is
  commented
  out and what is not ... but starting with your original post, uncomment
  the
  following:
 
  final FeedbackPanel feedback = new FeedbackPanel(feedback);
  feedback.setOutputMarkupId(true);
  add(feedback);
 
  Now, be sure to add this (I think this is the part you're missing - or I
  missed in reading your snippets):
 
  feedback.setOutputMarkupPlaceholderTag(true);
 
  And then make sure you add it to the target in the submit handler:
 
  target.addComponent(feedback);
 
  I think you're doing/done all of this at one time with varied components
 -
  but my guess is that you've got to double check and make sure you're
 doing
  all three things specifically for the feedback panel.
 
  Hope this helps,
 
  -Luther
 
 
 
  Its hard to tell what
 
  On Fri, Jun 19, 2009 at 4:21 PM, jpalmer1026 jpalmer1...@mchsi.com
  wrote:
 
 
  Actually, validation messages are now getting displayed for validation
  performed on components but I am still unable to get error messages that
  I
  have added to be displayed. For example, in the following code, I need a
  way
  to display the line No PIN found for PIN but I am not sure how to do
  that.
  Any ideas?
 
  final AjaxSubmitLink verifyPinLink = new AjaxSubmitLink(verifyPinLink)
  {
 @Override
 public void onSubmit(AjaxRequestTarget target, Form form) {
  //target.addComponent(feedback);
  //onError(target, form);
 
 Declaration declaration = (Declaration)
  form.getModelObject();
 ParcelIdentification pid =
  declarationService.findParcelIdentification(declaration.getPin());
 if (pid == null) {
 error(No PIN found for PIN  +
 declaration.getPin());
 } else {
 InitiateDeclarationVerifyPanel decVerifyPanel = new
  InitiateDeclarationVerifyPanel(verifyPanel, pid);
 parent.addOrReplace(decVerifyPanel);
 parent.setVisible(true);
 this.setEnabled(false);
 reenterPinLink.setVisible(true);
 target.addComponent(this);
 target.addComponent(parent);
 target.addComponent(reenterPinLink);
 }
 }
 
  @Override
 public void onError(AjaxRequestTarget target, Form form) {
 target.addComponent(feedback);
 }
 };
 
 
  jpalmer1026 wrote:
  
   I called target.addComponent for the feedbackpanel but still no luck.
  My
   updated code is as follows:
  
final AjaxSubmitLink verifyPinLink = new
  AjaxSubmitLink(verifyPinLink)
   {
   @Override
   public void onSubmit(AjaxRequestTarget target, Form form)
 {
   target.addComponent(feedback);
   onError(target, form);
  
   Declaration declaration = (Declaration)
   form.getModelObject();
   ParcelIdentification pid =
   declarationService.findParcelIdentification(declaration.getPin());
   if (pid == null) {
   error(No PIN found for PIN  +
  declaration.getPin());
   } else {
   InitiateDeclarationVerifyPanel decVerifyPanel =
 new
   InitiateDeclarationVerifyPanel(verifyPanel, pid);
   parent.addOrReplace(decVerifyPanel);
   parent.setVisible(true);
   this.setEnabled(false);
   reenterPinLink.setVisible(true);
   target.addComponent(this);
   target.addComponent(parent);
   target.addComponent(reenterPinLink);
   }
   }
   };
  
   Erik van Oosten wrote:
  
   You did not call target.addComponent for the feedbackpanel or any of
  its
   parents.
  
   Regards,
   Erik.
  
  
   jpalmer1...@mchsi.com schreef:
   I am using an AjaxSubmitLink to submit form data. Using this,
  however,
   is preventing feedback messages from being displayed.
  
   My code is as follows:
  
   public class InitiateDeclarationPage extends EzdecBaseWebPage {
   @SpringBean
   private IDeclarationService declarationService;
  
   AjaxFallbackLink 

Re: feedback messages

2009-12-02 Thread Gw
Thanks for ur help, Marco... :)
GBU.

On Mon, Nov 30, 2009 at 6:04 PM, Marco Mancini marcoman...@gmail.comwrote:

 Hi,

 Usualy i use this code:


 feedBackPanel.getFeedbackMessagesModel().setObject(null);
 target.addComponent(feedBackPanel);


 but i don't know if is it the right solution

 ^_^

 Marco

 2009/11/30 Gw not4spamm...@gmail.com

  Hi all,
 
  Anybody knows how to prevent feedback messages from being cleaned up when
  an
  Ajax Link (IndicatingAjaxFallbackLink) is clicked?
  Thanx for your help.
 
  Regards,
  Mike
 



Re: feedback messages

2009-11-30 Thread Marco Mancini
Hi,

Usualy I use this code:

feedbackPanel.getFeedbackMessagesModel().setObject(null);

but i don't know if is it the right solution.

^_^

Marco


2009/11/30 Gw not4spamm...@gmail.com

 Hi all,

 Anybody knows how to prevent feedback messages from being cleaned up when
 an
 Ajax Link (IndicatingAjaxFallbackLink) is clicked?
 Thanx for your help.

 Regards,
 Mike



Re: feedback messages

2009-11-30 Thread Marco Mancini
Hi,

Usualy i use this code:


feedBackPanel.getFeedbackMessagesModel().setObject(null);
target.addComponent(feedBackPanel);


but i don't know if is it the right solution

^_^

Marco

2009/11/30 Gw not4spamm...@gmail.com

 Hi all,

 Anybody knows how to prevent feedback messages from being cleaned up when
 an
 Ajax Link (IndicatingAjaxFallbackLink) is clicked?
 Thanx for your help.

 Regards,
 Mike



Re: Feedback messages, input and label

2009-10-08 Thread Swanthe Lindgren
Well, if you combine putting inputPwd=Password in your property file and 
putting


label for=pwdwicket:message key=inputPwdthis text here will be 
replaced by your propertyfile value/wicket:message/label


in you markup, I thing you'll get what you'r looking for.

//Swanthe

Tomás Rossi wrote:
Ok, that's a little nicer, but still... It'd be better if the label 
could be deduced from the markup itself. Yet, no big deal.


Thanks

Matej Knopp escribió:

try putting inputPwd = Password in your property file.

-Matej

On Wed, Oct 7, 2009 at 5:33 PM, Tomás Rossi tro...@mecon.gov.ar wrote:
 

Hi,

lets say you have this in you html form:
--
...
label for=pwdPassword/label
input type=password id=pwd wicket:id=inputPwd/
...
--

Then, a properties file for your app with this:
--
...
Required=Field ${label} is required!
...
--

When the required-error-message prints, it does like this:

* Field inputPwd is required!

Now I wish I could change it to say Field Password is required! 
without
modifying wicket:id attribute nor adding specific required message 
for the

component.
Is this possible?

Kind regards,
Tom;

-
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


  



-
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: Feedback messages, input and label

2009-10-07 Thread Olivier Bourgeois
Have you tried something like this in your page.java :

pwd.setLabel(new ModelString(Password));

?


2009/10/7 Tomás Rossi tro...@mecon.gov.ar

 Hi,

 lets say you have this in you html form:
 --
 ...
 label for=pwdPassword/label
 input type=password id=pwd wicket:id=inputPwd/
 ...
 --

 Then, a properties file for your app with this:
 --
 ...
 Required=Field ${label} is required!
 ...
 --

 When the required-error-message prints, it does like this:

 * Field inputPwd is required!

 Now I wish I could change it to say Field Password is required! without
 modifying wicket:id attribute nor adding specific required message for the
 component.
 Is this possible?

 Kind regards,
 Tom;

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




Re: Feedback messages, input and label

2009-10-07 Thread Tomás Rossi

Yeah, it worked, thanks.

Nonetheless, it'd be madness if I had to do that with every component of 
the system. Is this the only way? Couldn't this be done in a more 
automatic fashion, like for example, extracting it from the html label 
content which is associated to the input?


Olivier Bourgeois escribió:

Have you tried something like this in your page.java :

pwd.setLabel(new ModelString(Password));

?


2009/10/7 Tomás Rossi tro...@mecon.gov.ar

  

Hi,

lets say you have this in you html form:
--
...
label for=pwdPassword/label
input type=password id=pwd wicket:id=inputPwd/
...
--

Then, a properties file for your app with this:
--
...
Required=Field ${label} is required!
...
--

When the required-error-message prints, it does like this:

* Field inputPwd is required!

Now I wish I could change it to say Field Password is required! without
modifying wicket:id attribute nor adding specific required message for the
component.
Is this possible?

Kind regards,
Tom;

-
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: Feedback messages, input and label

2009-10-07 Thread Igor Vaynberg
 Nonetheless, it'd be madness

no, this is spartaaa!

form components search property files for their labels without you
having to explicitly set a model.

-igor


if I had to do that with every component of the
 system. Is this the only way? Couldn't this be done in a more automatic
 fashion, like for example, extracting it from the html label content which
 is associated to the input?

 Olivier Bourgeois escribió:

 Have you tried something like this in your page.java :

 pwd.setLabel(new ModelString(Password));

 ?


 2009/10/7 Tomás Rossi tro...@mecon.gov.ar



 Hi,

 lets say you have this in you html form:
 --
 ...
 label for=pwdPassword/label
 input type=password id=pwd wicket:id=inputPwd/
 ...
 --

 Then, a properties file for your app with this:
 --
 ...
 Required=Field ${label} is required!
 ...
 --

 When the required-error-message prints, it does like this:

 * Field inputPwd is required!

 Now I wish I could change it to say Field Password is required! without
 modifying wicket:id attribute nor adding specific required message for
 the
 component.
 Is this possible?

 Kind regards,
 Tom;

 -
 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



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



Re: Feedback messages, input and label

2009-10-07 Thread Matej Knopp
try putting inputPwd = Password in your property file.

-Matej

On Wed, Oct 7, 2009 at 5:33 PM, Tomás Rossi tro...@mecon.gov.ar wrote:
 Hi,

 lets say you have this in you html form:
 --
 ...
 label for=pwdPassword/label
 input type=password id=pwd wicket:id=inputPwd/
 ...
 --

 Then, a properties file for your app with this:
 --
 ...
 Required=Field ${label} is required!
 ...
 --

 When the required-error-message prints, it does like this:

 * Field inputPwd is required!

 Now I wish I could change it to say Field Password is required! without
 modifying wicket:id attribute nor adding specific required message for the
 component.
 Is this possible?

 Kind regards,
 Tom;

 -
 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: Feedback messages, input and label

2009-10-07 Thread Tomás Rossi

Yeah, we'd need 300 programmers for that task ;)

So you have to specify the label for each component in a property file? 
And then you'd have a property file for each markup that contains a 
form? Mmhh...


Igor Vaynberg escribió:

Nonetheless, it'd be madness



no, this is spartaaa!

form components search property files for their labels without you
having to explicitly set a model.

-igor


if I had to do that with every component of the
  

system. Is this the only way? Couldn't this be done in a more automatic
fashion, like for example, extracting it from the html label content which
is associated to the input?

Olivier Bourgeois escribió:


Have you tried something like this in your page.java :

pwd.setLabel(new ModelString(Password));

?


2009/10/7 Tomás Rossi tro...@mecon.gov.ar


  

Hi,

lets say you have this in you html form:
--
...
label for=pwdPassword/label
input type=password id=pwd wicket:id=inputPwd/
...
--

Then, a properties file for your app with this:
--
...
Required=Field ${label} is required!
...
--

When the required-error-message prints, it does like this:

* Field inputPwd is required!

Now I wish I could change it to say Field Password is required! without
modifying wicket:id attribute nor adding specific required message for
the
component.
Is this possible?

Kind regards,
Tom;

-
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





-
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: Feedback messages, input and label

2009-10-07 Thread Pedro Santos
Wicket is Sparta?

http://www.mail-archive.com/wicket-u...@lists.sourceforge.net/msg17023.html

On Wed, Oct 7, 2009 at 3:05 PM, Tomás Rossi tro...@mecon.gov.ar wrote:

 Yeah, we'd need 300 programmers for that task ;)

 So you have to specify the label for each component in a property file? And
 then you'd have a property file for each markup that contains a form?
 Mmhh...

 Igor Vaynberg escribió:

  Nonetheless, it'd be madness



 no, this is spartaaa!

 form components search property files for their labels without you
 having to explicitly set a model.

 -igor


 if I had to do that with every component of the


 system. Is this the only way? Couldn't this be done in a more automatic
 fashion, like for example, extracting it from the html label content
 which
 is associated to the input?

 Olivier Bourgeois escribió:


 Have you tried something like this in your page.java :

 pwd.setLabel(new ModelString(Password));

 ?


 2009/10/7 Tomás Rossi tro...@mecon.gov.ar




 Hi,

 lets say you have this in you html form:
 --
 ...
 label for=pwdPassword/label
 input type=password id=pwd wicket:id=inputPwd/
 ...
 --

 Then, a properties file for your app with this:
 --
 ...
 Required=Field ${label} is required!
 ...
 --

 When the required-error-message prints, it does like this:

 * Field inputPwd is required!

 Now I wish I could change it to say Field Password is required!
 without
 modifying wicket:id attribute nor adding specific required message for
 the
 component.
 Is this possible?

 Kind regards,
 Tom;

 -
 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





 -
 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




-- 
Pedro Henrique Oliveira dos Santos


Re: Feedback messages, input and label

2009-10-07 Thread Tomás Rossi
Ok, that's a little nicer, but still... It'd be better if the label 
could be deduced from the markup itself. Yet, no big deal.


Thanks

Matej Knopp escribió:

try putting inputPwd = Password in your property file.

-Matej

On Wed, Oct 7, 2009 at 5:33 PM, Tomás Rossi tro...@mecon.gov.ar wrote:
  

Hi,

lets say you have this in you html form:
--
...
label for=pwdPassword/label
input type=password id=pwd wicket:id=inputPwd/
...
--

Then, a properties file for your app with this:
--
...
Required=Field ${label} is required!
...
--

When the required-error-message prints, it does like this:

* Field inputPwd is required!

Now I wish I could change it to say Field Password is required! without
modifying wicket:id attribute nor adding specific required message for the
component.
Is this possible?

Kind regards,
Tom;

-
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


  



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



Re: Feedback messages and ajax request

2009-08-03 Thread Matej Knopp
Feedbacks should be processed in prepareRender method which should be
called on Ajax requests as well. If it isn't it would be a bug.

-Matej

On Mon, Aug 3, 2009 at 11:59 AM, Martin
Makundimartin.maku...@koodaripalvelut.com wrote:
 Hi!

 In normal requests feedbackmessages are processed like follows:
        public final void beforeRender()
        {
                if (!(this instanceof IFeedback))
                {
                        internalBeforeRender();
                }
                else
                {
                        // this component is a feedback. Feedback must be 
 initialized last, so that
                        // they can collect messages from other components
                        ListComponent feedbacks = 
 getRequestCycle().getMetaData(FEEDBACK_LIST);
                        if (feedbacks == null)
                        {
                                feedbacks = new ArrayListComponent();
                                getRequestCycle().setMetaData(FEEDBACK_LIST, 
 feedbacks);
                        }
                        feedbacks.add(this);
                }
        }


 However, in AJAX requests I cannot find any such logic and feedback is
 often left out. Is this a bug?

 **
 Martin

 -
 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: Feedback messages and ajax request

2009-08-03 Thread Martin Makundi
Is it possible they are not ajax-processed at all if they are not
visible in some earlier stage (=if there are no messages when
isvisible is checked...??)?

**
Martin

2009/8/3 Matej Knopp matej.kn...@gmail.com:
 Feedbacks should be processed in prepareRender method which should be
 called on Ajax requests as well. If it isn't it would be a bug.

 -Matej

 On Mon, Aug 3, 2009 at 11:59 AM, Martin
 Makundimartin.maku...@koodaripalvelut.com wrote:
 Hi!

 In normal requests feedbackmessages are processed like follows:
        public final void beforeRender()
        {
                if (!(this instanceof IFeedback))
                {
                        internalBeforeRender();
                }
                else
                {
                        // this component is a feedback. Feedback must be 
 initialized last, so that
                        // they can collect messages from other components
                        ListComponent feedbacks = 
 getRequestCycle().getMetaData(FEEDBACK_LIST);
                        if (feedbacks == null)
                        {
                                feedbacks = new ArrayListComponent();
                                getRequestCycle().setMetaData(FEEDBACK_LIST, 
 feedbacks);
                        }
                        feedbacks.add(this);
                }
        }


 However, in AJAX requests I cannot find any such logic and feedback is
 often left out. Is this a bug?

 **
 Martin

 -
 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



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



Re: Feedback messages and ajax request

2009-08-03 Thread Martin Makundi
I added a jira issue with a possible fix suggestion:
https://issues.apache.org/jira/browse/WICKET-2411

**
Martin

2009/8/3 Martin Makundi martin.maku...@koodaripalvelut.com:
 Is it possible they are not ajax-processed at all if they are not
 visible in some earlier stage (=if there are no messages when
 isvisible is checked...??)?

 **
 Martin

 2009/8/3 Matej Knopp matej.kn...@gmail.com:
 Feedbacks should be processed in prepareRender method which should be
 called on Ajax requests as well. If it isn't it would be a bug.

 -Matej

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



Re: Feedback Messages Not Getting Displayed When Using AjaxSubmitLink

2009-06-19 Thread Erik van Oosten
You did not call target.addComponent for the feedbackpanel or any of its 
parents.


Regards,
   Erik.


jpalmer1...@mchsi.com schreef:
I am using an AjaxSubmitLink to submit form data. Using this, however, 
is preventing feedback messages from being displayed.


My code is as follows:

public class InitiateDeclarationPage extends EzdecBaseWebPage {
@SpringBean
private IDeclarationService declarationService;

AjaxFallbackLink reenterPinLink;

public InitiateDeclarationPage() {
final Declaration declaration = new 
Declaration(EzdecSession.getCurrentUser().getAccount(),
EzdecSession.getCurrentUser(), , County.COOK, 
State.ILLINOIS);

//final FeedbackPanel feedback = new FeedbackPanel(feedback);
//feedback.setOutputMarkupId(true);
//add(feedback);
add(new FeedbackPanel(feedback));

final Form form = new Form(initiateDeclarationForm, new 
CompoundPropertyModelDeclaration(declaration));
   
form.add(new Button(submitButton) {

@Override
public void onSubmit() {
Declaration declaration = (Declaration) 
form.getModelObject();

declaration.setStatus(Status.OPEN);
ParcelIdentification pin = 
declarationService.findParcelIdentification(declaration.getPin());

if (pin == null) {
error(No PIN found for PIN  + 
getFormattedPIN(declaration.getPin()));

} else {
if 
(declarationService.initiateDeclaration(declaration)) {
EzdecSession.get().info(Declaration  + 
declaration.getTxNumber() +  created);
setResponsePage(new 
DeclarationPage(declaration, 0, pin));

} else {
error(Creating declaration with PIN:  + 
declaration.getPin());

}
}
}
});

final PINTextField pinText = new PINTextField(pin);
pinText.setRequired(true);
pinText.setOutputMarkupId(true);
form.add(pinText);
   
form.add(new DropDownChoice(county, 
Arrays.asList(County.values()))

 .setRequired(true)
 .setEnabled(false));

final WebMarkupContainer parent = new 
WebMarkupContainer(verifyPanelWmc);

parent.setOutputMarkupPlaceholderTag(true);
parent.setVisible(false);
form.add(parent);

final AjaxSubmitLink verifyPinLink = new 
AjaxSubmitLink(verifyPinLink) {

@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
Declaration declaration = (Declaration) 
form.getModelObject();
ParcelIdentification pid = 
declarationService.findParcelIdentification(declaration.getPin());

if (pid == null) {
error(No PIN found for PIN  + declaration.getPin());
} else {
InitiateDeclarationVerifyPanel decVerifyPanel = 
new InitiateDeclarationVerifyPanel(verifyPanel, pid);

parent.addOrReplace(decVerifyPanel);
parent.setVisible(true);
this.setEnabled(false);
reenterPinLink.setVisible(true);
target.addComponent(this);
target.addComponent(parent);
target.addComponent(reenterPinLink);
}
}
};

form.add(verifyPinLink);

reenterPinLink = new AjaxFallbackLink(reenterPinLink) {
@Override
public void onClick(AjaxRequestTarget target) {
this.setOutputMarkupPlaceholderTag(true);
parent.setVisible(false);
verifyPinLink.setEnabled(true);
target.addComponent(parent);
target.addComponent(verifyPinLink);
target.addComponent(pinText);
target.focusComponent(pinText);
this.setVisible(false);
target.addComponent(this);
}

};

form.add(reenterPinLink);

add(form);
}
}

Does anyone know how to fix this?



--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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



Re: Feedback Messages Not Getting Displayed When Using AjaxSubmitLink

2009-06-19 Thread jpalmer1026

I called target.addComponent for the feedbackpanel but still no luck. My
updated code is as follows:

 final AjaxSubmitLink verifyPinLink = new AjaxSubmitLink(verifyPinLink) {
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
target.addComponent(feedback);
onError(target, form);

Declaration declaration = (Declaration)
form.getModelObject();
ParcelIdentification pid =
declarationService.findParcelIdentification(declaration.getPin());
if (pid == null) {
error(No PIN found for PIN  + declaration.getPin());
} else {
InitiateDeclarationVerifyPanel decVerifyPanel = new
InitiateDeclarationVerifyPanel(verifyPanel, pid);
parent.addOrReplace(decVerifyPanel);
parent.setVisible(true);
this.setEnabled(false);
reenterPinLink.setVisible(true);
target.addComponent(this);
target.addComponent(parent);
target.addComponent(reenterPinLink);
}
}
};

Erik van Oosten wrote:
 
 You did not call target.addComponent for the feedbackpanel or any of its 
 parents.
 
 Regards,
 Erik.
 
 
 jpalmer1...@mchsi.com schreef:
 I am using an AjaxSubmitLink to submit form data. Using this, however, 
 is preventing feedback messages from being displayed.

 My code is as follows:

 public class InitiateDeclarationPage extends EzdecBaseWebPage {
 @SpringBean
 private IDeclarationService declarationService;

 AjaxFallbackLink reenterPinLink;

 public InitiateDeclarationPage() {
 final Declaration declaration = new 
 Declaration(EzdecSession.getCurrentUser().getAccount(),
 EzdecSession.getCurrentUser(), , County.COOK, 
 State.ILLINOIS);
 //final FeedbackPanel feedback = new FeedbackPanel(feedback);
 //feedback.setOutputMarkupId(true);
 //add(feedback);
 add(new FeedbackPanel(feedback));

 final Form form = new Form(initiateDeclarationForm, new 
 CompoundPropertyModelDeclaration(declaration));

 form.add(new Button(submitButton) {
 @Override
 public void onSubmit() {
 Declaration declaration = (Declaration) 
 form.getModelObject();
 declaration.setStatus(Status.OPEN);
 ParcelIdentification pin = 
 declarationService.findParcelIdentification(declaration.getPin());
 if (pin == null) {
 error(No PIN found for PIN  + 
 getFormattedPIN(declaration.getPin()));
 } else {
 if 
 (declarationService.initiateDeclaration(declaration)) {
 EzdecSession.get().info(Declaration  + 
 declaration.getTxNumber() +  created);
 setResponsePage(new 
 DeclarationPage(declaration, 0, pin));
 } else {
 error(Creating declaration with PIN:  + 
 declaration.getPin());
 }
 }
 }
 });

 final PINTextField pinText = new PINTextField(pin);
 pinText.setRequired(true);
 pinText.setOutputMarkupId(true);
 form.add(pinText);

 form.add(new DropDownChoice(county, 
 Arrays.asList(County.values()))
  .setRequired(true)
  .setEnabled(false));

 final WebMarkupContainer parent = new 
 WebMarkupContainer(verifyPanelWmc);
 parent.setOutputMarkupPlaceholderTag(true);
 parent.setVisible(false);
 form.add(parent);

 final AjaxSubmitLink verifyPinLink = new 
 AjaxSubmitLink(verifyPinLink) {
 @Override
 public void onSubmit(AjaxRequestTarget target, Form form) {
 Declaration declaration = (Declaration) 
 form.getModelObject();
 ParcelIdentification pid = 
 declarationService.findParcelIdentification(declaration.getPin());
 if (pid == null) {
 error(No PIN found for PIN  +
 declaration.getPin());
 } else {
 InitiateDeclarationVerifyPanel decVerifyPanel = 
 new InitiateDeclarationVerifyPanel(verifyPanel, pid);
 parent.addOrReplace(decVerifyPanel);
 parent.setVisible(true);
 this.setEnabled(false);
 reenterPinLink.setVisible(true);
 target.addComponent(this);
 target.addComponent(parent);
 target.addComponent(reenterPinLink);
 }
 }
 };

 form.add(verifyPinLink);

 reenterPinLink = new AjaxFallbackLink(reenterPinLink) {
 @Override
 public void onClick(AjaxRequestTarget target) {
 

Re: Feedback Messages Not Getting Displayed When Using AjaxSubmitLink

2009-06-19 Thread Jason Lea

I think you need to override

final AjaxSubmitLink verifyPinLink = new AjaxSubmitLink(verifyPinLink) {

|*onError 
http://wicket.sourceforge.net/apidocs/wicket/ajax/markup/html/form/AjaxSubmitLink.html#onError%28wicket.ajax.AjaxRequestTarget,%20wicket.markup.html.form.Form%29*(AjaxRequestTarget 
http://wicket.sourceforge.net/apidocs/wicket/ajax/AjaxRequestTarget.html target, 
Form 
http://wicket.sourceforge.net/apidocs/wicket/markup/html/form/Form.html form)| 


}

If you have a validation error, you will get error messages and this 
method is called where you add the feedback panel to the target 
(target.addComponent()).  The onSubmit() method is only called if there 
were no validation errors, onError() is called when there are errors.


jpalmer1026 wrote:

I called target.addComponent for the feedbackpanel but still no luck. My
updated code is as follows:

 final AjaxSubmitLink verifyPinLink = new AjaxSubmitLink(verifyPinLink) {
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
target.addComponent(feedback);
onError(target, form);

Declaration declaration = (Declaration)
form.getModelObject();
ParcelIdentification pid =
declarationService.findParcelIdentification(declaration.getPin());
if (pid == null) {
error(No PIN found for PIN  + declaration.getPin());
} else {
InitiateDeclarationVerifyPanel decVerifyPanel = new
InitiateDeclarationVerifyPanel(verifyPanel, pid);
parent.addOrReplace(decVerifyPanel);
parent.setVisible(true);
this.setEnabled(false);
reenterPinLink.setVisible(true);
target.addComponent(this);
target.addComponent(parent);
target.addComponent(reenterPinLink);
}
}
};

Erik van Oosten wrote:
  
You did not call target.addComponent for the feedbackpanel or any of its 
parents.


Regards,
Erik.


jpalmer1...@mchsi.com schreef:

I am using an AjaxSubmitLink to submit form data. Using this, however, 
is preventing feedback messages from being displayed.


My code is as follows:

public class InitiateDeclarationPage extends EzdecBaseWebPage {
@SpringBean
private IDeclarationService declarationService;

AjaxFallbackLink reenterPinLink;

public InitiateDeclarationPage() {
final Declaration declaration = new 
Declaration(EzdecSession.getCurrentUser().getAccount(),
EzdecSession.getCurrentUser(), , County.COOK, 
State.ILLINOIS);

//final FeedbackPanel feedback = new FeedbackPanel(feedback);
//feedback.setOutputMarkupId(true);
//add(feedback);
add(new FeedbackPanel(feedback));

final Form form = new Form(initiateDeclarationForm, new 
CompoundPropertyModelDeclaration(declaration));
   
form.add(new Button(submitButton) {

@Override
public void onSubmit() {
Declaration declaration = (Declaration) 
form.getModelObject();

declaration.setStatus(Status.OPEN);
ParcelIdentification pin = 
declarationService.findParcelIdentification(declaration.getPin());

if (pin == null) {
error(No PIN found for PIN  + 
getFormattedPIN(declaration.getPin()));

} else {
if 
(declarationService.initiateDeclaration(declaration)) {
EzdecSession.get().info(Declaration  + 
declaration.getTxNumber() +  created);
setResponsePage(new 
DeclarationPage(declaration, 0, pin));

} else {
error(Creating declaration with PIN:  + 
declaration.getPin());

}
}
}
});

final PINTextField pinText = new PINTextField(pin);
pinText.setRequired(true);
pinText.setOutputMarkupId(true);
form.add(pinText);
   
form.add(new DropDownChoice(county, 
Arrays.asList(County.values()))

 .setRequired(true)
 .setEnabled(false));

final WebMarkupContainer parent = new 
WebMarkupContainer(verifyPanelWmc);

parent.setOutputMarkupPlaceholderTag(true);
parent.setVisible(false);
form.add(parent);

final AjaxSubmitLink verifyPinLink = new 
AjaxSubmitLink(verifyPinLink) {

@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
Declaration declaration = (Declaration) 
form.getModelObject();
ParcelIdentification pid = 
declarationService.findParcelIdentification(declaration.getPin());

if (pid == null) {
error(No PIN found for PIN  +
declaration.getPin());
} else {

Re: Feedback Messages Not Getting Displayed When Using AjaxSubmitLink

2009-06-19 Thread jpalmer1026

Actually, validation messages are now getting displayed for validation
performed on components but I am still unable to get error messages that I
have added to be displayed. For example, in the following code, I need a way
to display the line No PIN found for PIN but I am not sure how to do that.
Any ideas?

final AjaxSubmitLink verifyPinLink = new AjaxSubmitLink(verifyPinLink) {
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
//target.addComponent(feedback);
//onError(target, form);

Declaration declaration = (Declaration)
form.getModelObject();
ParcelIdentification pid =
declarationService.findParcelIdentification(declaration.getPin());
if (pid == null) {
error(No PIN found for PIN  + declaration.getPin());
} else {
InitiateDeclarationVerifyPanel decVerifyPanel = new
InitiateDeclarationVerifyPanel(verifyPanel, pid);
parent.addOrReplace(decVerifyPanel);
parent.setVisible(true);
this.setEnabled(false);
reenterPinLink.setVisible(true);
target.addComponent(this);
target.addComponent(parent);
target.addComponent(reenterPinLink);
}
}

@Override
public void onError(AjaxRequestTarget target, Form form) {
target.addComponent(feedback);
}
};


jpalmer1026 wrote:
 
 I called target.addComponent for the feedbackpanel but still no luck. My
 updated code is as follows:
 
  final AjaxSubmitLink verifyPinLink = new AjaxSubmitLink(verifyPinLink)
 {
 @Override
 public void onSubmit(AjaxRequestTarget target, Form form) {
 target.addComponent(feedback);
 onError(target, form);
 
 Declaration declaration = (Declaration)
 form.getModelObject();
 ParcelIdentification pid =
 declarationService.findParcelIdentification(declaration.getPin());
 if (pid == null) {
 error(No PIN found for PIN  + declaration.getPin());
 } else {
 InitiateDeclarationVerifyPanel decVerifyPanel = new
 InitiateDeclarationVerifyPanel(verifyPanel, pid);
 parent.addOrReplace(decVerifyPanel);
 parent.setVisible(true);
 this.setEnabled(false);
 reenterPinLink.setVisible(true);
 target.addComponent(this);
 target.addComponent(parent);
 target.addComponent(reenterPinLink);
 }
 }
 };
 
 Erik van Oosten wrote:
 
 You did not call target.addComponent for the feedbackpanel or any of its 
 parents.
 
 Regards,
 Erik.
 
 
 jpalmer1...@mchsi.com schreef:
 I am using an AjaxSubmitLink to submit form data. Using this, however, 
 is preventing feedback messages from being displayed.

 My code is as follows:

 public class InitiateDeclarationPage extends EzdecBaseWebPage {
 @SpringBean
 private IDeclarationService declarationService;

 AjaxFallbackLink reenterPinLink;

 public InitiateDeclarationPage() {
 final Declaration declaration = new 
 Declaration(EzdecSession.getCurrentUser().getAccount(),
 EzdecSession.getCurrentUser(), , County.COOK, 
 State.ILLINOIS);
 //final FeedbackPanel feedback = new FeedbackPanel(feedback);
 //feedback.setOutputMarkupId(true);
 //add(feedback);
 add(new FeedbackPanel(feedback));

 final Form form = new Form(initiateDeclarationForm, new 
 CompoundPropertyModelDeclaration(declaration));

 form.add(new Button(submitButton) {
 @Override
 public void onSubmit() {
 Declaration declaration = (Declaration) 
 form.getModelObject();
 declaration.setStatus(Status.OPEN);
 ParcelIdentification pin = 
 declarationService.findParcelIdentification(declaration.getPin());
 if (pin == null) {
 error(No PIN found for PIN  + 
 getFormattedPIN(declaration.getPin()));
 } else {
 if 
 (declarationService.initiateDeclaration(declaration)) {
 EzdecSession.get().info(Declaration  + 
 declaration.getTxNumber() +  created);
 setResponsePage(new 
 DeclarationPage(declaration, 0, pin));
 } else {
 error(Creating declaration with PIN:  + 
 declaration.getPin());
 }
 }
 }
 });

 final PINTextField pinText = new PINTextField(pin);
 pinText.setRequired(true);
 pinText.setOutputMarkupId(true);
 form.add(pinText);

Re: Feedback Messages Not Getting Displayed When Using AjaxSubmitLink

2009-06-19 Thread Luther Baker
I'm not at a computer to try this ... but I do this all the time so it
definitely works like you're hoping.

You've posted alot of code so its a bit difficult to trace what is commented
out and what is not ... but starting with your original post, uncomment the
following:

final FeedbackPanel feedback = new FeedbackPanel(feedback);
feedback.setOutputMarkupId(true);
add(feedback);

Now, be sure to add this (I think this is the part you're missing - or I
missed in reading your snippets):

feedback.setOutputMarkupPlaceholderTag(true);

And then make sure you add it to the target in the submit handler:

target.addComponent(feedback);

I think you're doing/done all of this at one time with varied components -
but my guess is that you've got to double check and make sure you're doing
all three things specifically for the feedback panel.

Hope this helps,

-Luther



Its hard to tell what

On Fri, Jun 19, 2009 at 4:21 PM, jpalmer1026 jpalmer1...@mchsi.com wrote:


 Actually, validation messages are now getting displayed for validation
 performed on components but I am still unable to get error messages that I
 have added to be displayed. For example, in the following code, I need a
 way
 to display the line No PIN found for PIN but I am not sure how to do
 that.
 Any ideas?

 final AjaxSubmitLink verifyPinLink = new AjaxSubmitLink(verifyPinLink) {
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
 //target.addComponent(feedback);
 //onError(target, form);

Declaration declaration = (Declaration)
 form.getModelObject();
ParcelIdentification pid =
 declarationService.findParcelIdentification(declaration.getPin());
if (pid == null) {
error(No PIN found for PIN  + declaration.getPin());
} else {
InitiateDeclarationVerifyPanel decVerifyPanel = new
 InitiateDeclarationVerifyPanel(verifyPanel, pid);
parent.addOrReplace(decVerifyPanel);
parent.setVisible(true);
this.setEnabled(false);
reenterPinLink.setVisible(true);
target.addComponent(this);
target.addComponent(parent);
target.addComponent(reenterPinLink);
}
}

 @Override
public void onError(AjaxRequestTarget target, Form form) {
target.addComponent(feedback);
}
};


 jpalmer1026 wrote:
 
  I called target.addComponent for the feedbackpanel but still no luck. My
  updated code is as follows:
 
   final AjaxSubmitLink verifyPinLink = new AjaxSubmitLink(verifyPinLink)
  {
  @Override
  public void onSubmit(AjaxRequestTarget target, Form form) {
  target.addComponent(feedback);
  onError(target, form);
 
  Declaration declaration = (Declaration)
  form.getModelObject();
  ParcelIdentification pid =
  declarationService.findParcelIdentification(declaration.getPin());
  if (pid == null) {
  error(No PIN found for PIN  +
 declaration.getPin());
  } else {
  InitiateDeclarationVerifyPanel decVerifyPanel = new
  InitiateDeclarationVerifyPanel(verifyPanel, pid);
  parent.addOrReplace(decVerifyPanel);
  parent.setVisible(true);
  this.setEnabled(false);
  reenterPinLink.setVisible(true);
  target.addComponent(this);
  target.addComponent(parent);
  target.addComponent(reenterPinLink);
  }
  }
  };
 
  Erik van Oosten wrote:
 
  You did not call target.addComponent for the feedbackpanel or any of its
  parents.
 
  Regards,
  Erik.
 
 
  jpalmer1...@mchsi.com schreef:
  I am using an AjaxSubmitLink to submit form data. Using this, however,
  is preventing feedback messages from being displayed.
 
  My code is as follows:
 
  public class InitiateDeclarationPage extends EzdecBaseWebPage {
  @SpringBean
  private IDeclarationService declarationService;
 
  AjaxFallbackLink reenterPinLink;
 
  public InitiateDeclarationPage() {
  final Declaration declaration = new
  Declaration(EzdecSession.getCurrentUser().getAccount(),
  EzdecSession.getCurrentUser(), , County.COOK,
  State.ILLINOIS);
  //final FeedbackPanel feedback = new FeedbackPanel(feedback);
  //feedback.setOutputMarkupId(true);
  //add(feedback);
  add(new FeedbackPanel(feedback));
 
  final Form form = new Form(initiateDeclarationForm, new
  CompoundPropertyModelDeclaration(declaration));
 
  form.add(new Button(submitButton) {
  @Override
   

Re: Feedback messages disappearing before display

2008-08-11 Thread nanotech

Hi,

I believe you want to display the feedback message in TestPage. If so,
do something like this:
1. make sure you have feedback panel added on the page where you will be
landing after redirect.
2. Then you can get hold of the feedback panel in the current page like
shown below:

FeedbackPanel feedback = (FeedbackPanel)
responsePage.get(responsePage-feedbackPanel);
getSession().info(You pased the test);

So your code would look like:
if (isTestPassed()) {
...
} else 
{
// response Page is the page where you will be going. In your case TestPage.
FeedbackPanel feedback = (FeedbackPanel)
responsePage.get(responsePage-feedbackPanel);
getSession().info(You did not pass the test);
setResponsePage(TestPage.class);
}



insom wrote:
 
 I have a submit button that adds a message to my FeedbackPanel, like so:
 
 if (isTestPassed()) {
   ...
 } else {
   setResponsePage(TestPage.class);
   info(You didn't pass the test...);
 }
 
 However, when the browser gets to the TestPage, it doesn't display any
 messages. I stepped through the process in Eclipse. Running
 getSession().getFeedbackMesages() in the debugger shows that the message
 did get registered. However, when it gets to line 1367 in RequestCycle
 (Wicket 1.3.4), the message is removed. Here is the relevant code from
 RequestCycle:
 
 1361  finally
 1362  {
 1363  // set step manually to clean up
 1364  currentStep = DETACH_REQUEST;
 1365  
 1366  // clean up the request
 1367  detach();  -- This is where the message 
 disappears
 1368  
 1369  // set step manually to done
 1370  currentStep = DONE;
 1371  }
 
 I have no idea what to do to fix this. Any suggestions?
 

-- 
View this message in context: 
http://www.nabble.com/Feedback-messages-disappearing-before-display-tp18932342p18932704.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: Feedback messages disappearing before display

2008-08-11 Thread insom

I tried to follow your suggestions, but it is still not displaying messages
in the panel.


nanotech wrote:
 
 I believe you want to display the feedback message in TestPage.
 

Yes, that's correct. TestPage extends BaseTemplate, which contains this:

BaseTemplate.java:
MessagePanel messagePanel = new MessagePanel(messages){
private static final long serialVersionUID = 1L;
public boolean isVisible()
{
return anyMessage();
}
}; 
add(messagePanel);  

BaseTemplate.html:
div wicket:id=messages style=width: 600px; margin-left: 100px;This is
the spot for error/info messages/div
wicket:childThis is where TestPage is included/wicket:child

MessagePanel trivially extends FeedbackPanel:

MessagePanel.java:
public abstract class MessagePanel extends FeedbackPanel
{
public MessagePanel(final String id)
{
super(id);  
}
}


nanotech wrote:
 
 If so, do something like this:
 1. make sure you have feedback panel added on the page where you will be
 landing after redirect.
 

If I understand Wicket inheritance, that is taken care of with what I showed
above.


nanotech wrote:
 
 2. Then you can get hold of the feedback panel in the current page like
 shown below:
 
 FeedbackPanel feedback = (FeedbackPanel)
 responsePage.get(responsePage-feedbackPanel);
 getSession().info(You pased the test);
 

Here's how I tried to implement your advice. I wasn't clear on what you
meant by responsePage.get(responsePage-feedbackPanel), so I tried
instantiating TestPage for that, as you can see below. I'm afraid it didn't
work, though:

if (isTestPassed()) {
  ...
} else {
TestPage testPage = new TestPage();
MessagePanel feedback = (MessagePanel)testPage.get(messages); 
info(You didn't pass the test...);
setResponsePage(TestPage.class);
}

Can you tell me what I'm doing wrong? Thanks for your time and help.
-- 
View this message in context: 
http://www.nabble.com/Feedback-messages-disappearing-before-display-tp18932342p18933293.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: Feedback messages disappearing before display

2008-08-11 Thread Matej Knopp
If you want to show messages on another page you need to use session
feedback messages (getSession().info)

-Matej

On Mon, Aug 11, 2008 at 9:47 PM, insom [EMAIL PROTECTED] wrote:

 I have a submit button that adds a message to my FeedbackPanel, like so:

 if (isTestPassed()) {
...
 } else {
setResponsePage(TestPage.class);
info(You didn't pass the test...);
 }

 However, when the browser gets to the TestPage, it doesn't display any
 messages. I stepped through the process in Eclipse. Running
 getSession().getFeedbackMesages() in the debugger shows that the message did
 get registered. However, when it gets to line 1367 in RequestCycle (Wicket
 1.3.4), the message is removed. Here is the relevant code from RequestCycle:

 1361  finally
 1362{
 1363// set step manually to clean up
 1364currentStep = DETACH_REQUEST;
 1365
 1366// clean up the request
 1367detach();  -- This is where the message disappears
 1368
 1369// set step manually to done
 1370currentStep = DONE;
 1371}

 I have no idea what to do to fix this. Any suggestions?
 --
 View this message in context: 
 http://www.nabble.com/Feedback-messages-disappearing-before-display-tp18932342p18932342.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]



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



Re: Feedback messages disappearing before display

2008-08-11 Thread Matej Knopp
If you want to show messages on another page you need to use session
feedback messages (getSession().info)

-Matej

On Mon, Aug 11, 2008 at 9:47 PM, insom [EMAIL PROTECTED] wrote:

 I have a submit button that adds a message to my FeedbackPanel, like so:

 if (isTestPassed()) {
...
 } else {
setResponsePage(TestPage.class);
info(You didn't pass the test...);
 }

 However, when the browser gets to the TestPage, it doesn't display any
 messages. I stepped through the process in Eclipse. Running
 getSession().getFeedbackMesages() in the debugger shows that the message did
 get registered. However, when it gets to line 1367 in RequestCycle (Wicket
 1.3.4), the message is removed. Here is the relevant code from RequestCycle:

 1361  finally
 1362{
 1363// set step manually to clean up
 1364currentStep = DETACH_REQUEST;
 1365
 1366// clean up the request
 1367detach();  -- This is where the message disappears
 1368
 1369// set step manually to done
 1370currentStep = DONE;
 1371}

 I have no idea what to do to fix this. Any suggestions?
 --
 View this message in context: 
 http://www.nabble.com/Feedback-messages-disappearing-before-display-tp18932342p18932342.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]



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



Re: Feedback messages disappearing before display

2008-08-11 Thread insom

That solved it. I'm surprised -- considering that the original
getSession().getFeedbackMessages() showed the message, I had assumed that it
was being attached to the session. I guess I still have a lot to learn :)
Thanks for your help.


Matej Knopp-2 wrote:
 
 If you want to show messages on another page you need to use session
 feedback messages (getSession().info)
 
 -Matej
 

-- 
View this message in context: 
http://www.nabble.com/Feedback-messages-disappearing-before-display-tp18932342p18933971.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: Feedback messages and setResponsePage

2007-11-16 Thread narup

hello i am upgrading from wicket 1.2.6 to 1.3 rc1, and feedback messaging is
not showing up with setResponse page.

i am doing
Page userPage = getUserPage();
//1.2.6 version code which was fine
// userPage.getFeedbackMessage().info(userPage, getUser().getDescription() +
 Saved);
//now i changed above line to this
 getSession().getFeedbackMessages().info(EditUserPage.this,
getUser().getDescription() +  Saved);
setResponsePage(userPage);

but this doesn't work!! not sure what's wrong .
thanks



igor.vaynberg wrote:
 
 getsession().info/error/warn will work across pages
 
 -igor
 
 
 On 10/5/07, dkarnows [EMAIL PROTECTED] wrote:

 Greetings,

 I've noticed when I do:
   info(blah blah blah);
   setResponsePage(...);
 that whether or not the feedback displays seems to be dependent on which
 version of setResponsePage() I call. If I call this version:
   setResponsePage(Page page)  (e.g. setResponsePage(new FooPage());)
 I see the feedback, but if I call this version:
   setResponsePage(java.lang.Class cls)   (e.g.
 setResponsePage(FooPage.class);)
 I don't see the feedback.

 I'm new to Wicket (using 1.3 beta) so grateful for any help. Is this
 expected?

 thanks,
 David

 --
 View this message in context:
 http://www.nabble.com/Feedback-messages-and-setResponsePage-tf4576987.html#a13065185
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Feedback-messages-and-setResponsePage-tf4576987.html#a13800146
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: Feedback messages and setResponsePage

2007-11-16 Thread Eelco Hillenius
On Nov 16, 2007 11:36 AM, narup [EMAIL PROTECTED] wrote:

 hello i am upgrading from wicket 1.2.6 to 1.3 rc1, and feedback messaging is
 not showing up with setResponse page.

 i am doing
 Page userPage = getUserPage();
 //1.2.6 version code which was fine
 // userPage.getFeedbackMessage().info(userPage, getUser().getDescription() +
  Saved);
 //now i changed above line to this
  getSession().getFeedbackMessages().info(EditUserPage.this,
 getUser().getDescription() +  Saved);
 setResponsePage(userPage);

You should try userPage.info or getSession().info. As far as I am
concerned, it is very unfortunately that FeedbackMessages proper ever
got exposed.

Eelco

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



Re: Feedback messages and setResponsePage

2007-10-05 Thread Igor Vaynberg
getsession().info/error/warn will work across pages

-igor


On 10/5/07, dkarnows [EMAIL PROTECTED] wrote:

 Greetings,

 I've noticed when I do:
   info(blah blah blah);
   setResponsePage(...);
 that whether or not the feedback displays seems to be dependent on which
 version of setResponsePage() I call. If I call this version:
   setResponsePage(Page page)  (e.g. setResponsePage(new FooPage());)
 I see the feedback, but if I call this version:
   setResponsePage(java.lang.Class cls)   (e.g.
 setResponsePage(FooPage.class);)
 I don't see the feedback.

 I'm new to Wicket (using 1.3 beta) so grateful for any help. Is this
 expected?

 thanks,
 David

 --
 View this message in context: 
 http://www.nabble.com/Feedback-messages-and-setResponsePage-tf4576987.html#a13065185
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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