You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Srikanth.NT" <nt...@gmail.com> on 2008/10/08 15:46:23 UTC

Validation on Custom Panel

Hi
I have built a new custom panel(custompanel.java) with 12 text fields. It
has a configuration file called custompanel.properties which has something
like 
component1.required=true
component2.required=true
component1.maxlength=200

These properties can be overridden by page.properties. When I read the
properties file from the constructor, 
new StringResourceModel(id, this, null).getObject().toString()
i did not get overriden values. Also I got some warn that I am trying to
access property before rendering the component. So I moved the constructing
stuff to the onBeforeRender method which then picked the correct overridden
values. But the problem is validation errors are missed.

Anybody used the properties file for the configuration of panel ?

-----
http://ntsrikanth.blogspot.com/
-- 
View this message in context: http://www.nabble.com/Validation-on-Custom-Panel-tp19879065p19879065.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Validation on Custom Panel

Posted by Martijn Dashorst <ma...@gmail.com>.
According to me you don't have to use SRM at all. If you use the
normal wicket validation mechanism, the resource bundles are picked up
automatically.

That validations are skipped is probably a bug in your code (for
example: setDefaultFormProcessing(false) in your code somewhere?)

Martijn

On Wed, Oct 8, 2008 at 3:46 PM, Srikanth.NT <nt...@gmail.com> wrote:
>
> Hi
> I have built a new custom panel(custompanel.java) with 12 text fields. It
> has a configuration file called custompanel.properties which has something
> like
> component1.required=true
> component2.required=true
> component1.maxlength=200
>
> These properties can be overridden by page.properties. When I read the
> properties file from the constructor,
> new StringResourceModel(id, this, null).getObject().toString()
> i did not get overriden values. Also I got some warn that I am trying to
> access property before rendering the component. So I moved the constructing
> stuff to the onBeforeRender method which then picked the correct overridden
> values. But the problem is validation errors are missed.
>
> Anybody used the properties file for the configuration of panel ?
>
> -----
> http://ntsrikanth.blogspot.com/
> --
> View this message in context: http://www.nabble.com/Validation-on-Custom-Panel-tp19879065p19879065.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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