Re: Is there an ajax WizardButton to use in a wizard inside a ModalWindow?

2008-10-08 Thread AshleyAbraham

Yes, I did make it to work by creating those two Ajax buttons and putting
them in a class which extends WizardButtonBar class and overrided the
newButtonBar() in the Wizard class to pass that. Its been a while since I
did it, so I dont have the exact details on the tip of my finger.

Hope it helps,
Ashley


fstof wrote:
 
 Hey man, I'm looking for something similar,
 have you got it working?
 
 
 AshleyAbraham wrote:
 
 Just to clarify: I have created three classes, the parent class is the
 AjaxWizardButton similar to Wicket's WizardButton and the two child
 classes are AjaxCancelButton and AjaxFinishButton similar to Wicket's
 CancelButton and FinishButton.
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Is-there-an-ajax-WizardButton-to-use-in-a-wizard-inside-a-ModalWindow--tp15978434p19889465.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: Submit a form and ignore nested forms

2008-04-08 Thread AshleyAbraham

Hi everyone,
I have a question regarding IFormVisitorParticpant, I implement
IFormVisitorParticpant in a panel where my nested form resides,  the form
has formcomponents which are set to required. When the processChildren() is
set to return false everything works as normall, none of the formcomponents
are visited. But, when I add a IFormValidator to my nested form, the root
form somehow validates the validator which I add to the nested/sub form. Is
this how its suppose to work? how can I make the root form not to validate
the sub form's validator? I really appreciate your response... thanks

Ashley



AshleyAbraham wrote:
 
 Igor,
 Thank u for your fast response...
 
 Thanks again,
 Ashley
 
 
 
 Pills wrote:
 
 Hi everybody,
 
 I'm using nested forms in my web app to provide to the user a simple way
 for editting a product and its stock state at the same time (PRODUCTS and
 STOCKS are bound with a relation 1-n in my database). So I've defined a
 form for each of my tables.  
 
 When I submit a nested form (in this case, the form STOCK), Wicket
 doesn't care about the master form (PRODUCTS) and that's fine. But when I
 submit the master form, Wicket does the validation of all the nested
 forms, and obviously it failed because the nested forms aren't filled... 
 
 How can I tell to Wicket to ignore the nested forms when submitting
 theire parent? I won't use the setDefaultFormProcessing(false), because
 it forces me to handle the validity of fields and the feedback
 messages...
 
 Is there a way to do what I need?
 
 Thank you for your help ;)
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Submit-a-form-and-ignore-nested-forms-tp13794970p16575383.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: Nabble users: don't edit your posts!

2008-03-12 Thread AshleyAbraham

One other reason why Nabble resends the message is if someone posts a message
and if it hasn't been accepted yet, Nabble puts these notices saying your
message has not been accepted so try posting your message again... for
someone new to Nabble forum they think they need repost their message again,
which also makes them think I can edit my message since I am reposting it.
This has happened to me recently and I am sorry to repost and edit it and
won't repeat it again.

Ashley


Martijn Dashorst wrote:
 
 On 3/12/08, Sebastiaan van Erk [EMAIL PROTECTED] wrote:
 Considering the number of times certain questions are asked on this list
  that are answered 1000 times in the archive, I'm kind of afraid this
  isn't really going to help (unless it's posted frequently).
 
 I know, but not asking is most certainly not going to help.
 
  Is it not possible for nabble to disable the edit function for
  specifically the wicket lists? In the last 24 hours there have been at
  least 8 double posts!
 
 I asked, and they don't have that facility. Maybe if you ask too
 (support at nabble.com), and others that see this as a problem, they
 will fix it. Until then...
 
 Martijn
 
 -- 
 Buy Wicket in Action: http://manning.com/dashorst
 Apache Wicket 1.3.1 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Nabble-users%3A-don%27t-edit-your-posts%21-tp15999424p16002546.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]



Is there an ajax WizardButton to use in a wizard inside a ModalWindow?

2008-03-11 Thread AshleyAbraham

Hi everyone, 
I am using a Wizard inside a ModalWindow and I am trying to close the
ModalWindow when the CancelButton or FinishButton is clicked. When one of
those button's are clicked nothing happens, and I've found out that I need
to use either AjaxButton or AjaxLink to make it work. Is there an
AjaxWizardButton available to use in Wicket? basically I am looking for
AjaxCancelButton and AjaxFinishButton.

I have created my own...but I didn't want to redo something which is
available already. Please advice if there is an easy to do what I am trying
to do?

here is what I have

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.extensions.wizard.IWizard;
import org.apache.wicket.extensions.wizard.IWizardModel;
import org.apache.wicket.extensions.wizard.WizardButton;
import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.model.ResourceModel;

