Re: Caching Imagages, CSS, JS in Wicket 1.5.3
Hi, On Tue, Jul 3, 2012 at 11:32 PM, sardo mark.willi...@power-oasis.com wrote: Thanks Martin, that helps. Forgive my naivety, but why do I have the option of adding CSS via the Java code? Surely it's better to follow convention and add it into the appropriate .war directory? If you provide components library then you need to distribute the resources too, not just the classes. Shared resources is more for delivering dynamically generated content. A content that is different depending on some external condition (request parameter, session variable, ...). If you have one monolithic application and the resource is really static then I see no reason why not to put it in its expected place in the .war. ...and if I could do the Columbo, Just one more thing, thing. Why am I getting two head tags in my app? There's a title tag in a base page which is linked to a Label component in the code, which when rendered in the second head tag predictably throws an exception. The full question is on the link below in Stack Overflow. This code worked in Wicket 1.4 but not after porting to 1.5: http://stackoverflow.com/questions/11243714/wicket-head-tag-rendered-twice-for-pages-extending-a-base-page http://stackoverflow.com/questions/11243714/wicket-head-tag-rendered-twice-for-pages-extending-a-base-page Not sure. I see no wicket:extend in UnSecureTemplate.html. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Caching-Imagages-CSS-JS-in-Wicket-1-5-3-tp4121068p4650350.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: Caching Imagages, CSS, JS in Wicket 1.5.3
Martin Grigorov-4 wrote If you provide components library then you need to distribute the resources too, not just the classes. Shared resources is more for delivering dynamically generated content. A content that is different depending on some external condition (request parameter, session variable, ...). If you have one monolithic application and the resource is really static then I see no reason why not to put it in its expected place in the .war. I see thanks Martin. For general app stuff though my personal feeling is that it's best to modify as much as possible by just changing the class of component's associated tag. Not sure. I see no wicket:extend in UnSecureTemplate.html. Oh that's due to my formatting error, I've corrected the post. I'm not sure how to fix this one, it's going to take some time to try and debug. I've just had a look again at what the Wicket 1.4 version of the app produces. I get two head tags but it doesn't repeat what's in the BasePage head, which is what's happening in Wicket 1.5. See below for Wicket 1.4 mark up. Wicket 1.5 reproduces the content of the first header (yes I know the css gets added several times, it's one of the things I'm correcting. I'm wondering if there's something that's related to repeated additions of CSS causing the problem): head meta http-equiv=content-type content=text/html;charset=iso-8859-1 / titleThis site holds the key to wealth, success, and being able to attract the opposite sex/title link type=text/css rel=stylesheet href=css/application.css/ link rel=stylesheet type=text/css href=css/application.css / /head headlink rel=stylesheet type=text/css href=css/application.css / /headbody id=body onload=preloadImages(); return true; -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Caching-Imagages-CSS-JS-in-Wicket-1-5-3-tp4121068p4650350.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscribe@.apache For additional commands, e-mail: users-help@.apache -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscribe@.apache For additional commands, e-mail: users-help@.apache -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Caching-Imagages-CSS-JS-in-Wicket-1-5-3-tp4121068p4650355.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
ModalWindow 404 error in IE8
Hello, In our application we have a ModalWindow (Which resides in another ModalWindow...) which responds with a 404 error when opening. In the log a ClassCastException appears. This problem only occurs in IE8. It works fine in IE9, Chrome and Firefox. It looks like it's the same problem described in the issue WICKET-4241. The issue states that the problem is solved in version 1.5.4. But we use Wicket 1.5.7 in our application. Anyone knows what the problem might be? Thanks, Rick
Re: Caching Imagages, CSS, JS in Wicket 1.5.3
UPDATE: I created a new TestBasePage and a new class that extends TestBasePage. The markup for TestBasePage has the same head mark up as that in my application's BasePage class. When I tested the rendered html it still has two head tags. I then added the wicket:head tag to the child class of TestBasePage and then the second head disappears. So: I put this in the child class before the wicket:extend tag: wicket:head /wicket:head Which renders the following, removing the second head tag: head meta http-equiv=content-type content=text/html;charset=iso-8859-1 / titleTest page/title link type=text/css rel=stylesheet href=css/application.css / /head Not really a solution, and I still don't know why it's happening. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Caching-Imagages-CSS-JS-in-Wicket-1-5-3-tp4121068p4650357.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: Caching Imagages, CSS, JS in Wicket 1.5.3
Hi, If you can reproduce this in a mini application (aka quickstart) then please attach it to a ticket in our Jira and we will have a look. On Wed, Jul 4, 2012 at 1:08 PM, sardo mark.willi...@power-oasis.com wrote: UPDATE: I created a new TestBasePage and a new class that extends TestBasePage. The markup for TestBasePage has the same head mark up as that in my application's BasePage class. When I tested the rendered html it still has two head tags. I then added the wicket:head tag to the child class of TestBasePage and then the second head disappears. So: I put this in the child class before the wicket:extend tag: wicket:head /wicket:head Which renders the following, removing the second head tag: head meta http-equiv=content-type content=text/html;charset=iso-8859-1 / titleTest page/title link type=text/css rel=stylesheet href=css/application.css / /head Not really a solution, and I still don't know why it's happening. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Caching-Imagages-CSS-JS-in-Wicket-1-5-3-tp4121068p4650357.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: Generate html page from java POJO in Wickets
https://sites.google.com/site/wicketrad/ http://wicketwebbeans.sourceforge.net/ -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generate-html-page-from-java-POJO-in-Wickets-tp4650360p4650361.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: Generate html page from java POJO in Wickets
As far as I know both of these projects are not developed since a long time. Use them just for inspiration. On Wed, Jul 4, 2012 at 3:20 PM, Decebal Suiu decebal.s...@asf.ro wrote: https://sites.google.com/site/wicketrad/ http://wicketwebbeans.sourceforge.net/ -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generate-html-page-from-java-POJO-in-Wickets-tp4650360p4650361.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
WICKET-4387: StringIndexOutOfBoundsException when forwarding requests
Hi, Wicket-4387 is marked as resolved (on May 18), but there are notes from July 20th, that the issue is still reproducible on 1.5.7. We've got very similar issue ( exactly the same exception stack when ERROR and REQUEST dispatchers are in web.xml and an error-page tag is used in web.xml ), so I'd like to know whether this issue is solved or not. Regards Wlodek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WICKET-4387: StringIndexOutOfBoundsException when forwarding requests
Hi, Enable DEBUG logging level for ServletWebRequest and paste the details together with the stacktrace when you reproduce the problem in the ticket. Thanks! On Wed, Jul 4, 2012 at 3:39 PM, W Mazur wlodekma...@gmail.com wrote: Hi, Wicket-4387 is marked as resolved (on May 18), but there are notes from July 20th, that the issue is still reproducible on 1.5.7. We've got very similar issue ( exactly the same exception stack when ERROR and REQUEST dispatchers are in web.xml and an error-page tag is used in web.xml ), so I'd like to know whether this issue is solved or not. Regards Wlodek - 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: setResponsePage swallows my session feedback messages
Hi Martin, Following Andrea's comments from issue Wicket-4637, I modified the NonResettingRestartException to fix the error I reported. Here's the modified version: public class NonResettingRestartException extends ReplaceHandlerException { public NonResettingRestartException(final Class? extends Page pageClass, final PageParameters params, final RequestCycle cycle) { super(createRequestHandler(pageClass, params), true); Response response = cycle.getResponse(); if (response instanceof IMetaDataBufferingWebResponse) { WebResponse originalResponse = (WebResponse) cycle .getOriginalResponse(); if (originalResponse != response) { IMetaDataBufferingWebResponse bufferingWebResponse = (IMetaDataBufferingWebResponse) response; bufferingWebResponse.writeMetaData(originalResponse); } } } private static IRequestHandler createRequestHandler( Class? extends Page pageClass, PageParameters params) { return new RenderPageRequestHandler(new PageProvider(pageClass, params)); } } Bertrand - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Required wicket rad sample example
hi, If anybody has Wicket rad sample example/code to generate java pogo to HTML form. I want to genarate html form dynamaically with validations. Please send the JPA jar file link also. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Required-wicket-rad-sample-example-tp4650366.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: Generate html page from java POJO in Wickets
other than bean @Textfiled annotation, can we generate Text field in HTML.. How can we validate these bean properties. i want to validate. - String value if bean property is string type, Integer value if bean property is Int type - Max length min lenth. can we do these in pogo using wickets? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generate-html-page-from-java-POJO-in-Wickets-tp4650360p4650364.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
Generate html page from java POJO in Wickets
hi, how to generate html page from java POJO. (Apache wickets) Suppose in pogo i have name age, for these fields i want to generate text field automatically in HTML with validations. Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generate-html-page-from-java-POJO-in-Wickets-tp4650360.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
java pojo/Bean to generate html (textfield, dropdown,radio buttons)
hi, how to generate html page from java POJO. Suppose in pogo i have name age, for these fields i want to generate text field automatically in HTML with validations. Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/java-pojo-Bean-to-generate-html-textfield-dropdown-radio-buttons-tp4650359.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: Generate html page from java POJO in Wickets
See IValidator class and all its implementations. On Wed, Jul 4, 2012 at 3:40 PM, venkatnsm venkat.s...@gmail.com wrote: other than bean @Textfiled annotation, can we generate Text field in HTML.. How can we validate these bean properties. i want to validate. - String value if bean property is string type, Integer value if bean property is Int type - Max length min lenth. can we do these in pogo using wickets? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generate-html-page-from-java-POJO-in-Wickets-tp4650360p4650364.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: Required wicket rad sample example
On Wed, Jul 4, 2012 at 4:25 PM, venkatnsm venkat.s...@gmail.com wrote: hi, If anybody has Wicket rad sample example/code to generate java pogo to HTML form. I want to genarate html form dynamaically with validations. Please send the JPA jar file link also. Please send the beer first :-) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Required-wicket-rad-sample-example-tp4650366.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: Model is not created
No idea? Anybody? On Tue, 3 Jul 2012 22:50:04 +0200 Andre Schütz wic...@faustas.de wrote: Hello, here is an abstract code example of my problem with my application. # StartPage class StartPage extends WebPage { public StartPage(PageParameters parameters) { add(new SearchForm(searchForm, parameters)); } private class SearchForm extends StatelessForm { public SearchForm(String id, final PageParameters params) { super(id); init(); } private void init() { Button startButton = new Button(button_search) { @Override public void onSubmit() { PageParamerters p = new PageParameters(); // some additional checks with the parameters setResponsePage(MyFormPage.class, p); } } } } } # # MyFormPage # class MyFormPage extends WebPage { public MyFormPage(PageParameters parameters) { super(parameters); ModelMySearchModel model = new ModelMySearchModel() { MySearchModel msm = new MySearchModel(); @Override public MySearchModel getObject() { return msm; } @Override public void setObject(MySearchModel newModel) { this.msm = newModel; } } CompundPropertyModelMySearchModel cpm = new CompoundPropertyModelMySearchModel(model); add(new AdvancedSearchForm(asForm, cpm)); } private class AdvancedSearchForm extends StatelessFormMySearchModel { private String name = null; public AdvancedSearchForm (String id, IModelMySearchModel model) { super(id, model); init(model); } private void init(IModelMySearchModel model) { IModelListString classes = new LoadableDetachableModelListString() { @Override public ListString load() { ListString classes = HelperClass.getClasses(); Collections.sort(classes); return classes; } } IChoiceRendererObject rendererClasses = new IChoiceRendererObject() { public Object getDisplayValue(Object obj) { return obj; } public String getIdValue(Object obj, int index) { return obj.toString(); } }; CheckBoxMultipleChoiceString classesChoice = new CheckBoxMultipleChoiceString(classes, classes, rendererClasses); add(classesChoice); TextFieldString tf = new TextFieldString(name, new PropertyModelString(this, name)); add(tf); add(new Button(searchbutton_search) { @Override public void onSubmit() { makeSubmit(); } }); } /** * Do the submit and got to the response page */ private void makeSubmit() { MySession s = (MySession)getSession(); MySearchModel modelObject = this.getModelObject(); if (!s.mySearchModelExists(modelObject.hashCode())) { s.setMySearchModel(modelObject); } PageParameters p = new PageParameters(); // following method creates parameters from the model p = MyParameterHelper.preparePageParameters(p, modelObject); setResponsePage(MyFinalPage.class, p); } } } # MySearchModel public class SearchModel implements Serializable { private String name = null; private ListString classes = null; public void setName(String newName) { name = newName; } public void setClasses(ListString newClasses) { classes = newClasses; } public String getName() { return name; } public ListString getClasses() { return classes; } } The process: (0) I open the Opera Browser. (1) I click on the button of the StatelessForm (SearchForm) in the StartPage class. (2) The MyFormPage site is displayed. (3) I select some classes and click the button in the AdvancedSearchForm. (4) The MyFinalPage site is displayed. (5) I open the Firefox Browser. (6) I see the StartPage and click the button in the SearchForm. (7) The MyFormPage is displayed and the classes from step (3) are selected. (8) Additionally, I added a System.out.println(model.toString) before the line: CompundPropertyModelMySearchModel cpm = new CompoundPropertyModelMySearchModel(model); and looked into the Catalino.out logs. You can see that this is directly after the initilization of the: ModelMySearchModel model = new ModelMySearchModel() - the logs tell me that the classes from step (3) are in the model = You can see in the model above that the classes are initialized with null. Puh. This is my problem. I hope that this code example gives a good imagination of my problem. I do not know why the classes from step 3 are in the model after a new
Re: Model is not created
I found out that I get the same pageID in both browsers for the MyFormPage. Should the pageID not be different when I open this site in two different browsers? Thanks, Andre On Wed, 4 Jul 2012 19:38:28 +0200 Andre Schütz wic...@faustas.de wrote: No idea? Anybody? On Tue, 3 Jul 2012 22:50:04 +0200 Andre Schütz wic...@faustas.de wrote: Hello, here is an abstract code example of my problem with my application. # StartPage class StartPage extends WebPage { public StartPage(PageParameters parameters) { add(new SearchForm(searchForm, parameters)); } private class SearchForm extends StatelessForm { public SearchForm(String id, final PageParameters params) { super(id); init(); } private void init() { Button startButton = new Button(button_search) { @Override public void onSubmit() { PageParamerters p = new PageParameters(); // some additional checks with the parameters setResponsePage(MyFormPage.class, p); } } } } } # # MyFormPage # class MyFormPage extends WebPage { public MyFormPage(PageParameters parameters) { super(parameters); ModelMySearchModel model = new ModelMySearchModel() { MySearchModel msm = new MySearchModel(); @Override public MySearchModel getObject() { return msm; } @Override public void setObject(MySearchModel newModel) { this.msm = newModel; } } CompundPropertyModelMySearchModel cpm = new CompoundPropertyModelMySearchModel(model); add(new AdvancedSearchForm(asForm, cpm)); } private class AdvancedSearchForm extends StatelessFormMySearchModel { private String name = null; public AdvancedSearchForm (String id, IModelMySearchModel model) { super(id, model); init(model); } private void init(IModelMySearchModel model) { IModelListString classes = new LoadableDetachableModelListString() { @Override public ListString load() { ListString classes = HelperClass.getClasses(); Collections.sort(classes); return classes; } } IChoiceRendererObject rendererClasses = new IChoiceRendererObject() { public Object getDisplayValue(Object obj) { return obj; } public String getIdValue(Object obj, int index) { return obj.toString(); } }; CheckBoxMultipleChoiceString classesChoice = new CheckBoxMultipleChoiceString(classes, classes, rendererClasses); add(classesChoice); TextFieldString tf = new TextFieldString(name, new PropertyModelString(this, name)); add(tf); add(new Button(searchbutton_search) { @Override public void onSubmit() { makeSubmit(); } }); } /** * Do the submit and got to the response page */ private void makeSubmit() { MySession s = (MySession)getSession(); MySearchModel modelObject = this.getModelObject(); if (!s.mySearchModelExists(modelObject.hashCode())) { s.setMySearchModel(modelObject); } PageParameters p = new PageParameters(); // following method creates parameters from the model p = MyParameterHelper.preparePageParameters(p, modelObject); setResponsePage(MyFinalPage.class, p); } } } # MySearchModel public class SearchModel implements Serializable { private String name = null; private ListString classes = null; public void setName(String newName) { name = newName; } public void setClasses(ListString newClasses) { classes = newClasses; } public String getName() { return name; } public ListString getClasses() { return classes; } } The process: (0) I open the Opera Browser. (1) I click on the button of the StatelessForm (SearchForm) in the StartPage class. (2) The MyFormPage site is displayed. (3) I select some classes and click the button in the AdvancedSearchForm. (4) The MyFinalPage site is displayed. (5) I open the Firefox Browser. (6) I see the StartPage and click the button in the SearchForm. (7) The MyFormPage is displayed and the classes from step (3) are selected. (8) Additionally, I added a System.out.println(model.toString) before the line: CompundPropertyModelMySearchModel cpm = new CompoundPropertyModelMySearchModel(model); and looked into the Catalino.out logs. You can see that this is
Re: Model is not created
On Wed, Jul 4, 2012 at 9:14 PM, Andre Schütz wic...@faustas.de wrote: I found out that I get the same pageID in both browsers for the MyFormPage. Should the pageID not be different when I open this site in two different browsers? No. Page id is session scoped. Thanks, Andre On Wed, 4 Jul 2012 19:38:28 +0200 Andre Schütz wic...@faustas.de wrote: No idea? Anybody? On Tue, 3 Jul 2012 22:50:04 +0200 Andre Schütz wic...@faustas.de wrote: Hello, here is an abstract code example of my problem with my application. # StartPage class StartPage extends WebPage { public StartPage(PageParameters parameters) { add(new SearchForm(searchForm, parameters)); } private class SearchForm extends StatelessForm { public SearchForm(String id, final PageParameters params) { super(id); init(); } private void init() { Button startButton = new Button(button_search) { @Override public void onSubmit() { PageParamerters p = new PageParameters(); // some additional checks with the parameters setResponsePage(MyFormPage.class, p); } } } } } # # MyFormPage # class MyFormPage extends WebPage { public MyFormPage(PageParameters parameters) { super(parameters); ModelMySearchModel model = new ModelMySearchModel() { MySearchModel msm = new MySearchModel(); @Override public MySearchModel getObject() { return msm; } @Override public void setObject(MySearchModel newModel) { this.msm = newModel; } } CompundPropertyModelMySearchModel cpm = new CompoundPropertyModelMySearchModel(model); add(new AdvancedSearchForm(asForm, cpm)); } private class AdvancedSearchForm extends StatelessFormMySearchModel { private String name = null; public AdvancedSearchForm (String id, IModelMySearchModel model) { super(id, model); init(model); } private void init(IModelMySearchModel model) { IModelListString classes = new LoadableDetachableModelListString() { @Override public ListString load() { ListString classes = HelperClass.getClasses(); Collections.sort(classes); return classes; } } IChoiceRendererObject rendererClasses = new IChoiceRendererObject() { public Object getDisplayValue(Object obj) { return obj; } public String getIdValue(Object obj, int index) { return obj.toString(); } }; CheckBoxMultipleChoiceString classesChoice = new CheckBoxMultipleChoiceString(classes, classes, rendererClasses); add(classesChoice); TextFieldString tf = new TextFieldString(name, new PropertyModelString(this, name)); add(tf); add(new Button(searchbutton_search) { @Override public void onSubmit() { makeSubmit(); } }); } /** * Do the submit and got to the response page */ private void makeSubmit() { MySession s = (MySession)getSession(); MySearchModel modelObject = this.getModelObject(); if (!s.mySearchModelExists(modelObject.hashCode())) { s.setMySearchModel(modelObject); } PageParameters p = new PageParameters(); // following method creates parameters from the model p = MyParameterHelper.preparePageParameters(p, modelObject); setResponsePage(MyFinalPage.class, p); } } } # MySearchModel public class SearchModel implements Serializable { private String name = null; private ListString classes = null; public void setName(String newName) { name = newName; } public void setClasses(ListString newClasses) { classes = newClasses; } public String getName() { return name; } public ListString getClasses() { return classes; } } The process: (0) I open the Opera Browser. (1) I click on the button of the StatelessForm (SearchForm) in the StartPage class. (2) The MyFormPage site is displayed. (3) I select some classes and click the button in the AdvancedSearchForm. (4) The MyFinalPage site is displayed. (5) I open the Firefox Browser. (6) I see the StartPage and click the button in the SearchForm. (7) The MyFormPage is displayed and the classes from step (3) are selected. (8) Additionally, I added a System.out.println(model.toString) before the line: CompundPropertyModelMySearchModel cpm = new
Re: Model is not created
Thanks for the answer. Do you see any mistakes in my code that can be the reason for my problems? On Wed, 4 Jul 2012 21:20:31 +0200 Martin Grigorov mgrigo...@apache.org wrote: On Wed, Jul 4, 2012 at 9:14 PM, Andre Schütz wic...@faustas.de wrote: I found out that I get the same pageID in both browsers for the MyFormPage. Should the pageID not be different when I open this site in two different browsers? No. Page id is session scoped. Thanks, Andre On Wed, 4 Jul 2012 19:38:28 +0200 Andre Schütz wic...@faustas.de wrote: No idea? Anybody? On Tue, 3 Jul 2012 22:50:04 +0200 Andre Schütz wic...@faustas.de wrote: Hello, here is an abstract code example of my problem with my application. # StartPage class StartPage extends WebPage { public StartPage(PageParameters parameters) { add(new SearchForm(searchForm, parameters)); } private class SearchForm extends StatelessForm { public SearchForm(String id, final PageParameters params) { super(id); init(); } private void init() { Button startButton = new Button(button_search) { @Override public void onSubmit() { PageParamerters p = new PageParameters(); // some additional checks with the parameters setResponsePage(MyFormPage.class, p); } } } } } # # MyFormPage # class MyFormPage extends WebPage { public MyFormPage(PageParameters parameters) { super(parameters); ModelMySearchModel model = new ModelMySearchModel() { MySearchModel msm = new MySearchModel(); @Override public MySearchModel getObject() { return msm; } @Override public void setObject(MySearchModel newModel) { this.msm = newModel; } } CompundPropertyModelMySearchModel cpm = new CompoundPropertyModelMySearchModel(model); add(new AdvancedSearchForm(asForm, cpm)); } private class AdvancedSearchForm extends StatelessFormMySearchModel { private String name = null; public AdvancedSearchForm (String id, IModelMySearchModel model) { super(id, model); init(model); } private void init(IModelMySearchModel model) { IModelListString classes = new LoadableDetachableModelListString() { @Override public ListString load() { ListString classes = HelperClass.getClasses(); Collections.sort(classes); return classes; } } IChoiceRendererObject rendererClasses = new IChoiceRendererObject() { public Object getDisplayValue(Object obj) { return obj; } public String getIdValue(Object obj, int index) { return obj.toString(); } }; CheckBoxMultipleChoiceString classesChoice = new CheckBoxMultipleChoiceString(classes, classes, rendererClasses); add(classesChoice); TextFieldString tf = new TextFieldString(name, new PropertyModelString(this, name)); add(tf); add(new Button(searchbutton_search) { @Override public void onSubmit() { makeSubmit(); } }); } /** * Do the submit and got to the response page */ private void makeSubmit() { MySession s = (MySession)getSession(); MySearchModel modelObject = this.getModelObject(); if (!s.mySearchModelExists(modelObject.hashCode())) { s.setMySearchModel(modelObject); } PageParameters p = new PageParameters(); // following method creates parameters from the model p = MyParameterHelper.preparePageParameters(p, modelObject); setResponsePage(MyFinalPage.class, p); } } } # MySearchModel public class SearchModel implements Serializable { private String name = null; private ListString classes = null; public void setName(String newName) { name = newName; } public void setClasses(ListString newClasses) { classes = newClasses; } public String getName() { return name; } public ListString getClasses() { return classes; } } The process: (0) I open the Opera Browser. (1) I click on the button of the StatelessForm (SearchForm) in the StartPage class. (2) The MyFormPage site is displayed. (3) I select some classes and click the button in the AdvancedSearchForm. (4) The MyFinalPage site is
wicket and using @SpringBean annotation
Hi, could you help me, what I need for using @SpringBean annnotation? In pom.xml I have got: And in WicketApplication class: But I cannot run the application: [ERROR] FATAL ERROR [INFO] [INFO] org/springframework/web/context/ConfigurableWebApplicationContext org.springframework.web.context.ConfigurableWebApplicationContext [INFO] [INFO] Trace java.lang.NoClassDefFoundError: org/springframework/web/context/ConfigurableWebApplicationContext at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404) at java.lang.Class.getConstructor0(Class.java:2714) at java.lang.Class.newInstance0(Class.java:343) What else I need to do? Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-and-using-SpringBean-annotation-tp4650375.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 and using @SpringBean annotation
On Wed, Jul 4, 2012 at 9:36 PM, Dan12321 wee...@centrum.cz wrote: Hi, could you help me, what I need for using @SpringBean annnotation? In pom.xml I have got: And in WicketApplication class: But I cannot run the application: [ERROR] FATAL ERROR [INFO] [INFO] org/springframework/web/context/ConfigurableWebApplicationContext org.springframework.web.context.ConfigurableWebApplicationContext [INFO] [INFO] Trace java.lang.NoClassDefFoundError: org/springframework/web/context/ConfigurableWebApplicationContext at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404) at java.lang.Class.getConstructor0(Class.java:2714) at java.lang.Class.newInstance0(Class.java:343) Do you have org.springframework:spring-web in the classpath ? If you use Maven then it will bring it for you. What else I need to do? Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-and-using-SpringBean-annotation-tp4650375.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: wicket and using @SpringBean annotation
Thanks. I had not spring-web in classpath, so I add it into pom.xml and now it works. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-and-using-SpringBean-annotation-tp4650375p4650377.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: java pojo/Bean to generate html (textfield, dropdown,radio buttons)
Nothing easier than that! MyBean bean = new MyBean(); System.out.println(bean.toHtmlWithFieldsAndValidationAndEverything()); Seriously: if you want us to help you should ask serious questions. Nobody will be able to explain how to automatically generate a HTML page from a POJO. You might as well ask: I have some sugar, 2 eggs and and pound of flour, how to automatically bake a cake out of this?! SCNR, -Tom On 04.07.2012, at 15:13, venkatnsm wrote: hi, how to generate html page from java POJO. Suppose in pogo i have name age, for these fields i want to generate text field automatically in HTML with validations. Thanks in advance. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
image from outside web application directory
I need to show images from c:/pictures on my website. I searched and searched and there should be something on old.nabble but that link is giving null pointer results. Who can help? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/image-from-outside-web-application-directory-tp4650379.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: image from outside web application directory
Hi, Read this: http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ On Thu, Jul 5, 2012 at 12:49 AM, lang delan...@telfort.nl wrote: I need to show images from c:/pictures on my website. I searched and searched and there should be something on old.nabble but that link is giving null pointer results. Who can help? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/image-from-outside-web-application-directory-tp4650379.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