Re: Can I make AjaxFormSubmitBehavior submit raw form data but not validate it?

2009-06-02 Thread dfernandez


Yes, I know it is tricky, but the fact is I don't think I would really need
type conversion in this case.

I will try to explain myself. I have the following UI:

|OPERATOR |V|

|INPUT1=aBc| |INPUT2=DeF  |

...being OPERATOR the DropDownChoice, and both INPUT1 and INPUT2 two
TextFields (String TextFields, to be precise). Both INPUT1 and INPUT2 are
required (when they are visible, of course).

When I change the value on OPERATOR, the UI will change, hiding INPUT1 and
INPUT2 but showing INPUT3, another TextField which should have the same
contents that were on INPUT1 before:

|OPERATOR |V|

|INPUT3=aBc|

The problem is that, when changing OPERATOR, I need to read the value from
INPUT1 to set it into INPUT3, but if INPUT2 is empty I will receive a
validation message telling me that it is required... which it is, but I just
want Wicket to validate that when I want to *really* submit the form, and
not now that I am only changing the operator.

Thanks.

Regards,
Daniel.





igor.vaynberg wrote:
 
 how are you planning on reading the other values? you cannot access
 the model so you will have to call getinput(), are you also planning
 on doing type conversion yourself then?
 
 -igor
 
 2009/6/2 Daniel Fernández dfernan...@users.sourceforge.net:
 Hello,

 I have a form with a DropDownChoice, on which onchange event I want to
 update some form components. But I need to read data from other fields of
 the form for doing so, and so I added an AjaxFormSubmitBehavior to the
 DropDownChoice.

 My intention is to read the data from the drop down and from the other
 fields, and depending on these data, update some other components... but
 the
 problem is that AjaxFormSubmitBehavior not only sends the form data, but
 also *validates it*, which I don't want (I don't want validation messages
 to
 appear when changing the value of the drop down).

 If it where an AjaxButton I would be able to just
 setDefaultFormProcessing(false), but I don't see anything like that in
 AjaxFormSubmitBehavior...

 Is there a way to do this?

 Regards,
 Daniel.

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

-- 
View this message in context: 
http://www.nabble.com/Can-I-make-AjaxFormSubmitBehavior-submit-raw-form-data-but-not--validate-it--tp23830542p23835836.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Problem with bad CSS path after validation

2008-02-13 Thread dfernandez


Hello all,

I am having problems with the path that Wicket builds for my CSS sheet. I
have a BasePage which has:

add(HeaderContributor.forCss(css/styles.css));

And a sign-in page that extends this BasePage is mounted like this at the
Application init() method:

mountBookmarkablePage(/aaa/signIn,  SignInPage.class);

The problem is, when I load this page I get a correct CSS path, like this:

link rel=stylesheet type=text/css href=../css/styles.css /

And when I input incorrect data in the form, I get a message in my feedback
panel and I am redirected to the same page, but this time the URL is not
/aaa/signIn, but /?wicket:interface=:5.

This time the page renders correctly, but there is no CSS! And that is
because, if I see the HTML, the link tag for this CSS sheet is:

link rel=stylesheet type=text/css href=../css/styles.css /

Instead of what it should be: css/styles.css

What can be happening here?

In case this helps, I am applying the Wicket filter to /*.

Many thanks,
Daniel.

-- 
View this message in context: 
http://www.nabble.com/Problem-with-bad-CSS-path-after-validation-tp15455620p15455620.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: Problem with bad CSS path after validation

2008-02-13 Thread dfernandez



dfernandez wrote:
 
 
 In case this helps, I am applying the Wicket filter to /*.
 
 

But: if I switch the filter-mapping to /app/*... it works!

Is this normal? /* filter mapping is supposed to be allowed, isn't it? The
quickstart application in Wicket in Action uses it...

Regards,
Daniel.


-- 
View this message in context: 
http://www.nabble.com/Problem-with-bad-CSS-path-after-validation-tp15455620p15456852.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]