public abstract class AjaxWizardButton extends AjaxButton {

private static final long serialVersionUID = 1L;
private final IWizard wizard;

public AjaxWizardButton(String id, IWizard wizard, final Form form,
String labelResourceKey){
super(id, form);
this.setLabel(new ResourceModel(labelResourceKey));
this.wizard = wizard;
}

public AjaxWizardButton(String id, IWizard wizard, String
labelResourceKey)
{
this(id, wizard, null, labelResourceKey);
}

protected final IWizard getWizard()
{
return wizard;
}

protected final IWizardModel getWizardModel()
{
return getWizard().getWizardModel();
}
   
protected final void onSubmit(AjaxRequestTarget target, Form form){
onClick(target, form);
}

protected abstract void onClick(AjaxRequestTarget target, Form form);
}

Thanks
Ashley
-- 
View this message in context: 
http://www.nabble.com/Is-there-an-ajax-WizardButton-to-use-in-a-wizard-inside-a-ModalWindow--tp15978434p15978434.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: Is there an ajax WizardButton to use in a wizard inside a ModalWindow?

2008-03-11 Thread AshleyAbraham



AshleyAbraham wrote:
 
 Hi everyone, 
 I am using a Wizard inside a ModalWindow and I am trying to close the
 ModalWindow when the CancelButton or FinishButton is clicked. When one of
 those button's are clicked nothing happens, and I've found out that I need
 to use either AjaxButton or AjaxLink to make it work. Is there an
 AjaxWizardButton available to use in Wicket? basically I am looking for
 AjaxCancelButton and AjaxFinishButton.
 
 I have created my own AjaxCancelButton and AjaxFinishButton...but I didn't
 want to redo something which is available already. Please advice if there
 is an easy to do what I am trying to do?
 
 here is what I have for the AjaxWizardButton
 
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.extensions.wizard.IWizard;
 import org.apache.wicket.extensions.wizard.IWizardModel;
 import org.apache.wicket.extensions.wizard.WizardButton;
 import org.apache.wicket.markup.html.form.Button;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.ResourceModel;
 
 public abstract class AjaxWizardButton extends AjaxButton {
 
   private static final long serialVersionUID = 1L;
 private final IWizard wizard;
 
 public AjaxWizardButton(String id, IWizard wizard, final Form form,
 String labelResourceKey){
 super(id, form);
 this.setLabel(new ResourceModel(labelResourceKey));
 this.wizard = wizard;
 }
 
 public AjaxWizardButton(String id, IWizard wizard, String
 labelResourceKey)
 {
 this(id, wizard, null, labelResourceKey);
 }
 
 protected final IWizard getWizard()
 {
 return wizard;
 }
 
 protected final IWizardModel getWizardModel()
 {
 return getWizard().getWizardModel();
 }

 protected final void onSubmit(AjaxRequestTarget target, Form form){
   onClick(target, form);
 }
 
 protected abstract void onClick(AjaxRequestTarget target, Form form);
 }
 
 Thanks
 Ashley
 

Just to clarify: I have created three classes, the parent class is the
AjaxWizardButton similar to Wicket's WizardButton and the two child classes
are AjaxCancelButton and AjaxFinishButton similar to Wicket's CancelButton
and FinishButton.

-- 
View this message in context: 
http://www.nabble.com/Is-there-an-ajax-WizardButton-to-use-in-a-wizard-inside-a-ModalWindow--tp15978434p15987313.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]



Having problems with resource keys in a form which has two panels of the same kind

2008-03-06 Thread AshleyAbraham

Hi everyone, 
 I am having problems with finding resource keys for formComponents in a
form which has two panels of the same kind. My formcomponents are inside
couple levels of panels from the form and I am having hard time to figure
out the resource key for those formComponents. Is there an easy way to
figure out the resource key for those formComponents?

I am using Wicket wizard and in one of the steps I have a WebMarkupContainer
(AddressGroupbox) which has two Panels (physicalAddress and mailingAddress)
which are of  the same class AddressPanel. The AddressPanel has
formComoponents like addressLine1, 2, 3, city, state, and zipCode in it, and
most of them are set as required. So, when I submit the empty form, all I am
getting is the general required error in the feedback.

I've tried setting the custom required error messages in that particular
WiardStep's properties file using
addressGroupbox.physicalAddress.addressLine1.Required=Physical Address Line
1 is required, and so on. But wicket is not finding the custom error
messages and it uses the default ones. But when I just put
addressLine1.Required=Address Line 1 is required in the WizardStep's
properties file, then both of the addressLine1 formcomponent from
physicalAddress and mailingAddress Panel uses the same error message for
addressLine1.

