Re: Encoding for wicket:message tag
We are using wicket:message tag to generate content for WAP. Wap is strict XML so it does not allow special characters. Is there a way to force wicket:message tag to escape encode its message? I think you've found an enhancement opportunity for Wicket. You may file an enhancement request for it. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SV: Dynamic Resources, Properties
add(new Label(weatherMessage, new StringResourceModel(weather.message, this, null))); If you put a property weather.message into the page's properties file then it will load from there (even if you provide a default in the panel's properties file). Is that what you mean? Properties are only read once no matter where they are resolved from. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Confirmation dialog during file upload
I have a form which allows a user to upload a file. The form is patterned after upload Wicket example. If the file being uploaded will overwrite an existing file I need to prompt the user if they want to replace the existing file or not. What's the best way to implement this functionality? There is nothing special about it. Just display a confirmation page. Only if the user chooses to go ahead, will it save the file. Below is an example doing that written in Scala (as my exercise in learning Scala): class MyPage extends WebPage { val f = new Form[Unit](f) { override def onSubmit = { val exists = true if (exists) { setResponsePage(new ConfirmSavePage(upload.getFileUpload)) } else { Console.println(saving the file +upload.getFileUpload.getClientFileName) } } } add(f) val upload = new FileUploadField(upload) f.add(upload) } class ConfirmSavePage(upload: FileUpload) extends WebPage { val f = new Form[Unit](f) { override def onSubmit = { Console.println(saving the file +upload.getClientFileName) } } add(f) val cancel = new Button(cancel) { override def onSubmit = { Console.println(Aborting) setResponsePage(classOf[MyPage]) } } f.add(cancel) } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ResourceStreamLocator and mvn resource:resource copying resources in the right directory
Hi, You could have the files in a sibling directory in the web directory that is hidden by the wicket filter mapping. Has many benefits. Allows web developers to freely edit and view files in context with links that actually work. FInally HTML refactoring will work. Can someone suggest how to get the three lines of code into Wicket that are needed to support this? Please See Cannot substitute RelativePathPrefixHandler https://issues.apache.org/jira/browse/WICKET-2881 Bernard On Thu, 17 Jun 2010 16:31:09 -0300, you wrote: Hi all, I need to change the development enviroment for IResourceStreamLocator locator = new ResourceStreamLocator(new Path(new Folder(html))); getResourceSettings().setResourceStreamLocator(locator); but, what I also need is that maven copy the resources form src/main/resources to src/main/WEB-INF/html. This is needed because when maven creates the war file the resources should also be located in that directory. I've tried plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.4.1/version executions execution idcopy-package-config/id phasepackage/phase goals goalcopy-resources/goal /goals configuration outputDirectory${basedir}/html/outputDirectory resources resource directory${basedir}/src/main/resources/directory filteringtrue/filtering /resource /resources /configuration /execution /executions /plugin and I got [1] Inside the definition for plugin 'maven-resources-plugin' specify the following: configuration ... resourcesVALUE/resources /configuration. I don't know what else to do thanks in advance - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: inconsistency in property expression when using . for self reference
Jeremy Thomerson wrote: Please attach to a JIRA [https://issues.apache.org/jira/browse/WICKET] so that it doesn't get lost. done : https://issues.apache.org/jira/browse/WICKET-2919 ++ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Ajax Event on Component with Parameters
Igoor... i need your help please :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-Event-on-Component-with-Parameters-tp2251592p2259861.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
Re: Confirmation dialog during file upload
Sorry, there is a bug in the code: You should never keep a FileUpload object across requests. So, you need to copy the data into somewhere else. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AJAX Button does not submit form if RequiredTextField is empty
FormVoid form = new FormVoid(form); form.add(new RequiredTextFieldString(filed)); final TextFieldString textField; form.add(textField = new TextFieldString(filed2, new ModelString())); form.add(new AjaxButton(button) { @Override protected void onSubmit(AjaxRequestTarget target, @SuppressWarnings(hiding) Form? form) { System.out.println(Test. + textField.getConvertedInput()); System.out.println(Test. + textField.getModelObject()); } }); In case if filed is empty than onSubmit() method does not call after submitting button. I can find only one solution - to override process() and onValidate() methods of form as fallows: FormVoid form = new FormVoid(form) { @Override public void process(IFormSubmittingComponent submittingComponent) { if (button.equals(submittingComponent.getInputName())) { getApplication().getSessionStore().setAttribute(getRequest(), button, true); } super.process(submittingComponent); } @SuppressWarnings(unchecked) @Override protected void onValidate() { if (getApplication().getSessionStore().getAttribute(getRequest(), unvalidate) != null (Boolean) getApplication().getSessionStore().getAttribute(getRequest(), unvalidate)) { getApplication().getSessionStore().removeAttribute(getRequest(), button); Session.get().getFeedbackMessages().clear(); return; } } }; ...but IMHO it's not good:) What is the correct way to solve this problem? thanks in advance -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AJAX-Button-does-not-submit-form-if-RequiredTextField-is-empty-tp2259981p2259981.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
RE: AJAX Button does not submit form if RequiredTextField is empty
http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/Form.html -Ursprüngliche Nachricht- Von: vov [mailto:vov...@mail.ru] Gesendet: Freitag, 18. Juni 2010 12:11 An: users@wicket.apache.org Betreff: AJAX Button does not submit form if RequiredTextField is empty FormVoid form = new FormVoid(form); form.add(new RequiredTextFieldString(filed)); final TextFieldString textField; form.add(textField = new TextFieldString(filed2, new ModelString())); form.add(new AjaxButton(button) { @Override protected void onSubmit(AjaxRequestTarget target, @SuppressWarnings(hiding) Form? form) { System.out.println(Test. + textField.getConvertedInput()); System.out.println(Test. + textField.getModelObject()); } }); In case if filed is empty than onSubmit() method does not call after submitting button. I can find only one solution - to override process() and onValidate() methods of form as fallows: FormVoid form = new FormVoid(form) { @Override public void process(IFormSubmittingComponent submittingComponent) { if (button.equals(submittingComponent.getInputName())) { getApplication().getSessionStore().setAttribute(getRequest(), button, true); } super.process(submittingComponent); } @SuppressWarnings(unchecked) @Override protected void onValidate() { if (getApplication().getSessionStore().getAttribute(getRequest(), unvalidate) != null (Boolean) getApplication().getSessionStore().getAttribute(getRequest(), unvalidate)) { getApplication().getSessionStore().removeAttribute(getRequest(), button); Session.get().getFeedbackMessages().clear(); return; } } }; ...but IMHO it's not good:) What is the correct way to solve this problem? thanks in advance -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AJAX-Button-does-not-submit-form-if-RequiredTextField-is-empty-tp2259981p2259981.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: AJAX Button does not submit form if RequiredTextField is empty
Thanks for replay Stefan. Nestet form is a good idea for my example. But am so sorry that simplified it. In some cases there is not easy to make markup using this way. For example I want to use in my onSubmit method model value from 2 or 3 different TextFields or other FormComponents. And all of them are placed in different part of form. I found another answer on my question, but may be any standard solution exists: form.add(new AjaxButton(button) { @Override protected void onSubmit(AjaxRequestTarget target, @SuppressWarnings(hiding) Form? form) { textField.convertInput(); textField.updateModel(); System.out.println(Test. + textField.getConvertedInput()); System.out.println(Test. + textField.getModelObject()); } }.setDefaultFormProcessing(false)); I set defaultFormProcessing to false and manually update neccessary component. But now I need create custom TextField... class MyTextFieldT extends TextFieldT { public MyTextField(String id) { super(id); } @Override public void convertInput() { super.convertInput(); } } ...that make convertInput() method public -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AJAX-Button-does-not-submit-form-if-RequiredTextField-is-empty-tp2259981p2260054.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
Re: modalWindow can not be closed
What shows up in the ajax debug window? Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jun 17, 2010 10:59 PM, 蔡茂昌 caimaochang.c...@gmail.com wrote: i have set a breakpoint on modalWindow.close(target) ,, it reached ,but modalWindow still could not be closed ,is there any other suggestion? 2010/6/18 aaron.w...@oocl.com Hi, Not sure if there is any kind of exception thrown within your code, if any other than U...
Re: Wicket Ajax Event on Component with Parameters
On Fri, Jun 18, 2010 at 3:21 AM, MattyDE ufer.mar...@gmail.com wrote: Igoor... i need your help please :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-Event-on-Component-with-Parameters-tp2251592p2259861.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 instead of using wiquery event behavior, use your own and generate the binding yourself: new AbstractDefaultAjaxBehavior() { CharSequence getCallbackScript(boolean onlyTargetActivePage) { return $('# + getComponent().getMarkupId() + ').bind('filter', function() { + wicketAjaxGet(' + getCallbackUrl(onlyTargetActivePage) + myIDs=' + getSelectedIDs() + );}; } } notice that the getSelectedIDs() is a JS function that you would need to define Fix the syntax (I probably have typos) and apply it to your use case. -- Jeremy Thomerson http://www.wickettraining.com
Re: gmail like file upload
I mean gmail like GwtUpload. here link for a simple tutorial for GwtUpload http://code.google.com/p/gwtupload/wiki/GwtUpload_GettingStarted -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/gmail-like-file-upload-tp2251270p2260176.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
Autoupdate Components of a ParentPage within a Ajax Request
Hi Wickets, My initial situation: A ParentPage which contains a TabbedPanel with tabs. On the Parent Page is a Feedbackpanel which works globally and displays every error message. The tabs in the TabbedPanel don't know anything about the Feedbackpanel of the parent and all request on the tab are done by ajax. Problem: As fare as I know I always have to add the components to the target to get them changed by the wicket engine. The problem is I can't add the Feedbackpanel to the target because the tabs don't know about it. Approach: I tried to add a listener to the AjaxRequestTaget, but the target was null since there was no AjaxRequest. Question: How can I add a Listener to every AjaxRequest done by the ParentPage or any child of it to update my Feedbackpanel. Regards, peer -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Autoupdate-Components-of-a-ParentPage-within-a-Ajax-Request-tp2260223p2260223.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
Re: gmail like file upload
On Fri, 2010-06-18 at 06:21 -0700, fachhoch wrote: I mean gmail like GwtUpload. here link for a simple tutorial for GwtUpload http://code.google.com/p/gwtupload/wiki/GwtUpload_GettingStarted According to http://code.google.com/p/gwtupload/ , section 'How it works' it looks just like: http://wicketstuff.org/wicket14/upload/multi - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Autoupdate Components of a ParentPage within a Ajax Request
On Fri, 2010-06-18 at 06:43 -0700, peer wrote: Hi Wickets, My initial situation: A ParentPage which contains a TabbedPanel with tabs. On the Parent Page is a Feedbackpanel which works globally and displays every error message. The tabs in the TabbedPanel don't know anything about the Feedbackpanel of the parent and all request on the tab are done by ajax. Problem: As fare as I know I always have to add the components to the target to get them changed by the wicket engine. The problem is I can't add the Feedbackpanel to the target because the tabs don't know about it. Approach: I tried to add a listener to the AjaxRequestTaget, but the target was null since there was no AjaxRequest. Question: How can I add a Listener to every AjaxRequest done by the ParentPage or any child of it to update my Feedbackpanel. The most simple solution: target.addChildren(getPage(), FeedbackPanel.class) Regards, peer - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Autoupdate Components of a ParentPage within a Ajax Request
Martin Grigorov wrote: On Fri, 2010-06-18 at 06:43 -0700, peer wrote: Hi Wickets, My initial situation: A ParentPage which contains a TabbedPanel with tabs. On the Parent Page is a Feedbackpanel which works globally and displays every error message. The tabs in the TabbedPanel don't know anything about the Feedbackpanel of the parent and all request on the tab are done by ajax. Problem: As fare as I know I always have to add the components to the target to get them changed by the wicket engine. The problem is I can't add the Feedbackpanel to the target because the tabs don't know about it. Approach: I tried to add a listener to the AjaxRequestTaget, but the target was null since there was no AjaxRequest. Question: How can I add a Listener to every AjaxRequest done by the ParentPage or any child of it to update my Feedbackpanel. The most simple solution: target.addChildren(getPage(), FeedbackPanel.class) Regards, peer - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Thank you for your quick answer. This solution would be great if would have the ParentPage within my tabs. I know that i could iterate over getParent but that doesn't sound like a sweet solution. The best thing I can imagine right know is that I can tell my ParentPage to listen on it's AjaxRequests and also on those of it's children. Is there a way to do it like this? regards, peer Quoted from: http://apache-wicket.1842946.n4.nabble.com/Autoupdate-Components-of-a-ParentPage-within-a-Ajax-Request-tp2260223p2260276.html -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Autoupdate-Components-of-a-ParentPage-within-a-Ajax-Request-tp2260223p2260290.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
Re: Autoupdate Components of a ParentPage within a Ajax Request
On Fri, 2010-06-18 at 07:31 -0700, peer wrote: Martin Grigorov wrote: On Fri, 2010-06-18 at 06:43 -0700, peer wrote: Hi Wickets, My initial situation: A ParentPage which contains a TabbedPanel with tabs. On the Parent Page is a Feedbackpanel which works globally and displays every error message. The tabs in the TabbedPanel don't know anything about the Feedbackpanel of the parent and all request on the tab are done by ajax. Problem: As fare as I know I always have to add the components to the target to get them changed by the wicket engine. The problem is I can't add the Feedbackpanel to the target because the tabs don't know about it. Approach: I tried to add a listener to the AjaxRequestTaget, but the target was null since there was no AjaxRequest. Question: How can I add a Listener to every AjaxRequest done by the ParentPage or any child of it to update my Feedbackpanel. The most simple solution: target.addChildren(getPage(), FeedbackPanel.class) Regards, peer - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Thank you for your quick answer. This solution would be great if would have the ParentPage within my tabs. I know that i could iterate over getParent but that doesn't sound like a sweet solution. The best thing I can imagine right know is that I can tell my ParentPage to listen on it's AjaxRequests and also on those of it's children. Is there a way to do it like this? Check https://issues.apache.org/jira/browse/WICKET-1312 There are some patches for event mechanism. regards, peer Quoted from: http://apache-wicket.1842946.n4.nabble.com/Autoupdate-Components-of-a-ParentPage-within-a-Ajax-Request-tp2260223p2260276.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Ajax Event on Component with Parameters
Hi Jeremy, Thanks for your reply. It looks like what i've looking for. But i need this with POST not with GET. Cause the GET-URL is to limited to internet standards and i have to transfer a bunch of more data back to the server-side. Any hint for POST? Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Ajax-Event-on-Component-with-Parameters-tp2251592p2260352.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
Re: Wicket Ajax Event on Component with Parameters
On Fri, 2010-06-18 at 08:01 -0700, MattyDE wrote: Hi Jeremy, Thanks for your reply. It looks like what i've looking for. But i need this with POST not with GET. Cause the GET-URL is to limited to internet standards and i have to transfer a bunch of more data back to the server-side. Any hint for POST? Instead of wicketAjaxGet() use wicketAjaxPost(). See how to pass the parameters in wicket-ajax.js Thanks - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Autoupdate Components of a ParentPage within a Ajax Request
On 06/18/2010 09:43 AM, peer wrote: Hi Wickets, My initial situation: A ParentPage which contains a TabbedPanel with tabs. On the Parent Page is a Feedbackpanel which works globally and displays every error message. The tabs in the TabbedPanel don't know anything about the Feedbackpanel of the parent and all request on the tab are done by ajax. Problem: As fare as I know I always have to add the components to the target to get them changed by the wicket engine. The problem is I can't add the Feedbackpanel to the target because the tabs don't know about it. Approach: I tried to add a listener to the AjaxRequestTaget, but the target was null since there was no AjaxRequest. Question: How can I add a Listener to every AjaxRequest done by the ParentPage or any child of it to update my Feedbackpanel. Regards, peer Hello, You can either pass the feedback panel through to the tabs so they can target.addComponent (feedbackPanel) or create an interface callback like: public interface IOnAjaxUpdate { public void onAjaxUpdate (AjaxRequestTarget target); } parent.add (new Tab (tab1, new IOnAjaxUpdate () { public void onAjaxUpdate (AjaxRequestTarget target) { target.addComponent (feedbackPanel); } }); Then the tab will do its update over ajax and also call the parentCallback.onAjaxUpdate (...) method of the interface to trigger the callback logic in the parent component. I prefer the interface based approach since the tabs still don't need to know about the feedback panel and the feedback panel updates can be seen at the same level in the component hierarchy. Regards, Mike - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Confirmation dialog during file upload
Hello, If I understand your approach correctly, then the user would have to click Upload button again after being redirected MyPage to ConfirmSavePage, which is not desirable. I would like to implement the following interaction: 1. User clicks Upload button and form submission request is sent to the server 2. The code on the server detect the file name collision and causes a ModalWindow to display 3.1 If the user clicks Confirm button then upload form submission is resumed. 3.2 If the user clicks Cancel button then upload form submission is canceled. What's the best way to implement this interaction? Can I use a request intercepting page to display the ModalWindow? Thanks On Fri, Jun 18, 2010 at 3:42 AM, Kent Tong k...@cpttm.org.mo wrote: Sorry, there is a bug in the code: You should never keep a FileUpload object across requests. So, you need to copy the data into somewhere else. - 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
ListView + dynamic rows: always remove last row...
Hi!! Im trying to implement a dynamic Form, where you can add textfields and remove as you want. The add button works fine, but the remove button always remove the last testfield and not the selected field. For example: Textfield1 add remove Textfield2 add remove Textfield3 add remove click on remove (row textfield2) and Textfield3 is removed. It should remove Textfield2, doesnt it? Some code: public class KeywordObject implements Serializable { private static final long serialVersionUID = 1L; private String keyword; public void setKeyword(String keyword) { this.keyword = keyword; } public String getKeyword() { return this.keyword; } } And in the form... ListKeywordObject keyList = new ArrayListKeywordObject(); keyList.add(new KeywordObject()); final ListView keywordView = new ListView(keywordView, keyList) { @Override protected void populateItem(final ListItem item) { KeywordObject model = (KeywordObject) item.getModelObject(); item.add(new TextField(keyword, new PropertyModel(model, keyword))); // keyword add link Link addKeyword = new Link(addKeyword, item.getModel()) { @Override public void onClick() { keyList.add(new KeywordObject()); } }; // keyword remove link Link removeKeyword = new Link(removeKeyword, item.getModel()) { @Override public void onClick() { KeywordObject selected = (KeywordObject) getModelObject(); keyList.remove(selected); } }; item.add(addKeyword); item.add(removeKeyword); } }; add(keywordView); keywordView.setReuseItems(true); Im getting crazy about that... Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListView-dynamic-rows-always-remove-last-row-tp2260480p2260480.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
Re: ResourceStreamLocator and mvn resource:resource copying resources in the right directory
The solution I found: application.init getResourceSettings().addResourceFolder(/WEB-INF/html); Your resources will be protected by web-inf and the configuration is the same in local development machine and in the remote development machine, where you can give permits to your web designers. Not the best solution but the simplest. In maven, resource filteringfalse/filtering directorysrc/main/webapp//directory /resource On Fri, Jun 18, 2010 at 4:21 AM, b...@actrix.gen.nz wrote: Hi, You could have the files in a sibling directory in the web directory that is hidden by the wicket filter mapping. Has many benefits. Allows web developers to freely edit and view files in context with links that actually work. FInally HTML refactoring will work. Can someone suggest how to get the three lines of code into Wicket that are needed to support this? Please See Cannot substitute RelativePathPrefixHandler https://issues.apache.org/jira/browse/WICKET-2881 Bernard On Thu, 17 Jun 2010 16:31:09 -0300, you wrote: Hi all, I need to change the development enviroment for IResourceStreamLocator locator = new ResourceStreamLocator(new Path(new Folder(html))); getResourceSettings().setResourceStreamLocator(locator); but, what I also need is that maven copy the resources form src/main/resources to src/main/WEB-INF/html. This is needed because when maven creates the war file the resources should also be located in that directory. I've tried plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.4.1/version executions execution idcopy-package-config/id phasepackage/phase goals goalcopy-resources/goal /goals configuration outputDirectory${basedir}/html/outputDirectory resources resource directory${basedir}/src/main/resources/directory filteringtrue/filtering /resource /resources /configuration /execution /executions /plugin and I got [1] Inside the definition for plugin 'maven-resources-plugin' specify the following: configuration ... resourcesVALUE/resources /configuration. I don't know what else to do thanks in advance - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: gmail like file upload
but GwtUpload is ajax and wicket is not . -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/gmail-like-file-upload-tp2251270p2260591.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
Re: ResourceStreamLocator and mvn resource:resource copying resources in the right directory
Hi Fernando, obviously quite a few including yourself are separating markup from Java packages to make it accessable to HTML developers. How do you cope with the fact that Wicket markup, when rendered in any folder without flattening the package structure, gets broken images? That is what I am trying to address with Cannot substitute RelativePathPrefixHandler https://issues.apache.org/jira/browse/WICKET-2881 The three lines of Java code in RelativePathPrefixHandler are solving this problem. int lastIndex = attrValue.lastIndexOf(../); if (lastIndex = 0){ attrValue = attrValue.substring(lastIndex + 3); } Regards, Bernard On Fri, 18 Jun 2010 13:48:43 -0300, you wrote: The solution I found: application.init getResourceSettings().addResourceFolder(/WEB-INF/html); Your resources will be protected by web-inf and the configuration is the same in local development machine and in the remote development machine, where you can give permits to your web designers. Not the best solution but the simplest. In maven, resource filteringfalse/filtering directorysrc/main/webapp//directory /resource On Fri, Jun 18, 2010 at 4:21 AM, b...@actrix.gen.nz wrote: Hi, You could have the files in a sibling directory in the web directory that is hidden by the wicket filter mapping. Has many benefits. Allows web developers to freely edit and view files in context with links that actually work. FInally HTML refactoring will work. Can someone suggest how to get the three lines of code into Wicket that are needed to support this? Please See Cannot substitute RelativePathPrefixHandler https://issues.apache.org/jira/browse/WICKET-2881 Bernard On Thu, 17 Jun 2010 16:31:09 -0300, you wrote: Hi all, I need to change the development enviroment for IResourceStreamLocator locator = new ResourceStreamLocator(new Path(new Folder(html))); getResourceSettings().setResourceStreamLocator(locator); but, what I also need is that maven copy the resources form src/main/resources to src/main/WEB-INF/html. This is needed because when maven creates the war file the resources should also be located in that directory. I've tried plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.4.1/version executions execution idcopy-package-config/id phasepackage/phase goals goalcopy-resources/goal /goals configuration outputDirectory${basedir}/html/outputDirectory resources resource directory${basedir}/src/main/resources/directory filteringtrue/filtering /resource /resources /configuration /execution /executions /plugin and I got [1] Inside the definition for plugin 'maven-resources-plugin' specify the following: configuration ... resourcesVALUE/resources /configuration. I don't know what else to do thanks in advance - 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
Anchor, not jumping in Mozilla
Hi, I have a SubmitLink that submits the form and returns to the same page. But I need it to jump to the result section. I added an anchor: form = new ShinyForm(myForm) { private static final long serialVersionUID = -4058461619493381294L; protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); StringBuilder b = new StringBuilder(tag.getString(action).toString()).append(#result); tag.put(action, b.toString()); } }; The anchor appears in url and it jump in Google Chrome, but not in Mozilla. In mozilla, I need to click reload for it to jump. Thanks, Anna
Suggestion about wicket's Wizard
I have been playing wicket's Wizard (1.4.9) and feel it is quite helpful but lacking in some ways. Here is what I suggest: 1. Add a method (called size or something else) to WizardModel to provide the number of wizard steps it contains. 2. Add a method to Wizard or WizardModel to provide the index of a IWizardStep in a number of the wizard steps 3. The current WizardModel#previous remembers the click history in a browser style. Put it another way, it remembers whatever steps were visited and return to them in reversing (FILO) order. I call it browser style. This visit order does not reflect the actual order of wizard steps defined when a Wizard is created. I would like to see an added style (called Linear, for example) that strictly ask WizardModel#previous or another new method to return Wizard to step that is defined (NOT visited) before the current active wizard step. (The background for this request is that I created a few links each of which takes me directly to individual wizard steps in a Wizard. So i can visit the wizard steps in any order instead of following the default Previous and Next button. When I click a link and then click the Prevoius button, the wizard takes me to the previously visited wizard step, not the one defined before the current active step. I feel my need is a useful usecase. I inherited WizardModel and modified the previous method in order to satisfy the usecase). Best! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Confirmation dialog during file upload
1. User clicks Upload button and form submission request is sent to the server 2. The code on the server detect the file name collision and causes a ModalWindow to display These can be done with an AjaxButton to send the upload request. Then show the ModalWindow in onSubmit(). 3.1 If the user clicks Confirm button then upload form submission is resumed. The Confirm button would be another AjaxButton then. Just save the file in onSubmit(). Of course, make sure you copied the file content in the first place for use here. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org