Validation messages for required fields using form id

2011-03-24 Thread mwilber
So I had a need to inject a custom validation message for a required text
component when the field value is not present. No problem I said, looking at
some wiki pages and other online content, I found that it should be easily
added as any other i18n property:

..Required=My custom message.

However, debugging through the only keys the MessageSource seems to go
through are:
.Required
Required

So, debugging through I see that the MessageSource inner class of
FormComponent works by allowing the FormComponent to inject a prefix to the
key, which would then look for the following keys:
..Required
.Required
Required

So is the form Id no longer used?

Digging further I can see that the default implementation in FormComponent
to get a prefix is to ask the form for a validation prefix, which by turn
returns null. So even if I override this method in the Form to return the
form id, it's still only going to look through:
..Required
.Required
Required

So did the original property name I saw online ever work?
..Required=My custom message.

I'm on 1.4.2 (old I know), but nothing appears to have change in this arena
on 1.4.16 either.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validation-messages-for-required-fields-using-form-id-tp3403212p3403212.html
Sent from the Users forum 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



Re: Validation messages for required fields using form id

2011-03-24 Thread mwilber
Would it be true that the entire form id from the page level down is needed?

tabs.panel. for instance? That seems to work.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validation-messages-for-required-fields-using-form-id-tp3403212p3403612.html
Sent from the Users forum 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



Re: Bean injection

2010-10-07 Thread mwilber

We have had to grab the beans ourselves for request scoped beans. In our case
they are trying to cache service call results that may change over time and
allows for data consistency through the request. If we use the @SpringBean
annotation for this we have seen that the bean is cached and not
refetched. I have wanted to look more at this in the Proxy factory but
have not had a chance.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Bean-injection-tp2966113p2967048.html
Sent from the Users forum 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



Re: Model Is Not being Refreshed

2010-08-03 Thread mwilber

Again without seeing more of the code some of this is guessing.

If the component that you are trying to update is not part of the original
HTML it will not be updated in the ajax response. I see that you are marking
the component as visible and enabled. If it isn't visible during the initial
rendering then it won't be placed in the HTML. If you mark the component
with 
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag(boolean)
setOutputMarkupPlaceholderTag(true)  then the invisible component will have
a placeholder to be updated during the ajax response.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.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



Wicket Channels best practices

2010-07-19 Thread mwilber

Is there a best practice document or a set of examples that demonstrate a use
of Wicket Channels. I have run into a couple places in an application where
the service side of obtaining data might be costly. Using an
AjaxLazyLoadingPanel and/or a LoadableDetachableModel has certainly helped,
but we've seen places where a blocked AJAX call prevents a longer running
ajax component update from allowing the user to navigate to a different AJAX
component on the screen. I'm working on an application where we have one
page class with a header and footer and the main content is maintained by
AJAX events. I'm wondering if channels would be helpful in some of these
situations.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Channels-best-practices-tp2294493p2294493.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