Re: How to change the properties file location in Wicket
See org.apache.wicket.resource.loader.BundleStringResourceLoader Or create your own impl of org.apache.wicket.resource.loader.IStringResourceLoader and register it with : app.getStringResourceLoaders().add(yours) On Sun, May 20, 2012 at 6:47 PM, oliver.stef wrote: > Hi Martin, > > Thank you for your help, but my problem is that i need to put my properties > file in folder that is not next to the HTML and Java files. > > i need to change the look-up algorithm of wicket. > > Any body know how to do it? > > Thanks! > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4647014.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 > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to change the properties file location in Wicket
Why do you need to change that? What is your usecase? -Tom On 20.05.2012 at 18:47 oliver.stef wrote: > Hi Martin, > > Thank you for your help, but my problem is that i need to put my properties > file in folder that is not next to the HTML and Java files. > > i need to change the look-up algorithm of wicket. > > Any body know how to do it? > > Thanks! > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4647014.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 > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket not able to find component after adding container componenent
I solved my problem...found other way around to get my purpose... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-not-able-to-find-component-after-adding-container-componenent-tp4646756p4647093.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: wicket not able to find component after adding container componenent
I did...actually this is the code: public SubmitCommentPanel(String id, final ListItem listItem, final UserDomain userDomain) { super(id); // defining container for refreshing list of posts * final WebMarkupContainer postDomainContainer = new WebMarkupContainer( "submitCommentPostDomainContainer"); postDomainContainer.setOutputMarkupId(true);* List postDomainList = new ArrayList(); postDomainList.add((PostDomain) listItem.getModelObject()); ListView postDomainListView = new ListView( "post", postDomainList) { private static final long serialVersionUID = 1L; @Override protected void populateItem(final ListItem listItem1) { // Defining form for submitting comments for a post Form commentForm = new Form( "commentForm", new CompoundPropertyModel(commentDomain)); commentForm.setModelObject(commentDomain); // defining text field for user to submit comment final RequiredTextField commentTextField = new RequiredTextField( "comment", Model.of(commentDomain.getComment())); AjaxFallbackButton ajaxCommentSubmitButton = new AjaxFallbackButton( "commentSubmitButton", commentForm) { /** * */ private static final long serialVersionUID = 1L; @Override public void onSubmit(AjaxRequestTarget target, final Form form) { /* * Populating commentDomain instance for submitting * comment. This instance is then passed to * CommentService class */ if (target != null) { try { CommentService commentService = new CommentService(); commentService.addComment(commentDomain); } catch (Exception exception) { error(exception.getMessage()); } setResponsePage(getPage().getPageClass()); target.add(postDomainContainer); } } @Override protected void onError(AjaxRequestTarget target, Form form) { // TODO Auto-generated method stub } }; commentForm.add(commentTextField); commentForm.add(ajaxCommentSubmitButton); *listItem.add(commentForm);* } }; *postDomainContainer.add(postDomainListView); add(postDomainContainer);* } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-not-able-to-find-component-after-adding-container-componenent-tp4646756p4647052.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: How to change the properties file location in Wicket
Hi Martin, Thank you for your help, but my problem is that i need to put my properties file in folder that is not next to the HTML and Java files. i need to change the look-up algorithm of wicket. Any body know how to do it? Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-change-the-properties-file-location-in-Wicket-tp4642901p4647014.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: wicket not able to find component after adding container componenent
You need to add the container to the panel: add(postDomainContainer); And you need to add the form to the container instead of the panel itself: postDomainContainer.add(commentForm); Your component hierarchy must match the tag hierarchy. Hope this helps Carl-Eric www.wicketbuch.de On Sun, 20 May 2012 03:40:51 -0700 (PDT) kshitiz wrote: > Hi, > > I am trying to cover a form in a container. > > *SubmitCommentPanel:* > > * * >wicket:id="commentForm"> > > > > The java code is : > > public SubmitCommentPanel(String id, final ListItem > listItem, final UserDomain userDomain) { > super(id); > > // defining container for refreshing list of posts > final WebMarkupContainer postDomainContainer = new > WebMarkupContainer( "submitCommentPostDomainContainer"); > postDomainContainer.setOutputMarkupId(true); > > Form commentForm = new > Form( "commentForm", > new > CompoundPropertyModel(commentDomain)); > > > }; > > > * add(commentForm);* > > But the error is: > > *Last cause: Unable to find component with id 'commentForm' in > [WebMarkupContainer [Component id = > submitCommentPostDomainContainer]]* > > But if I remove container portion, the code runs fine. Cant I add the > container. One thing to note that the whole panel is in another > container: > > > > > > > * wicket:id="submitCommentPanel"> * > > > The above panel though runs fine. What is the issue? > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/wicket-not-able-to-find-component-after-adding-container-componenent-tp4646756.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 > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org