You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michał Jedynak <m....@gmail.com> on 2009/07/31 13:39:42 UTC
[T5.1] change style of client side validation
Hello!
Is there an easy way to change style of client side validation?
I would like to have the same look as in server side (not a bubble), but I
don't want to turn it off (by setting ' clientValidation="false" ').
--
Michał
--
View this message in context: http://www.nabble.com/-T5.1--change-style-of-client-side-validation-tp24755039p24755039.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: [T5.1] change style of client side validation
Posted by "Robin K." <ro...@atosorigin.com>.
I already made that.
We were trying to change the popup position , style and associated event.
You just have to create a news JS that will override some of the existing
Tapestry.js class and method.
Look the Tapestry.ErrorPopup class in particular.
You will need some Prototype functions:
- Object.extend(dest, src) -> alteredDest
see: http://www.prototypejs.org/api/object/extend
- create([superclass][, methods...]) -> Class
see: http://www.prototypejs.org/api/class/create
To automatically add a new JS file to all your pages, you've got to
contribute to MarkupRenderer:
public void
contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter>
configuration, final Environment environment) {
MarkupRendererFilter myScriptGlobalSupport = new MarkupRendererFilter()
{
public void renderMarkup(MarkupWriter writer, MarkupRenderer
renderer) {
RenderSupport support = environment.peek(RenderSupport.class);
support.addClasspathScriptLink(new String[]
{"path/to/my/script.js","path/to/another/script.js"});
renderer.renderMarkup(writer);
}
};
configuration.add("myScriptGlobalSupport",
"myScriptGlobalSupport","after:RenderSupport");
}
Regards,
Robin K
-- Atos Worldline
Michał Jedynak wrote:
>
> Hello!
>
> Is there an easy way to change style of client side validation?
> I would like to have the same look as in server side (not a bubble), but I
> don't want to turn it off (by setting ' clientValidation="false" ').
>
> --
> Michał
>
--
View this message in context: http://www.nabble.com/-T5.1--change-style-of-client-side-validation-tp24755039p24755490.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