Can someone help me identify what I am doing wrong or what I should do or
how to find the resource key wicket is using to search for those two address
panels.

Thanks
Ashley
-- 
View this message in context: 
http://www.nabble.com/Having-problems-with-resource-keys-in-a-form-which-has-two-panels-of-the-same-kind-tp15881597p15881597.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: Submit a form and ignore nested forms

2008-02-29 Thread AshleyAbraham

Hi everyone, 
   I have a similar problem using Wizard, I have a idea but I dont know
whether its a right approach or is there an easy way to do it...

here is my thought, if I use a FormComponentPanel and put my nested form in
it, then override the processChildren() to return false. So, when the main
form starts processing it only processes FormComponentPanel's sibling and
not its children.

Any thougts...?

Thanks
Ashley



Pills wrote:
 
 Hi everybody,
 
 I'm using nested forms in my web app to provide to the user a simple way
 for editting a product and its stock state at the same time (PRODUCTS and
 STOCKS are bound with a relation 1-n in my database). So I've defined a
 form for each of my tables.  
 
 When I submit a nested form (in this case, the form STOCK), Wicket
 doesn't care about the master form (PRODUCTS) and that's fine. But when I
 submit the master form, Wicket does the validation of all the nested
 forms, and obviously it failed because the nested forms aren't filled... 
 
 How can I tell to Wicket to ignore the nested forms when submitting theire
 parent? I won't use the setDefaultFormProcessing(false), because it
 forces me to handle the validity of fields and the feedback messages...
 
 Is there a way to do what I need?
 
 Thank you for your help ;)
 

-- 
View this message in context: 
http://www.nabble.com/Submit-a-form-and-ignore-nested-forms-tp13794970p15767485.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: Submit a form and ignore nested forms

2008-02-29 Thread AshleyAbraham

Igor,
Thank u for your fast response...

Thanks again,
Ashley



Pills wrote:
 
 Hi everybody,
 
 I'm using nested forms in my web app to provide to the user a simple way
 for editting a product and its stock state at the same time (PRODUCTS and
 STOCKS are bound with a relation 1-n in my database). So I've defined a
 form for each of my tables.  
 
 When I submit a nested form (in this case, the form STOCK), Wicket
 doesn't care about the master form (PRODUCTS) and that's fine. But when I
 submit the master form, Wicket does the validation of all the nested
 forms, and obviously it failed because the nested forms aren't filled... 
 
 How can I tell to Wicket to ignore the nested forms when submitting theire
 parent? I won't use the setDefaultFormProcessing(false), because it
 forces me to handle the validity of fields and the feedback messages...
 
 Is there a way to do what I need?
 
 Thank you for your help ;)
 

-- 
View this message in context: 
http://www.nabble.com/Submit-a-form-and-ignore-nested-forms-tp13794970p15768833.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]



Wicket Wizard form need to add custom validation to each panel

2008-02-28 Thread AshleyAbraham

Hi everyone, 
   I am working on a wicket wizard component, I am trying to add an
AbstractFormValidation to each wizardStep, so when the wizardStep is
added/replaced the wizard form will know how to custom validate that
particular wizardStep.

Since I am not able to find or access the wizard form directly inside the
wizardStep I am overriding the getForm() in Wizard.class and instantiating
the form in my class's constructor so that getForm() wouldn't be null. The
problem which comes by doing that is all the validators are added to the
form and now it validates all the wizardSteps every time the form is
submitted. 

Can someone help me??? Also, Please point me if my approach is wrong. 

Basically what I would like is when the form is submitted I want the
activeWizardSteps validation to be validated.

Thanks
Ashley
-- 
View this message in context: 
http://www.nabble.com/Wicket-Wizard-form-need-to-add-custom-validation-to-each-panel-tp15746917p15746917.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]



Question about wicket:message

2007-12-13 Thread AshleyAbraham

I am trying to use wicket:message inside a tag in the following format
wicket:message=attribute:resource_identifier 

My question is the attribute which I am using is a custom attribute
ric:title (without quotes) and it also has a colon in it. How can I tell
wicket to ignore the colon in the attribute name...?

Currently, I have div wicket:message=ric:title:page.title /, the problem
is wicket takes the first colon which is part of my attribute name and takes
the rest as the resource property name and looks for it in the property file
and then throws an error.

So, how can I tell wicket to ignore or somehow escape the colon in the
attribute name...and still process it?

I tried using slash in front of it and it didn't work...any suggestions,
please help.

Thanks

-- 
View this message in context: 
http://www.nabble.com/Question-about-wicket%3Amessage-tp14326982p14326982.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]