Re: Validation messages for required fields using form id
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
Validation messages for required fields using form id
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: spring bean null during ajax call back
Here are a couple threads that back this and provide links to more deeper explanations of the annotation. http://apache-wicket.1842946.n4.nabble.com/Hold-a-reference-to-a-Spring-bean-in-Wicket-components-td1880461.html http://apache-wicket.1842946.n4.nabble.com/wicket-serlization-impact-on-singleton-spring-bean-with-a-transient-property-td1852653.html -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/spring-bean-null-during-ajax-call-back-tp3042434p3042458.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: spring bean null during ajax call back
The fact that the bean is declared transient means that when the component is serialized the field will be nulled out. The @SpringBean annotation actually proxies the actual spring bean for you with it's own serializable instance that (a) is serializable and (b) simply knows how to look the bean up when needed. So simply remove the transient portion of the declaration and you should be set. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/spring-bean-null-during-ajax-call-back-tp3042434p3042455.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
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
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
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