You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by George Christman <gc...@cardaddy.com> on 2012/06/14 19:07:06 UTC

Disable clientside x on serverside validation

Is there a way to disable the clientside x from appearing when a server side
error returns. I use it for clientside validation, so I don't want to
completely disable it with css.  

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Disable-clientside-x-on-serverside-validation-tp5713893.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Disable clientside x on serverside validation

Posted by George Christman <gc...@cardaddy.com>.
Excellent, I use 5.3x thanks Steve.

-George

----- Reply message -----
From: "Steve Eynon [via Tapestry]" <ml...@n5.nabble.com>
Date: Thu, Jun 14, 2012 1:24 pm
Subject: Disable clientside x on serverside validation
To: "George Christman" <gc...@cardaddy.com>



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Disable-clientside-x-on-serverside-validation-tp5713893p5713897.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Disable clientside x on serverside validation

Posted by George Christman <gc...@cardaddy.com>.
Yup, figured it out already. Thanks Steve. 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Disable-clientside-x-on-serverside-validation-tp5713893p5713937.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Disable clientside x on serverside validation

Posted by Steve Eynon <st...@alienfactory.co.uk>.
That's not a server class, that's done in JavaScript. Look at the
createUI() function in Tapestry.ErrorPopup around line 1300 in
tapestry.js

You may have to monkey patch the JS with your own function(s) / class.

Steve.
--
Steve Eynon
-------------------------------
"If at first you don't succeed,
   so much for skydiving!"



On 15 June 2012 22:08, George Christman <gc...@cardaddy.com> wrote:
> Steven, do you happen to know what class handles the tjq-error-popup div?
> After looking at this closely, it might make better sense to create a new
> Validation Decorator, I was using css to alter the x img to a V pointer from
> the bubble to the field. Might be easier to just include that with the
> tjq-error-popup div and remove the x img.
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Disable-clientside-x-on-serverside-validation-tp5713893p5713927.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Disable clientside x on serverside validation

Posted by George Christman <gc...@cardaddy.com>.
I figured this out, just needed to override the js. 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Disable-clientside-x-on-serverside-validation-tp5713893p5713933.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Disable clientside x on serverside validation

Posted by George Christman <gc...@cardaddy.com>.
Steven, do you happen to know what class handles the tjq-error-popup div?
After looking at this closely, it might make better sense to create a new
Validation Decorator, I was using css to alter the x img to a V pointer from
the bubble to the field. Might be easier to just include that with the
tjq-error-popup div and remove the x img. 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Disable-clientside-x-on-serverside-validation-tp5713893p5713927.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Disable clientside x on serverside validation

Posted by Steve Eynon <st...@alienfactory.co.uk>.
This is only easily done in the later T5.3.x releases. You need to
override the ValidationDecoratorFactory with your local service:

  public static void bind(ServiceBinder binder) {
    binder.bind(ValidationDecoratorFactory.class,
MyValidationDecoratorFactory.class).withSimpleId();
    }

  public static void
contributeServiceOverride(MappedConfiguration<Class<?>, Object>
config, @Local ValidationDecoratorFactory factory) {
    config.add(ValidationDecoratorFactory.class, factory);
  }

Then have your Factory return your own instance of ValidationDecorator
- I'd base it on, or extend, T5's default BaseValidationDecorator.

Steve.
--
Steve Eynon
-------------------------------
"If at first you don't succeed,
   so much for skydiving!"



On 15 June 2012 01:07, George Christman <gc...@cardaddy.com> wrote:
> Is there a way to disable the clientside x from appearing when a server side
> error returns. I use it for clientside validation, so I don't want to
> completely disable it with css.
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Disable-clientside-x-on-serverside-validation-tp5713893.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org