Re: Stateless page and Pragma no-cache
you are right thats not handy. I made it just like we do with resources have a special overridable protected method that is called setHeaders() on WebPage Can you open an jira issue for this so that this is being shown as a change? johan On 11/1/07, John Patterson [EMAIL PROTECTED] wrote: That is already overridden by WebPage which adds the headers. It also calls super which looks necessary. So how can I override this but still have the Page.configureResponse() called? On 31 Oct 2007, at 13:20, Matej Knopp wrote: Override Page.configureResponse() and add the flags you want there. -Matej On 10/31/07, John Patterson [EMAIL PROTECTED] wrote: Hi, I notice that Pragma no-cache is set for every WebPage and I cannot see how I can turn it off for my bookmarkable stateless pages could would benefit from being cached. Cheers, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Two forms on the same page
Yes it is possible so the error is somewhere in your code. Do you add the components for form2 to the form1? Martijn On 11/1/07, Cristi Manole [EMAIL PROTECTED] wrote: Hello, Simple question :) : Is it possible to have two forms on the same page, without having them imbricated? form wicket:id = form1 ... /form form wicket:id = form2 ... /form I'm asking because I get errors saying i did not add markup for form2 when it is indeed in html code... (and added to the page) Tks a lot -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IExceptionResponseStrategy gone from 1.3
Hi all, I had a simple implementation of IExceptionResponseStrategy which helped me to do this protected IRequestCycleProcessor newRequestCycleProcessor() { return new DefaultWebRequestCycleProcessor() { protected IExceptionResponseStrategy newExceptionResponseStrategy() { return new MyExceptionStrategy(); } }; } and throw new RestartResponseException(new MyErrorPage(e,page)); from MyExceptionStrategy and log the exception in the error page. Now i am in the process of migrating my existing application which run on 1.2.6 to 1.3 and i see IExceptionResponseStrategy has gone missing. I would like to pass on the exception to my error page and log it as i was doing before. What is the best way to do it ? I can see that i can override public void respond(RuntimeException e, RequestCycle requestCycle) and do it, is the right direction to take ? Regards Dipu
Re: Two forms on the same page
yes its possible to have two forms in the same page. if you could provide some more details, you are likely to get more helpful response :) Cheers Dipu On 11/1/07, Cristi Manole [EMAIL PROTECTED] wrote: Hello, Simple question :) : Is it possible to have two forms on the same page, without having them imbricated? form wicket:id = form1 ... /form form wicket:id = form2 ... /form I'm asking because I get errors saying i did not add markup for form2 when it is indeed in html code... (and added to the page) Tks a lot
Re: Disabling Wicket Ajax Debug in browser
Yep, and if you have the debug link in a production system, you are deploying your wicket application wrong! So setting ajaxdebug to false should not be used in my opinion. Always switch the configuration to production when you build your war for deployment on a production system. Martijn On 11/1/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Sorry was a bit quick there.. If the ajax debug screen are there as I remember it, it means you are in development mode, my previous post tells how you can switch to production. Gerolf Seitz wrote: in your application init() method do: getDebugSettings().setAjaxDebugModeEnabled(false); gerolf On Nov 1, 2007 6:22 AM, boyinamadhavi [EMAIL PROTECTED] wrote: Hi I am new to wicket. I using Ajax autocomplete text field. It is working well. But i want to disable Wicket Ajax Debug. where i have to set wicketajaxdebug = false i am not having wicket-ajax-debug.js file can any one help me Thanks in Advance Madhavi -- View this message in context: http://www.nabble.com/Disabling-Wicket-Ajax-Debug-in-browser-tf4729498.html#a13523658 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Two forms on the same page
thanks for your quick answer. here goes the problem details :) !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; head wicket:head style !-- for autocomplete -- div.wicket-aa { font-family: Lucida Grande,Lucida Sans Unicode,Tahoma,Verdana; font-size: 12px; background-color: #33; border-width: 1px; border-color: white; border-style: solid; padding: 2px; margin: 1px 0 0 0; text-align: left; } div.wicket-aa ul { list-style:none; padding: 2px; margin:0;} div.wicket-aa ul li.selected { color: #FFCC33; background-color: black; padding: 0px; margin:0;} /style /wicket:head /head body wicket:panel form wicket:id = searchForm method = post action = table tr tdOwner: /td tdinput wicket:id = owner type = text value = name = owner class = moneyrulz //td /tr tr tdName: /td tdinput wicket:id = name type = text value = name = name class = moneyrulz //td /tr tr tdInfo: /td tdinput wicket:id = info type = text value = name = info class = moneyrulz //td /tr tr tdDescription: /td tdinput wicket:id = description type = text value = name = description class = moneyrulz //td /tr tr tdMedia: /td tdinput wicket:id = media type = text value = name = media class = moneyrulz //td /tr tr tdCategory: /td tdinput wicket:id = category type = text value = name = category class = moneyrulz //td /tr tr td colspan=2input wicket:id = ajax-submit-button type = submit id = search value = Go class = moneyrulz//td /tr /table /form br/ form wiked:id = tableForm method = post action = input type = submit value = Delete Selected/ !-- span wicket:id = group pinput type=checkbox wicket:id=groupselectorToggle Check All/input/p table cellspacing = 0 wicket:id = table[table]/table /span -- /form /wicket:panel /body /html public class MyMediaPanel extends Panel { private static final long serialVersionUID = 5601408978271834993L; MyMediaDAO selectedMyMedia; MyAjaxFallbackDefaultDataTable ajaxTable; SortableMyMediaDataProvider dataProvider = new SortableMyMediaDataProvider(); @SpringBean private JdbcMyMedia jdbcMyMedia; public MyMediaPanel(String id) { super(id); add(new MyMediaPanelSearchForm(searchForm)); //Form tableForm = new Form(tableForm) { //protected void onSubmit() { //} //}; //CheckGroup group = new CheckGroup(group, new ArrayListObject()); //group.add(new CheckGroupSelector(groupselector)); //group.add(ajaxTable = createTable()); //tableForm.add(group); add(new Form(tableForm)); //add(group); } [etc] 1. [MarkupContainer [Component id = tableForm, page = com.moneyrulz.mymedia.MyMediaMainPage, path = 2:mymediaPanel:tableForm.Form, isVisible = true, isVersioned = false]] org.apache.wicket.WicketRuntimeException: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = tableForm, page = com.moneyrulz.mymedia.MyMediaMainPage, path = 2:mymediaPanel:tableForm.Form, isVisible = true, isVersioned = false]] at org.apache.wicket.Page.checkRendering(Page.java:1057) at org.apache.wicket.Page.renderPage(Page.java:871) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond (BookmarkablePageRequestTarget.java:225) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond( AbstractRequestCycleProcessor.java:103) at org.apache.wicket.RequestCycle.processEventsAndRespond( RequestCycle.java:1097) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1166) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245) at org.apache.wicket.RequestCycle.request(RequestCycle.java:489) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java :319) at org.apache.wicket.protocol.http.WicketFilter.doFilter( WicketFilter.java:169) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(
Re: Two forms on the same page
i am so sorry for your time. looked for ages at that tag. seems i should have a vacation is there a way to delete this thread? :) again, sorry for your time. On 11/1/07, Martijn Dashorst [EMAIL PROTECTED] wrote: form wiked:id = tableForm method = post action = maybe change this to wicket:id? Martijn On 11/1/07, Cristi Manole [EMAIL PROTECTED] wrote: thanks for your quick answer. here goes the problem details :) !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; head wicket:head style !-- for autocomplete -- div.wicket-aa { font-family: Lucida Grande,Lucida Sans Unicode,Tahoma,Verdana; font-size: 12px; background-color: #33; border-width: 1px; border-color: white; border-style: solid; padding: 2px; margin: 1px 0 0 0; text-align: left; } div.wicket-aa ul { list-style:none; padding: 2px; margin:0;} div.wicket-aa ul li.selected { color: #FFCC33; background-color: black; padding: 0px; margin:0;} /style /wicket:head /head body wicket:panel form wicket:id = searchForm method = post action = table tr tdOwner: /td tdinput wicket:id = owner type = text value = name = owner class = moneyrulz //td /tr tr tdName: /td tdinput wicket:id = name type = text value = name = name class = moneyrulz //td /tr tr tdInfo: /td tdinput wicket:id = info type = text value = name = info class = moneyrulz //td /tr tr tdDescription: /td tdinput wicket:id = description type = text value = name = description class = moneyrulz //td /tr tr tdMedia: /td tdinput wicket:id = media type = text value = name = media class = moneyrulz //td /tr tr tdCategory: /td tdinput wicket:id = category type = text value = name = category class = moneyrulz //td /tr tr td colspan=2input wicket:id = ajax-submit-button type = submit id = search value = Go class = moneyrulz//td /tr /table /form br/ form wiked:id = tableForm method = post action = input type = submit value = Delete Selected/ !-- span wicket:id = group pinput type=checkbox wicket:id=groupselectorToggle Check All/input/p table cellspacing = 0 wicket:id = table[table]/table /span -- /form /wicket:panel /body /html public class MyMediaPanel extends Panel { private static final long serialVersionUID = 5601408978271834993L; MyMediaDAO selectedMyMedia; MyAjaxFallbackDefaultDataTable ajaxTable; SortableMyMediaDataProvider dataProvider = new SortableMyMediaDataProvider(); @SpringBean private JdbcMyMedia jdbcMyMedia; public MyMediaPanel(String id) { super(id); add(new MyMediaPanelSearchForm(searchForm)); //Form tableForm = new Form(tableForm) { //protected void onSubmit() { //} //}; //CheckGroup group = new CheckGroup(group, new ArrayListObject()); //group.add(new CheckGroupSelector(groupselector)); //group.add(ajaxTable = createTable()); //tableForm.add(group); add(new Form(tableForm)); //add(group); } [etc] 1. [MarkupContainer [Component id = tableForm, page = com.moneyrulz.mymedia.MyMediaMainPage, path = 2:mymediaPanel: tableForm.Form, isVisible = true, isVersioned = false]] org.apache.wicket.WicketRuntimeException: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = tableForm, page = com.moneyrulz.mymedia.MyMediaMainPage, path = 2:mymediaPanel: tableForm.Form, isVisible = true, isVersioned = false]] at org.apache.wicket.Page.checkRendering(Page.java:1057) at org.apache.wicket.Page.renderPage(Page.java:871) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond (BookmarkablePageRequestTarget.java:225) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond( AbstractRequestCycleProcessor.java:103) at org.apache.wicket.RequestCycle.processEventsAndRespond( RequestCycle.java:1097) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1166) at
JDeveloper and Wicket
Hello, How can I setup wicket on JDeveloper? Can anyone help with a step-by-step guide specific on JDev? I have tried but no luck so far. Thanks for your time, John -- View this message in context: http://www.nabble.com/JDeveloper-and-Wicket-tf4730313.html#a13525928 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket:enclosure and authorization
I'd say more like the enclosure should check is the component will render rather than a simple isVisible check. -Matej On 11/1/07, Maurice Marrink [EMAIL PROTECTED] wrote: On Oct 31, 2007 9:58 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: there seems to be a bit of a disconnect between render in auth and our general component visibility concept. perhaps it might be an improvement to aligh auth strategy with visibility rather then render...what do others think? What exactly do you mean by this? Do you want isVisible to also check permission for the render action? Maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Two forms on the same page
form wiked:id = tableForm method = post action = maybe change this to wicket:id? Martijn On 11/1/07, Cristi Manole [EMAIL PROTECTED] wrote: thanks for your quick answer. here goes the problem details :) !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; head wicket:head style !-- for autocomplete -- div.wicket-aa { font-family: Lucida Grande,Lucida Sans Unicode,Tahoma,Verdana; font-size: 12px; background-color: #33; border-width: 1px; border-color: white; border-style: solid; padding: 2px; margin: 1px 0 0 0; text-align: left; } div.wicket-aa ul { list-style:none; padding: 2px; margin:0;} div.wicket-aa ul li.selected { color: #FFCC33; background-color: black; padding: 0px; margin:0;} /style /wicket:head /head body wicket:panel form wicket:id = searchForm method = post action = table tr tdOwner: /td tdinput wicket:id = owner type = text value = name = owner class = moneyrulz //td /tr tr tdName: /td tdinput wicket:id = name type = text value = name = name class = moneyrulz //td /tr tr tdInfo: /td tdinput wicket:id = info type = text value = name = info class = moneyrulz //td /tr tr tdDescription: /td tdinput wicket:id = description type = text value = name = description class = moneyrulz //td /tr tr tdMedia: /td tdinput wicket:id = media type = text value = name = media class = moneyrulz //td /tr tr tdCategory: /td tdinput wicket:id = category type = text value = name = category class = moneyrulz //td /tr tr td colspan=2input wicket:id = ajax-submit-button type = submit id = search value = Go class = moneyrulz//td /tr /table /form br/ form wiked:id = tableForm method = post action = input type = submit value = Delete Selected/ !-- span wicket:id = group pinput type=checkbox wicket:id=groupselectorToggle Check All/input/p table cellspacing = 0 wicket:id = table[table]/table /span -- /form /wicket:panel /body /html public class MyMediaPanel extends Panel { private static final long serialVersionUID = 5601408978271834993L; MyMediaDAO selectedMyMedia; MyAjaxFallbackDefaultDataTable ajaxTable; SortableMyMediaDataProvider dataProvider = new SortableMyMediaDataProvider(); @SpringBean private JdbcMyMedia jdbcMyMedia; public MyMediaPanel(String id) { super(id); add(new MyMediaPanelSearchForm(searchForm)); //Form tableForm = new Form(tableForm) { //protected void onSubmit() { //} //}; //CheckGroup group = new CheckGroup(group, new ArrayListObject()); //group.add(new CheckGroupSelector(groupselector)); //group.add(ajaxTable = createTable()); //tableForm.add(group); add(new Form(tableForm)); //add(group); } [etc] 1. [MarkupContainer [Component id = tableForm, page = com.moneyrulz.mymedia.MyMediaMainPage, path = 2:mymediaPanel:tableForm.Form, isVisible = true, isVersioned = false]] org.apache.wicket.WicketRuntimeException: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = tableForm, page = com.moneyrulz.mymedia.MyMediaMainPage, path = 2:mymediaPanel:tableForm.Form, isVisible = true, isVersioned = false]] at org.apache.wicket.Page.checkRendering(Page.java:1057) at org.apache.wicket.Page.renderPage(Page.java:871) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond (BookmarkablePageRequestTarget.java:225) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond( AbstractRequestCycleProcessor.java:103) at org.apache.wicket.RequestCycle.processEventsAndRespond( RequestCycle.java:1097) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1166) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245) at org.apache.wicket.RequestCycle.request(RequestCycle.java:489) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java :319) at org.apache.wicket.protocol.http.WicketFilter.doFilter( WicketFilter.java:169) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
Re: Synchronizing AutoCompleteTextField with a checkbox
hmmm, thats even better :) On 11/1/07, WicketKeeper [EMAIL PROTECTED] wrote: I'm a dumdum. The answer is to use AjaxCheckBox (duhh) Cheers WK WicketKeeper wrote: Hi I have an autocomplete field object with the getChoices method overridden, which works just fine. Next to it I have a checkbox, which when checked alters the logic in getChoices so that the string is interpreted as a regular expression. This DOES work: tsf = new TableSelectionField(TableNameAutoCompleteTextField); subjcb = new CheckBox(SubjectsRegexpCheckBox) { protected boolean wantOnSelectionChangedNotifications() { return true; } }; both components are added to form, so they implicitly get the CompoundPropertyModel. Right, that's wonderful - except now when I click the checkbox the entire page refreshes. When there's lots of stuff on the page this can be a heavy operation. So I took this bit out: subjcb = new CheckBox(SubjectsRegexpCheckBox) { protected boolean wantOnSelectionChangedNotifications() { return true; } }; And now the autocomplete field does not work - well, not completely. If I click submit on the form (which gets that state of the checkbox and field) I get the expected results, even if the autocomplete field doesn't populate correctly. Is there any way I can get round this without forcing a refresh when i click on the checkbox? Cheers WK -- View this message in context: http://www.nabble.com/Synchronizing-AutoCompleteTextField-with-a-checkbox-tf4730399.html#a13526222 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Synchronizing AutoCompleteTextField with a checkbox
That would work as well, yes. I don't know if this is good practice, but the way I've done it now, which works, is: tsf = new TableSelectionField(TableNameAutoCompleteTextField); AjaxCheckBox tncb = new AjaxCheckBox(TableNamesRegexpCheckBox) { public void onUpdate(AjaxRequestTarget target) { //squelch! does nothing } }; tsf.setRegexp(tncb); //don't know if this is good practice, but works In the model I have methods: public void setTableNamesRegexpCheckBox(boolean b) { this.b_tablenames = b; } public boolean getTableNamesRegexpCheckBox() { return b_tablenames; } public String getTableNameAutoCompleteTextField() { return s_tablenames; } public void setTableNameAutoCompleteTextField(String s) { s_tablenames = s; } And in the getChoices method for the textfield I have the following logic: if((Boolean)regexp.getModelObject()) { //regular expression } else { //normal } Cheers WK Dipu Seminlal wrote: try adding AjaxFormComponentUpdatingBehaviour to the the check box instead of setting wantOnSelectionChangedNotifications. as far as i know wantOnSelectionChangedNotifications will refresh the page. AjaxFormComponentUpdatingBehaviour will do an ajax call and won't refresh the entire page. Regards Dipu On 11/1/07, WicketKeeper [EMAIL PROTECTED] wrote: Hi I have an autocomplete field object with the getChoices method overridden, which works just fine. Next to it I have a checkbox, which when checked alters the logic in getChoices so that the string is interpreted as a regular expression. This DOES work: tsf = new TableSelectionField(TableNameAutoCompleteTextField); subjcb = new CheckBox(SubjectsRegexpCheckBox) { protected boolean wantOnSelectionChangedNotifications() { return true; } }; both components are added to form, so they implicitly get the CompoundPropertyModel. Right, that's wonderful - except now when I click the checkbox the entire page refreshes. When there's lots of stuff on the page this can be a heavy operation. So I took this bit out: subjcb = new CheckBox(SubjectsRegexpCheckBox) { protected boolean wantOnSelectionChangedNotifications() { return true; } }; And now the autocomplete field does not work - well, not completely. If I click submit on the form (which gets that state of the checkbox and field) I get the expected results, even if the autocomplete field doesn't populate correctly. Is there any way I can get round this without forcing a refresh when i click on the checkbox? Cheers WK -- View this message in context: http://www.nabble.com/Synchronizing-AutoCompleteTextField-with-a-checkbox-tf4730399.html#a13526176 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Synchronizing-AutoCompleteTextField-with-a-checkbox-tf4730399.html#a13526416 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Synchronizing AutoCompleteTextField with a checkbox
I'm a dumdum. The answer is to use AjaxCheckBox (duhh) Cheers WK WicketKeeper wrote: Hi I have an autocomplete field object with the getChoices method overridden, which works just fine. Next to it I have a checkbox, which when checked alters the logic in getChoices so that the string is interpreted as a regular expression. This DOES work: tsf = new TableSelectionField(TableNameAutoCompleteTextField); subjcb = new CheckBox(SubjectsRegexpCheckBox) { protected boolean wantOnSelectionChangedNotifications() { return true; } }; both components are added to form, so they implicitly get the CompoundPropertyModel. Right, that's wonderful - except now when I click the checkbox the entire page refreshes. When there's lots of stuff on the page this can be a heavy operation. So I took this bit out: subjcb = new CheckBox(SubjectsRegexpCheckBox) { protected boolean wantOnSelectionChangedNotifications() { return true; } }; And now the autocomplete field does not work - well, not completely. If I click submit on the form (which gets that state of the checkbox and field) I get the expected results, even if the autocomplete field doesn't populate correctly. Is there any way I can get round this without forcing a refresh when i click on the checkbox? Cheers WK -- View this message in context: http://www.nabble.com/Synchronizing-AutoCompleteTextField-with-a-checkbox-tf4730399.html#a13526222 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem closing a ModalWindow when used through an IFrame
The modal window probably won't work well when paced in a page that is loaded in iframe. Still, if you can provide a quickstart assigned to a JIRA entry I will take a look if there is a quick fix for your problem. -Matej On 11/1/07, Deepak Mahavishnu [EMAIL PROTECTED] wrote: Hello! I'm doing some POC testing to find out how a wicket application could be used through an IFrame and noticed that closing of a ModalWindow fails. My setup: Application A: -a dummy html page that has an IFrame -the contents of the IFrame is requested from Application B iframe src=http://localhost:8080/mywicketapp/app/; width=100% height=500/iframe Application B: -a Wicket application that uses a ModalWindow -deployed to tomcat: http://localhost:8080/mywicketapp/ Problem: The ModalWindow is not closed when OK ( or Cancel ) button is clicked when Application B is used throug IFrame of Application A. OK button performs the actual action (in my case deletes an item from a list) but is not closed after the execution of the action. Closing of the ModalWindow works normally when Application B is not used through an IFrame. Any suggestions how this could be solved? Or is the usage through an IFrame a bad idea from start? Any help is appreciated! Mahavishnu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Synchronizing AutoCompleteTextField with a checkbox
Hi I have an autocomplete field object with the getChoices method overridden, which works just fine. Next to it I have a checkbox, which when checked alters the logic in getChoices so that the string is interpreted as a regular expression. This DOES work: tsf = new TableSelectionField(TableNameAutoCompleteTextField); subjcb = new CheckBox(SubjectsRegexpCheckBox) { protected boolean wantOnSelectionChangedNotifications() { return true; } }; both components are added to form, so they implicitly get the CompoundPropertyModel. Right, that's wonderful - except now when I click the checkbox the entire page refreshes. When there's lots of stuff on the page this can be a heavy operation. So I took this bit out: subjcb = new CheckBox(SubjectsRegexpCheckBox) { protected boolean wantOnSelectionChangedNotifications() { return true; } }; And now the autocomplete field does not work - well, not completely. If I click submit on the form (which gets that state of the checkbox and field) I get the expected results, even if the autocomplete field doesn't populate correctly. Is there any way I can get round this without forcing a refresh when i click on the checkbox? Cheers WK -- View this message in context: http://www.nabble.com/Synchronizing-AutoCompleteTextField-with-a-checkbox-tf4730399.html#a13526176 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mvn netbeans:netbeans command for QuickStart Project
thanks al. i would not expect to, as so elocuently put, RTFM for some tool so outside wicket scope. rather wicket projects worked out me the box or with simpler tool such as ant. specially when we are trying to contribute to the cause. f(t) On 10/31/07, Al Maw [EMAIL PROTECTED] wrote: Francisco Diaz Trepat - gmail wrote: Hi I just downloaded the maven 2.0.7 and ran the *mvn archetype:create -DarchetypeGroupId=org.apache.wicket* then ran the *mvn netbeans:netbeans* inside the project to get a Netbeans project. And got an error. That's because there is no such plug-in. RTFM here: http://maven.apache.org/guides/mini/guide-ide-netbeans/guide-ide-netbeans.html Regards, Al - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Synchronizing AutoCompleteTextField with a checkbox
try adding AjaxFormComponentUpdatingBehaviour to the the check box instead of setting wantOnSelectionChangedNotifications. as far as i know wantOnSelectionChangedNotifications will refresh the page. AjaxFormComponentUpdatingBehaviour will do an ajax call and won't refresh the entire page. Regards Dipu On 11/1/07, WicketKeeper [EMAIL PROTECTED] wrote: Hi I have an autocomplete field object with the getChoices method overridden, which works just fine. Next to it I have a checkbox, which when checked alters the logic in getChoices so that the string is interpreted as a regular expression. This DOES work: tsf = new TableSelectionField(TableNameAutoCompleteTextField); subjcb = new CheckBox(SubjectsRegexpCheckBox) { protected boolean wantOnSelectionChangedNotifications() { return true; } }; both components are added to form, so they implicitly get the CompoundPropertyModel. Right, that's wonderful - except now when I click the checkbox the entire page refreshes. When there's lots of stuff on the page this can be a heavy operation. So I took this bit out: subjcb = new CheckBox(SubjectsRegexpCheckBox) { protected boolean wantOnSelectionChangedNotifications() { return true; } }; And now the autocomplete field does not work - well, not completely. If I click submit on the form (which gets that state of the checkbox and field) I get the expected results, even if the autocomplete field doesn't populate correctly. Is there any way I can get round this without forcing a refresh when i click on the checkbox? Cheers WK -- View this message in context: http://www.nabble.com/Synchronizing-AutoCompleteTextField-with-a-checkbox-tf4730399.html#a13526176 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket:enclosure and authorization
so now it calls isVisible? so just call isVisibleInHierarchy() so instead of this: * else* *if* (childComponent != *null*) { // Delegate to child component setVisible(childComponent.isVisible()); } do this: * else* *if* (childComponent != *null*) { // Delegate to child component setVisible(childComponent.*isVisibleInHierarchy*()); } johan On 10/31/07, Igor Vaynberg [EMAIL PROTECTED] wrote: there seems to be a bit of a disconnect between render in auth and our general component visibility concept. perhaps it might be an improvement to aligh auth strategy with visibility rather then render...what do others think? -igor On 10/31/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Hi, OK, figured it might be something like this! Thanks for the fast reply. :-) Regards, Sebastiaan Igor Vaynberg wrote: enclosures work on the visibility level, not render level. since your adminlink is visible, but its rendering is aborted the enclosure still shows the content. to do this you have to put the link into a webmarkupcontainer, and authorize that container instead of a link. -igor On 10/31/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Hi, I have a main menu with an admin link which only renders when the user has the ADMIN role (MainMenu.java): final BookmarkablePageLink adminLink = new BookmarkablePageLink(adminLink, AdminHomePage.class); MetaDataRoleAuthorizationStrategy.authorize(adminLink, RENDER, ADMIN); add(adminLink); In my MainMenu.html I have: wicket:enclosure id=adminLink li a wicket:id=adminLinkAdministratie/a /li /wicket:enclosure I was hoping that when the admin link is not rendered due to the user not having the proper role, that the li/li would also not be rendered, however, it does not seem to work this way... Is this not the way I'm supposed to do this? Or should this work? Otherwise, what is the right way to go about this? Thanks in advance, Sebastiaan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket:enclosure and authorization
stupid extra linefeeds or carriage returns... How can you get rid of them when copy pasting. On 11/1/07, Johan Compagner [EMAIL PROTECTED] wrote: so now it calls isVisible? so just call isVisibleInHierarchy() so instead of this: * else **if* (childComponent != *null*) { // Delegate to child component setVisible( childComponent.isVisible()); } do this: * else **if* (childComponent != *null*) { // Delegate to child component setVisible( childComponent.*isVisibleInHierarchy*()); } johan On 10/31/07, Igor Vaynberg [EMAIL PROTECTED] wrote: there seems to be a bit of a disconnect between render in auth and our general component visibility concept. perhaps it might be an improvement to aligh auth strategy with visibility rather then render...what do others think? -igor On 10/31/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Hi, OK, figured it might be something like this! Thanks for the fast reply. :-) Regards, Sebastiaan Igor Vaynberg wrote: enclosures work on the visibility level, not render level. since your adminlink is visible, but its rendering is aborted the enclosure still shows the content. to do this you have to put the link into a webmarkupcontainer, and authorize that container instead of a link. -igor On 10/31/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Hi, I have a main menu with an admin link which only renders when the user has the ADMIN role (MainMenu.java): final BookmarkablePageLink adminLink = new BookmarkablePageLink(adminLink, AdminHomePage.class); MetaDataRoleAuthorizationStrategy.authorize(adminLink, RENDER, ADMIN); add(adminLink); In my MainMenu.html I have: wicket:enclosure id=adminLink li a wicket:id=adminLinkAdministratie/a /li /wicket:enclosure I was hoping that when the admin link is not rendered due to the user not having the proper role, that the li/li would also not be rendered, however, it does not seem to work this way... Is this not the way I'm supposed to do this? Or should this work? Otherwise, what is the right way to go about this? Thanks in advance, Sebastiaan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem closing a ModalWindow when used through an IFrame
Hi Matej! And thanks for a quick response! I opened a jira issue related to this. The quick start is very straight forward: Just create a html page with this source: html body iframe src= http://www.wicket-library.com/wicket-examples/ajax/modal-window.1; width=100% height=100%/iframe /body /html And then open Show modal dialog with panel and try to close the dialog. Mahavishnu 2007/11/1, Matej Knopp [EMAIL PROTECTED]: The modal window probably won't work well when paced in a page that is loaded in iframe. Still, if you can provide a quickstart assigned to a JIRA entry I will take a look if there is a quick fix for your problem. -Matej On 11/1/07, Deepak Mahavishnu [EMAIL PROTECTED] wrote: Hello! I'm doing some POC testing to find out how a wicket application could be used through an IFrame and noticed that closing of a ModalWindow fails. My setup: Application A: -a dummy html page that has an IFrame -the contents of the IFrame is requested from Application B iframe src=http://localhost:8080/mywicketapp/app/; width=100% height=500/iframe Application B: -a Wicket application that uses a ModalWindow -deployed to tomcat: http://localhost:8080/mywicketapp/ Problem: The ModalWindow is not closed when OK ( or Cancel ) button is clicked when Application B is used throug IFrame of Application A. OK button performs the actual action (in my case deletes an item from a list) but is not closed after the execution of the action. Closing of the ModalWindow works normally when Application B is not used through an IFrame. Any suggestions how this could be solved? Or is the usage through an IFrame a bad idea from start? Any help is appreciated! Mahavishnu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mvn netbeans:netbeans command for QuickStart Project
Great Martjin I'll try it out. f(t) On 10/31/07, Martijn Dashorst [EMAIL PROTECTED] wrote: Netbeans has a module for direct maven support. I think you can download it in the plugin manager (I tried it once and that worked great, but I still didn't like netbeans). Martijn On 10/31/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi I just downloaded the maven 2.0.7 and ran the *mvn archetype:create -DarchetypeGroupId=org.apache.wicket* then ran the *mvn netbeans:netbeans* inside the project to get a Netbeans project. And got an error. I am very new to maven and I was wondering if some one could help me out. I know there is a thing going on with the netbeans plugin but how may I solve it. When googled I got 3 result. f(t) *mvn netbeans:netbeans CONSOLE OUTPUT* $ mvn -e netbeans:netbeans + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'netbeans'. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-netbeans-plugin' does not exist or no valid version could be found [INFO] [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: The plugin ' org.apache.maven.plugins:maven-netbeans-plugin' does not exist or no valid version could be found at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin( DefaultLifecycleExecutor.java:1286) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor( DefaultLifecycleExecutor.java:1522) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds (DefaultLifecycleExecuto r.java:386) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( DefaultLifecycleExecutor.java:138) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java :334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced( Launcher.java :315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode( Launcher.java :430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException: The plugin 'org.apache.maven.plugins:maven-ne tbeans-plugin' does not exist or no valid version could be found at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion (DefaultPluginVersionManager. java:228) at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion (DefaultPluginVersionManager. java:90) at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin( DefaultPluginManager.java:166) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin( DefaultLifecycleExecutor.java:1257) ... 14 more [INFO] [INFO] Total time: 1 second [INFO] Finished at: Wed Oct 31 16:37:20 GMT-03:00 2007 [INFO] Final Memory: 1M/4M [INFO] *mvn archetype:create -DarchetypeGroupId=org.apache.wicket CONSOLE OUTPUT* $ mvn archetype:create -DarchetypeGroupId= org.apache.wicket-DarchetypeArtifactId=wicket-archetype-quickstart -Darchety peVersion=1.3.0-beta4 -DgroupId=ch.logismata-DartifactId=GeckoEnginePanelReplacementBug_QS [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] [INFO] Building Maven Default Project [INFO]task-segment: [archetype:create] (aggregator-style) [INFO] [INFO] Setting property: classpath.resource.loader.class = ' org.codehaus.plexus.velocity.ContextClassLoaderResourceLoad er'. [INFO] Setting property: velocimacro.messages.on = 'false'. [INFO] Setting property: resource.loader = 'classpath'. [INFO] Setting property: resource.manager.logwhenfound = 'false'. [INFO]
{wicket 1.3 beta 4} Error handling (Internal error page)
Hi Im doing some finishing touches at our web application. And Im trying to create a internal error page that gives the possibility for the user to get back to the page that caused the error, just in case that the circumstances that caused the error are gone. Now this is what I've done : in init of the application i've placed this: getApplicationSettings().setInternalErrorPage(InternalErrorPage.class); getExceptionSettings().setUnexpectedExceptionDisplay( IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); @Override public RequestCycle newRequestCycle(final Request request, final Response response) { return new WebRequestCycle(this, (WebRequest) request, (WebResponse) response)[EMAIL PROTECTED] public Page onRuntimeException(Page page, RuntimeException e) { return new InternalErrorPage(page, e); }}; } But page are always null, is there something wrong with this approach? I also have an idea that the overide makes setting the applicationsettings/exceptionsettings unrelevant. PS have looked at the wiki: http://cwiki.apache.org/WICKET/faqs.html#FAQs-HowdoIaddcustomerrorpages%2528likePageExpired%2529%253F regards Nino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JDeveloper and Wicket
johnnyGRE wrote: Hello, How can I setup wicket on JDeveloper? Can anyone help with a step-by-step guide specific on JDev? I have tried but no luck so far. I'm not sure what fancy setup you're looking for, but I've done a little wicket in JDev (Version 10.1.3.2). Basically I add the wicket jar to the list of libraries, and then go into project properties and under the Compiler options add all the extensions of files in my classpath to the list of extensions under the Copy File Types to Output Directory option (.html, .properties, etc.). This makes sure files like you markup files stay in the proper directory for deployment. Then I just develop like I would any other web app. The only annoying part is when I add a new html file (make sure you add it to the proper directory on your classpath and not the default web folder, unless your wicket is setup to look for markup on something other than the classpath). Since I'm not adding to the default web folder, JDev decides to add that directory to the list of resources. Simple to remove in the project properties (under Project Content Resources), but annoying to have to do it for each new html file. Hopefully that helps. Good luck. Joel -- View this message in context: http://www.nabble.com/JDeveloper-and-Wicket-tf4730313.html#a13527949 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: {wicket 1.3 beta 4} Error handling (Internal error page)
Appears I was wrong. This is actually working. I would still like to know if this is the correct way to do it? regards Nino Nino Saturnino Martinez Vazquez Wael wrote: Hi Im doing some finishing touches at our web application. And Im trying to create a internal error page that gives the possibility for the user to get back to the page that caused the error, just in case that the circumstances that caused the error are gone. Now this is what I've done : in init of the application i've placed this: getApplicationSettings().setInternalErrorPage(InternalErrorPage.class); getExceptionSettings().setUnexpectedExceptionDisplay( IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); @Override public RequestCycle newRequestCycle(final Request request, final Response response) { return new WebRequestCycle(this, (WebRequest) request, (WebResponse) response)[EMAIL PROTECTED] public Page onRuntimeException(Page page, RuntimeException e) { return new InternalErrorPage(page, e); }}; } But page are always null, is there something wrong with this approach? I also have an idea that the overide makes setting the applicationsettings/exceptionsettings unrelevant. PS have looked at the wiki: http://cwiki.apache.org/WICKET/faqs.html#FAQs-HowdoIaddcustomerrorpages%2528likePageExpired%2529%253F regards Nino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BUG: Ajax Panel Replacement Issue on Fireforx only (Kind of Complex Scenario)
Matej I've got the QuickStart. I've loaded it with Netbeans 6 beta 2 with the maven plugin. Everything compiled and ran perfectly. I added the panels that show the issue. Now what? Do I Zip the root project folder with all inside and attach it to a JIRA? thanks, f(t) On 10/31/07, Matej Knopp [EMAIL PROTECTED] wrote: Well, it's the last resort for you, but first resort for me :) Issues that are easily reproduce (quickstart) can expect to be resolved sooner, that's how it works. -Matej On 10/31/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Ok I wanted to leave the QuickStart the last resort. I'll get right on it. Jira + QuickStart. We must all contribute. :-) f(t) On 10/31/07, Matej Knopp [EMAIL PROTECTED] wrote: So even better than html page would be a quickstart attched to jira issue that you create about this problem :-) Cheers, -Matej On 10/31/07, Matej Knopp [EMAIL PROTECTED] wrote: Hi, I got your point. But I need a complete html file to be able to reproduce it with as little effort as possible :) My time is quite limited lately :( I don't mind fixing this in wicket, but I need to make sure that this is the right fix and has no side-effect. -Matej On 10/31/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi Matej. Have you read the the forwarded part of the last message? Because that is where I explained the behavior. Basically in Firefox if I replace a panel with two subpanels the second subpanel doesn't get replaced. Please check out the message bellow, the one I forwarded. If you see the org/apache/wicket/ajax/wicket-ajax.js in wicket-1.3.0-beta4.jar. You will see the code for the * Wicket.replaceOuterHtml* In there, I understand that there are two main things going on: 1) There is some code that it is not used and so, in our version we commented it. 2) And most important, we fixed a the issue for us by moving the nodes in the tree herarchy that appears wrongly in the get * range.createContextualFragment*() function from the Gecko (firefox) engine. If there are many subpanels, the range uncorrectly parses the content, resulting in a fragment that contains many childs instead of one. The HTML is explained bellow, if that explanation fails I'll try to send you a file. ok? Our function basically call the *Wicket.replaceOuterHtml=function (){ blah, blah* to replace the one in the framework with the fixed one. And we call the replacement on a window.setTimeOut() on the specific page in which we have the panel with subpanels. thanks, f(t) On 10/30/07, Matej Knopp [EMAIL PROTECTED] wrote: Sorry, I'm not sure I follow. there is some code in replaceOuterHtml that seems redundant so it could be like this: Wicket.replaceOuterHtml = function(element, text) { if (Wicket.Browser.isIE()) { Wicket.replaceOuterHtmlIE(element, text); } else if (Wicket.Browser.isSafari() || Wicket.Browser.isOpera()) { Wicket.replaceOuterHtmlSafari(element, text); } else /* GECKO */ { // create range and fragment var range = element.ownerDocument.createRange(); range.selectNode(element); var fragment = range.createContextualFragment(text); element.parentNode.replaceChild(fragment, element); } } Still I'm not sure what the problem is that your code solves. Can you please provide me a html file where the replaceOuterHtml call fails? -Matej Francisco Diaz Trepat - gmail wrote / napĂsal(a): Hi a cowerker here might have found something here. We have fix the issue by replacing the *Wicket.replaceOuterHtml* function. Could this be a BUG? I have forwarded the initial message that explains the behavior. Here is the code that fixed our problem: f(t) // // Hack that demonstrates a possible fix for a problem with Gecko based browsers. // The problem happens in this line: //var fragment = range.createContextualFragment(text); // If there are many subpanels, the range uncorrectly parses the content, resulting // in a fragment that contains many childs instead of one. // The first child is the first subpanel, and the rest are the other subpanels, // which are incorrectly hang at the same level as the main panel, instead of being // childs
Picklist?
Hello, Is there a picklist component available in wicket? Regards, SAM -- View this message in context: http://www.nabble.com/Picklist--tf4731812.html#a13530160 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ModalWindow question
I would like to use a ModalWindow to prompt for a choice of action for the user. Upon selecting the choice, I would like to close the ModalWindow then redirect the user to a page based on the selected choice. I know you can use setResponsePage in the Link on the ModalWindow page...so how would one go about doing this? Thanks in advance, - Doug -- View this message in context: http://www.nabble.com/ModalWindow-question-tf4731828.html#a13530210 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TabbedPanel
Thanks Igor I guess I was a little mixed up. So ... now I've got 3 tabs (each with a list of BookmarkablePageLinkssort of a submenu) When you click on a BookmarkablePageLink it loads the correct panel into the body of the main page. All of that is great except when I click on a submenu item of a tab (other than the first one) the tabbedpanel always reverts back to the first tab and it's relevant submenu. Ex: Tab1 (submenu: Tab1Link1, Tab1Link2) Tab2 (submenu: Tab2Link1,Tab2Link2) If I click on ... say ... Tab2Link2 the correct panel will load but the tabbedpanel will revert back to Tab1 (and it's submenu) being selected. I believe I need to use setSelectedTab somewhere but have been unable to get it to work. Thanks .. igor.vaynberg wrote: right, and that is just now how markup inheritance or tabbed panel works. you are way off base. if that is what you need then instead of using wicket:child/markup inheritance you should use replace/replaceWith() methods to put the right panel in, and instead of using a tabbed panel you would use something that just generates a list of links that call the replace/replaceWith() methods... -igor On 10/30/07, DRE [EMAIL PROTECTED] wrote: Thanks for you response that link is actually where I got started, however, if you notice when you click the tabs the panel is displayed right below. When I click my tabs I want the panel to be displayed in the body in place of the wicket:child / Any help would be greatly appreciated. igor.vaynberg wrote: see here for an example: http://wicketstuff.org/wicket13/compref/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.TabbedPanelPage -igor On 10/30/07, DRE [EMAIL PROTECTED] wrote: Hoping someone can help me out here I've just started using Wicket and this is what I'm trying to do: I've got a main page that has a header, body, and footer where the body should be used as a wicket child. In the header I have a TabbedPanel. When I click on a tab I want the contents to appear in the body(not right below the tabin the header.) It looks all pretty and the tabs work it's just that when I click on the tab I want This is Tab #1 to be displayed in the body. I've tried using wicket:extend but to no avail. Thanks in advance . Code: PanelPage.html html head title wicket:id=titleTitle goes here/title link rel=stylesheet type=text/css href=css/tab.css / /head body div id=header div wicket:id=tabs class=tabpanel[tabbed panel will be here]/div /div div id=body class=body This is the Body wicket:child / /div div id=footer class=footer br /div /body /html PanelPage.java public class PanelPage extends WebPage { public PanelPage() { final List tabs=new ArrayList(); tabs.add(new AbstractTab(new Model(My Home Page)) { public Panel getPanel(String panelId) { return new TabPanel1(panelId); } }); tabs.add(new AbstractTab(new Model(Leads)) { public Panel getPanel(String panelId) { return new TabPanel2(panelId); } }); final TabbedPanel panel = new TabbedPanel(tabs, tabs); class TabTitleModel extends Model { public Object getObject(Component comp) { return ((ITab) tabs.get(panel.getSelectedTab())).getTitle().getObject(null); } } add(new Label(title, new TabTitleModel())); add(panel); add(new Label(footer, This is in the footer)); } } TabbedPanel.html wicket:panel div class=tab-row ul li wicket:id=tabs !-- The Tab link and display text -- # [[tab title]] /li /ul /div !-- Currently active panel falls here -- [panel] /wicket:panel TabPanel1.html html body wicket:panel This is Tab #1 /wicket:panel /body /html TabPanel1.java package wicket.panel.panels; import wicket.markup.html.panel.Panel; public class TabPanel1 extends Panel { private static final long serialVersionUID = 1L; public TabPanel1(String id) { super(id); } } -- View this message in context: http://www.nabble.com/TabbedPanel-tf4719265.html#a13491072 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe,
Re: Stateless page and Pragma no-cache
On 1 Nov 2007, at 02:38, Johan Compagner wrote: you are right thats not handy. I made it just like we do with resources have a special overridable protected method that is called setHeaders() on WebPage Can you open an jira issue for this so that this is being shown as a change? https://issues.apache.org/jira/browse/WICKET-1122 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AjaxLazyLoadPanel in Beta3 is very lazy
Thanks johan for the quick response. I was a little shocked by this answer, so my next question is a bit late. is there a way to fill a panel from serverside? i mean when i have data, which i get from an external WebService, is there a way to start filling a panel from serverside when the loading of the data is finished? Something like an AjaxLink where the linktext changes after loading the new data to show or a Label which can be change from serverside after the data is received without the need to have a clientside submit or request? Every idea could take me further. santiago Johan Compagner wrote: The AjaxLazyLoadingPanel will block other request to it The only thing it does is that it will show the page already and that the heavy part is then loaded so that the users do see progress. The user can fill in stuff or do other stuff pure clientside. If the users does make a server call then that server call will block until the lazy load is done. Because only 1 request can touch the page at the same time. johan On 10/30/07, SantiagoA [EMAIL PROTECTED] wrote: I have a Problem with the ALLP. I have a Table with some Radios in it and an ALLP on the same Site. So, if I click a Radio in the Table, the ALLP will be refreshed with detail Description of the Element clicked in the Table. My Problem is, that there is more functonality in the Page, which is blocked until the ALLP has completed the work and has loaded the Panel. Maybe i got it wrong, but shouldn´t the ALLP load the Panel to show in background while the functionality will work on the Page beside(submits by buttons, other updates via Ajax, etc.) ??? BTW, the beta4 has brought an errors. When updated to beta4 I get a Task.error (working with Eclipse Europa) whatever that means. Changing back to beta3 solved that issue. -- View this message in context: http://www.nabble.com/AjaxLazyLoadPanel-in-Beta3-is-very-lazy-tf4717010.html#a13484179 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/AjaxLazyLoadPanel-in-Beta3-is-very-lazy-tf4717010.html#a13530945 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mvn netbeans:netbeans command for QuickStart Project
Hi Francisco, Sorry, it does appear that we got it wrong as far the the mvn netbeans:netbeans instruction goes - I've updated the website source (it'll sync eventually) to remove that, leaving the suggestion that, with NB6, the pom.xml can be opened directly. As I use IDEA and most of the other committers use Eclipse, I'm afraid that NetBeans behaviour doesn't seem to be something we can easily check! /Gwyn Thursday, November 1, 2007, 10:56:58 AM, you wrote: FDT thanks al. i would not expect to, as so elocuently put, RTFM for FDT some tool so outside wicket scope. rather wicket projects worked FDT out me the box or with simpler tool such as ant. specially when FDT we are trying to contribute to the cause. f(t) FDT On 10/31/07, Al Maw [EMAIL PROTECTED] wrote: Francisco Diaz Trepat - gmail wrote: Hi I just downloaded the maven 2.0.7 and ran the *mvn archetype:create -DarchetypeGroupId=org.apache.wicket* then ran the *mvn netbeans:netbeans* inside the project to get a Netbeans project. And got an error. That's because there is no such plug-in. RTFM here: http://maven.apache.org/guides/mini/guide-ide-netbeans/guide-ide-netbeans.html Regards, Al - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BUG: Ajax Panel Replacement Issue on Fireforx only (Kind of Complex Scenario)
Yeah, that would work. Cheers, -Matej On 11/1/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Matej I've got the QuickStart. I've loaded it with Netbeans 6 beta 2 with the maven plugin. Everything compiled and ran perfectly. I added the panels that show the issue. Now what? Do I Zip the root project folder with all inside and attach it to a JIRA? thanks, f(t) On 10/31/07, Matej Knopp [EMAIL PROTECTED] wrote: Well, it's the last resort for you, but first resort for me :) Issues that are easily reproduce (quickstart) can expect to be resolved sooner, that's how it works. -Matej On 10/31/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Ok I wanted to leave the QuickStart the last resort. I'll get right on it. Jira + QuickStart. We must all contribute. :-) f(t) On 10/31/07, Matej Knopp [EMAIL PROTECTED] wrote: So even better than html page would be a quickstart attched to jira issue that you create about this problem :-) Cheers, -Matej On 10/31/07, Matej Knopp [EMAIL PROTECTED] wrote: Hi, I got your point. But I need a complete html file to be able to reproduce it with as little effort as possible :) My time is quite limited lately :( I don't mind fixing this in wicket, but I need to make sure that this is the right fix and has no side-effect. -Matej On 10/31/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi Matej. Have you read the the forwarded part of the last message? Because that is where I explained the behavior. Basically in Firefox if I replace a panel with two subpanels the second subpanel doesn't get replaced. Please check out the message bellow, the one I forwarded. If you see the org/apache/wicket/ajax/wicket-ajax.js in wicket-1.3.0-beta4.jar. You will see the code for the * Wicket.replaceOuterHtml* In there, I understand that there are two main things going on: 1) There is some code that it is not used and so, in our version we commented it. 2) And most important, we fixed a the issue for us by moving the nodes in the tree herarchy that appears wrongly in the get * range.createContextualFragment*() function from the Gecko (firefox) engine. If there are many subpanels, the range uncorrectly parses the content, resulting in a fragment that contains many childs instead of one. The HTML is explained bellow, if that explanation fails I'll try to send you a file. ok? Our function basically call the *Wicket.replaceOuterHtml=function (){ blah, blah* to replace the one in the framework with the fixed one. And we call the replacement on a window.setTimeOut() on the specific page in which we have the panel with subpanels. thanks, f(t) On 10/30/07, Matej Knopp [EMAIL PROTECTED] wrote: Sorry, I'm not sure I follow. there is some code in replaceOuterHtml that seems redundant so it could be like this: Wicket.replaceOuterHtml = function(element, text) { if (Wicket.Browser.isIE()) { Wicket.replaceOuterHtmlIE(element, text); } else if (Wicket.Browser.isSafari() || Wicket.Browser.isOpera()) { Wicket.replaceOuterHtmlSafari(element, text); } else /* GECKO */ { // create range and fragment var range = element.ownerDocument.createRange(); range.selectNode(element); var fragment = range.createContextualFragment(text); element.parentNode.replaceChild(fragment, element); } } Still I'm not sure what the problem is that your code solves. Can you please provide me a html file where the replaceOuterHtml call fails? -Matej Francisco Diaz Trepat - gmail wrote / napĂsal(a): Hi a cowerker here might have found something here. We have fix the issue by replacing the *Wicket.replaceOuterHtml* function. Could this be a BUG? I have forwarded the initial message that explains the behavior. Here is the code that fixed our problem: f(t) // // Hack that demonstrates a possible fix for a problem with Gecko based browsers. // The problem happens in this line: //var fragment = range.createContextualFragment(text); // If there are many subpanels, the range uncorrectly parses the content, resulting
Re: mvn netbeans:netbeans command for QuickStart Project
Great!!! f(t) On 11/1/07, Gwyn Evans [EMAIL PROTECTED] wrote: Hi Francisco, Sorry, it does appear that we got it wrong as far the the mvn netbeans:netbeans instruction goes - I've updated the website source (it'll sync eventually) to remove that, leaving the suggestion that, with NB6, the pom.xml can be opened directly. As I use IDEA and most of the other committers use Eclipse, I'm afraid that NetBeans behaviour doesn't seem to be something we can easily check! /Gwyn Thursday, November 1, 2007, 10:56:58 AM, you wrote: FDT thanks al. i would not expect to, as so elocuently put, RTFM for FDT some tool so outside wicket scope. rather wicket projects worked FDT out me the box or with simpler tool such as ant. specially when FDT we are trying to contribute to the cause. f(t) FDT On 10/31/07, Al Maw [EMAIL PROTECTED] wrote: Francisco Diaz Trepat - gmail wrote: Hi I just downloaded the maven 2.0.7 and ran the *mvn archetype:create -DarchetypeGroupId=org.apache.wicket* then ran the *mvn netbeans:netbeans* inside the project to get a Netbeans project. And got an error. That's because there is no such plug-in. RTFM here: http://maven.apache.org/guides/mini/guide-ide-netbeans/guide-ide-netbeans.html Regards, Al - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IExceptionResponseStrategy gone from 1.3
override requestcycle.onruntimeexception() -igor On 11/1/07, Dipu Seminlal [EMAIL PROTECTED] wrote: Hi all, I had a simple implementation of IExceptionResponseStrategy which helped me to do this protected IRequestCycleProcessor newRequestCycleProcessor() { return new DefaultWebRequestCycleProcessor() { protected IExceptionResponseStrategy newExceptionResponseStrategy() { return new MyExceptionStrategy(); } }; } and throw new RestartResponseException(new MyErrorPage(e,page)); from MyExceptionStrategy and log the exception in the error page. Now i am in the process of migrating my existing application which run on 1.2.6 to 1.3 and i see IExceptionResponseStrategy has gone missing. I would like to pass on the exception to my error page and log it as i was doing before. What is the best way to do it ? I can see that i can override public void respond(RuntimeException e, RequestCycle requestCycle) and do it, is the right direction to take ? Regards Dipu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Two forms on the same page
wait until you discover we support embedded forms, that will really screw with your mind... -igor On 11/1/07, Cristi Manole [EMAIL PROTECTED] wrote: i am so sorry for your time. looked for ages at that tag. seems i should have a vacation is there a way to delete this thread? :) again, sorry for your time. On 11/1/07, Martijn Dashorst [EMAIL PROTECTED] wrote: form wiked:id = tableForm method = post action = maybe change this to wicket:id? Martijn On 11/1/07, Cristi Manole [EMAIL PROTECTED] wrote: thanks for your quick answer. here goes the problem details :) !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; head wicket:head style !-- for autocomplete -- div.wicket-aa { font-family: Lucida Grande,Lucida Sans Unicode,Tahoma,Verdana; font-size: 12px; background-color: #33; border-width: 1px; border-color: white; border-style: solid; padding: 2px; margin: 1px 0 0 0; text-align: left; } div.wicket-aa ul { list-style:none; padding: 2px; margin:0;} div.wicket-aa ul li.selected { color: #FFCC33; background-color: black; padding: 0px; margin:0;} /style /wicket:head /head body wicket:panel form wicket:id = searchForm method = post action = table tr tdOwner: /td tdinput wicket:id = owner type = text value = name = owner class = moneyrulz //td /tr tr tdName: /td tdinput wicket:id = name type = text value = name = name class = moneyrulz //td /tr tr tdInfo: /td tdinput wicket:id = info type = text value = name = info class = moneyrulz //td /tr tr tdDescription: /td tdinput wicket:id = description type = text value = name = description class = moneyrulz //td /tr tr tdMedia: /td tdinput wicket:id = media type = text value = name = media class = moneyrulz //td /tr tr tdCategory: /td tdinput wicket:id = category type = text value = name = category class = moneyrulz //td /tr tr td colspan=2input wicket:id = ajax-submit-button type = submit id = search value = Go class = moneyrulz//td /tr /table /form br/ form wiked:id = tableForm method = post action = input type = submit value = Delete Selected/ !-- span wicket:id = group pinput type=checkbox wicket:id=groupselectorToggle Check All/input/p table cellspacing = 0 wicket:id = table[table]/table /span -- /form /wicket:panel /body /html public class MyMediaPanel extends Panel { private static final long serialVersionUID = 5601408978271834993L; MyMediaDAO selectedMyMedia; MyAjaxFallbackDefaultDataTable ajaxTable; SortableMyMediaDataProvider dataProvider = new SortableMyMediaDataProvider(); @SpringBean private JdbcMyMedia jdbcMyMedia; public MyMediaPanel(String id) { super(id); add(new MyMediaPanelSearchForm(searchForm)); //Form tableForm = new Form(tableForm) { //protected void onSubmit() { //} //}; //CheckGroup group = new CheckGroup(group, new ArrayListObject()); //group.add(new CheckGroupSelector(groupselector)); //group.add(ajaxTable = createTable()); //tableForm.add(group); add(new Form(tableForm)); //add(group); } [etc] 1. [MarkupContainer [Component id = tableForm, page = com.moneyrulz.mymedia.MyMediaMainPage, path = 2:mymediaPanel: tableForm.Form, isVisible = true, isVersioned = false]] org.apache.wicket.WicketRuntimeException: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = tableForm, page = com.moneyrulz.mymedia.MyMediaMainPage, path = 2:mymediaPanel: tableForm.Form, isVisible = true, isVersioned = false]] at org.apache.wicket.Page.checkRendering(Page.java:1057) at org.apache.wicket.Page.renderPage(Page.java:871) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond (BookmarkablePageRequestTarget.java:225)
Re: wicket:enclosure and authorization
i mean the action should be called VISIBLE instead of RENDER and we should also have isVisibleAllowed() just like we have isEnabled()/isEnabledAllowed() makes more sense? that way the check in enclosure is: if (child.isvisible()child.isvisibleallowed()) { ...} -igor On 11/1/07, Maurice Marrink [EMAIL PROTECTED] wrote: On Oct 31, 2007 9:58 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: there seems to be a bit of a disconnect between render in auth and our general component visibility concept. perhaps it might be an improvement to aligh auth strategy with visibility rather then render...what do others think? What exactly do you mean by this? Do you want isVisible to also check permission for the render action? Maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Picklist?
http://wicketstuff.org/wicket13/compref/;jsessionid=8B0BE6767513433D186ACDA13707FC4F?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.compref.PalettePage -igor On 11/1/07, SamImari [EMAIL PROTECTED] wrote: Hello, Is there a picklist component available in wicket? Regards, SAM -- View this message in context: http://www.nabble.com/Picklist--tf4731812.html#a13530160 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IExceptionResponseStrategy gone from 1.3
Hi Igor, Many thanks for the reply, so will that be correct if i do the following in my application class /** * @see org.apache.wicket.Application#newRequestCycle( org.apache.wicket.Request, * org.apache.wicket.Response) */ public RequestCycle newRequestCycle(final Request request, final Response response) { return new WebRequestCycle(this, (WebRequest)request, (WebResponse)response) { @Override public Page onRuntimeException(Page page, RuntimeException e) { // TODO Auto-generated method stub return new ErrorPage(e,page); } }; } or do you mean something else ?? Kind Regards Dipu On 11/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: override requestcycle.onruntimeexception() -igor On 11/1/07, Dipu Seminlal [EMAIL PROTECTED] wrote: Hi all, I had a simple implementation of IExceptionResponseStrategy which helped me to do this protected IRequestCycleProcessor newRequestCycleProcessor() { return new DefaultWebRequestCycleProcessor() { protected IExceptionResponseStrategy newExceptionResponseStrategy() { return new MyExceptionStrategy(); } }; } and throw new RestartResponseException(new MyErrorPage(e,page)); from MyExceptionStrategy and log the exception in the error page. Now i am in the process of migrating my existing application which run on 1.2.6 to 1.3 and i see IExceptionResponseStrategy has gone missing. I would like to pass on the exception to my error page and log it as i was doing before. What is the best way to do it ? I can see that i can override public void respond(RuntimeException e, RequestCycle requestCycle) and do it, is the right direction to take ? Regards Dipu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: ModalWindow question
Thanks Stefan. I figured that this is what I was left with...had to wait to the onWindowCloseCallback to handle the user action properly. I was hoping for a more elegant (already built) means to be able to pass back to the calling ModalWindow to identify what action was performed. But since I was not able to find anything, I did the following: 1) Created a ModalWindowCallbackState public class ModalWindowCallbackState implements Serializable { public Object value; } 2) Passed that into my displayed component in the ModalWindow final ModalWindowCallbackState callbackState = new ModalWindowCallbackState(); ... successWindow.setPageCreator(new ModalWindow.PageCreator() { public Page createPage() { return new SuccessConfirmation(successWindow, callbackState); } }); 3) Check the callback state in the onWindowClosedCallback successWindow.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { if ( callbackState.value == null || callbackState.value.equals( /* Cancel */ ) { setResponsePage( /* CancelPage */ ); } else if ( callbackState.value.equals( /* ACTION FOO */)) { setResponsePage( /* FooPage */ ); } ... } ); -- View this message in context: http://www.nabble.com/ModalWindow-question-tf4731828.html#a13532596 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IExceptionResponseStrategy gone from 1.3
looks good -igor On 11/1/07, Dipu Seminlal [EMAIL PROTECTED] wrote: Hi Igor, Many thanks for the reply, so will that be correct if i do the following in my application class /** * @see org.apache.wicket.Application#newRequestCycle( org.apache.wicket.Request, * org.apache.wicket.Response) */ public RequestCycle newRequestCycle(final Request request, final Response response) { return new WebRequestCycle(this, (WebRequest)request, (WebResponse)response) { @Override public Page onRuntimeException(Page page, RuntimeException e) { // TODO Auto-generated method stub return new ErrorPage(e,page); } }; } or do you mean something else ?? Kind Regards Dipu On 11/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: override requestcycle.onruntimeexception() -igor On 11/1/07, Dipu Seminlal [EMAIL PROTECTED] wrote: Hi all, I had a simple implementation of IExceptionResponseStrategy which helped me to do this protected IRequestCycleProcessor newRequestCycleProcessor() { return new DefaultWebRequestCycleProcessor() { protected IExceptionResponseStrategy newExceptionResponseStrategy() { return new MyExceptionStrategy(); } }; } and throw new RestartResponseException(new MyErrorPage(e,page)); from MyExceptionStrategy and log the exception in the error page. Now i am in the process of migrating my existing application which run on 1.2.6 to 1.3 and i see IExceptionResponseStrategy has gone missing. I would like to pass on the exception to my error page and log it as i was doing before. What is the best way to do it ? I can see that i can override public void respond(RuntimeException e, RequestCycle requestCycle) and do it, is the right direction to take ? Regards Dipu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Best practice question
I believe I may be doing somethings incorrect in my application because I just ran across an OutOfMemoryError and the steps involved were small. I did increase the memory size to -Xms256m -Xmx512m which got me past the original issue...but I did notice that the application heap size continues to grow more than I thought it should. In other words, my app won't scale when I add more users beyond me :-| Where I think I am causing problems in my memory management is that I am passing Page references around. I do this so I can place a Cancel button and go back to the previous page rather than relying on the browser back button. Is this the wrong approach? If so, what should I do to achieve this behavior? or should I just remove the Cancel button and rely on the browser back button? Also, I don't clean anything up at all, i.e. pages. Should I? If so, when? and how? Thanks - Doug -- View this message in context: http://www.nabble.com/Best-practice-question-tf4732767.html#a13533032 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best practice question
i do the same thing all over the place and no memory issues here, so look for something else or use a profiler to see exactly what you are leaking -igor On 11/1/07, Doug Leeper [EMAIL PROTECTED] wrote: I believe I may be doing somethings incorrect in my application because I just ran across an OutOfMemoryError and the steps involved were small. I did increase the memory size to -Xms256m -Xmx512m which got me past the original issue...but I did notice that the application heap size continues to grow more than I thought it should. In other words, my app won't scale when I add more users beyond me :-| Where I think I am causing problems in my memory management is that I am passing Page references around. I do this so I can place a Cancel button and go back to the previous page rather than relying on the browser back button. Is this the wrong approach? If so, what should I do to achieve this behavior? or should I just remove the Cancel button and rely on the browser back button? Also, I don't clean anything up at all, i.e. pages. Should I? If so, when? and how? Thanks - Doug -- View this message in context: http://www.nabble.com/Best-practice-question-tf4732767.html#a13533032 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best practice question
That is good that you do the same thing...so it must be my implementation that is wrong. I use an optimizer to find the issue. Do you recommend a reasonable one? Also, is it possible to introspect the serialized data? Also, I am using Hibernate. Would classes obtained via Hibernate that are local objects to a page be a problem? -- View this message in context: http://www.nabble.com/Best-practice-question-tf4732767.html#a13534427 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket:enclosure and authorization
On 11/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i mean the action should be called VISIBLE instead of RENDER and we should also have isVisibleAllowed() just like we have isEnabled()/isEnabledAllowed() thats just isRenderedAllowed() thats the same thing. Just different name rename it if you want. makes more sense? that way the check in enclosure is: if (child.isvisible()child.isvisibleallowed()) { ...} and thats the same as child.isVisible() child.isRenderedAllowed() which is the same is child.isVisibleInHierarchy() (that only also walks the hierarchy) johan -igor On 11/1/07, Maurice Marrink [EMAIL PROTECTED] wrote: On Oct 31, 2007 9:58 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: there seems to be a bit of a disconnect between render in auth and our general component visibility concept. perhaps it might be an improvement to aligh auth strategy with visibility rather then render...what do others think? What exactly do you mean by this? Do you want isVisible to also check permission for the render action? Maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: trouble attaching source
I've used source attachements through mvn eclipse:eclipse with beta 3 and 4 without problems. Eelco On 11/1/07, Devin Venable [EMAIL PROTECTED] wrote: Has anyone encountered a problem attacheing wicket-1.3.0-beta2 source to Eclipse Europa (3.3)? Each time I attempt Eclipse gives me An error occurred while applying the source element. Failed to execute runnable (java.lang.NullPointer). I've added as a file (apache-wicket-1.3.0-beta2.zip) and as an extracted folder. Still having trouble attaching. Also, we're just switching over to maven builds and we're using the maven plugin. In a previous post I read... we are working on linking the javadoc...you do know wicket is a maven project right? so there is of course javadoc in the maven repo: http://repo1.maven.org/maven2/org/apache/wicket/wicket/1.3.0-beta2/ further, since it is open source simply attach the sources to your ide and you are set. if you are using maven2 and eclipse add the wicket dep to your pom and do mvn eclipse:eclipse -DdownloadSources=true - and you are all set. Any more info on this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best practice question
i use yourkit, it seems to work pretty darn well -igor On 11/1/07, Doug Leeper [EMAIL PROTECTED] wrote: That is good that you do the same thing...so it must be my implementation that is wrong. I use an optimizer to find the issue. Do you recommend a reasonable one? Also, is it possible to introspect the serialized data? Also, I am using Hibernate. Would classes obtained via Hibernate that are local objects to a page be a problem? -- View this message in context: http://www.nabble.com/Best-practice-question-tf4732767.html#a13534427 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket:enclosure and authorization
yes, but you see how we have two concepts: visible and render, where as we really only need one, i will tweak the enclosure and add isrenderallowed check -igor On 11/1/07, Johan Compagner [EMAIL PROTECTED] wrote: On 11/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i mean the action should be called VISIBLE instead of RENDER and we should also have isVisibleAllowed() just like we have isEnabled()/isEnabledAllowed() thats just isRenderedAllowed() thats the same thing. Just different name rename it if you want. makes more sense? that way the check in enclosure is: if (child.isvisible()child.isvisibleallowed()) { ...} and thats the same as child.isVisible() child.isRenderedAllowed() which is the same is child.isVisibleInHierarchy() (that only also walks the hierarchy) johan -igor On 11/1/07, Maurice Marrink [EMAIL PROTECTED] wrote: On Oct 31, 2007 9:58 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: there seems to be a bit of a disconnect between render in auth and our general component visibility concept. perhaps it might be an improvement to aligh auth strategy with visibility rather then render...what do others think? What exactly do you mean by this? Do you want isVisible to also check permission for the render action? Maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best practice question
Yourkit really works pretty darn well. Btw. What wicket version are you using? And are you sure it's Wicket / Web that is leaking? -Matej On 11/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i use yourkit, it seems to work pretty darn well -igor On 11/1/07, Doug Leeper [EMAIL PROTECTED] wrote: That is good that you do the same thing...so it must be my implementation that is wrong. I use an optimizer to find the issue. Do you recommend a reasonable one? Also, is it possible to introspect the serialized data? Also, I am using Hibernate. Would classes obtained via Hibernate that are local objects to a page be a problem? -- View this message in context: http://www.nabble.com/Best-practice-question-tf4732767.html#a13534427 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: communication between frames and customizing LinkTree
Why do you use frames anyway? If you want to pass things between frames javascript is the only way, but I don't see what's the point of using frames when you have framework capable of Ajax partial page updates. -Matej On 11/1/07, Devin Venable [EMAIL PROTECTED] wrote: I posted a question a few days ago on how to best deal with frames, in particular how to pass arguments between a tree view in one frame and a list view in another. I didn't get any takers. I finally determined that there was no good way other than to use plain-old javascript to push values from the tree up to the parent frame, where they are dispersed to the other frames. I wanted to use LinkTree, but really didn't need most of the features other than the look and feel. I just needed to be able to insert an onclick link that would pass a value to my parent frame. After a lot of digging I came up with a solution that worked, but seems verbose for the job I'm attempting. My question for dear reader is this: Can you propose an more concise solution? public class CategoryTree extends LinkTree { @Override protected Component newNodeComponent(String id, IModel model) { return new LinkIconPanel(id, model, CategoryTree.this) { private static final long serialVersionUID = 1L; protected void onNodeLinkClicked(TreeNode node, BaseTree tree, AjaxRequestTarget target) { super.onNodeLinkClicked(node, tree, target); CategoryTree.this.onNodeLinkClicked(node, tree, target); } protected Component newContentComponent(String componentId, BaseTree tree, IModel model) { Label l = new Label(componentId, model) { private static final long serialVersionUID = 1L; @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put(onclick, parent.notifyViews(this.getAttribute('catalogid'))); } }; DefaultMutableTreeNode n = (DefaultMutableTreeNode)model.getObject(); if (n.getUserObject() instanceof EcCategoryTreeNode) { EcCategoryTreeNode ec = (EcCategoryTreeNode)n.getUserObject(); l.add(new SimpleAttributeModifier(catalogid, + ec.getId())); } return l; }; }; } public CategoryTree(String s, TreeModel tm) { super(s,tm); this.setLinkType(LinkType.REGULAR); } } Devin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best practice question
I am using Jdk1.5 and Wicket 1.3/Trunk (from earlier this week) I just downloaded and installed YourKit. I stepped through my application and took snapshots. The bulk of the memory is in byte[]. Traversing the graph where this is located is in the org.apache.wicket.protocol.http.pagestore.DiskPageStore$SerializedPageWithSession (75% of memory/~26MB of total heap) This not only with a small number of pages Home Page Login Page User Page Building Page Select Tab NewAssetPage - SelectCategory - SelectModel - Info - Confirm - ModalWindow Back to Building Page The heap really jumps when I use Ajax. Any idea what else I need to look at. I can't go beyond DiskPageStore because it says Objects are retained by instances of several classes I have included an image of the snapshot. http://www.nabble.com/file/p13536655/wicket-profle-snapshot.gif -- View this message in context: http://www.nabble.com/Best-practice-question-tf4732767.html#a13536655 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Retrieving Post Parameters with PageParameters
Thanks for all the replies. I found out that the issue was related to my Apache settings and the names of my Inputs that I was passing over to the IFrame. No Wicket Issues here. - Chris Chris Fierer wrote: I am using an IFrame to call into a webpage with a form. When, that form is submitted, it posts back to my site. It sends the data via a POST Request. I was using the PageParameters object in my Page Constructor, but it never gets hit (I was using breakpoints). I have dug around the forum and tried various mount options, but still haven't had much luck. All GET Parameters work fine, it's just the POST Parameters. Could anyone help me out on sharing how to pull POST Parameters from the PageParameters object? Thanks, Chris -- View this message in context: http://www.nabble.com/Retrieving-Post-Parameters-with-PageParameters-tf4697756.html#a13537711 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Attaching Feedback from Child Form to Parent Feedback Panel
I was digging around for this the other day and didn't seem to find my answer. Here is my situation: I have a FeedbackPanel located in my Parent Page. Then, I have a form in my Child Page. I want the automated Wicket validation to attach it's messages to my feedback Panel in the Parent. I think this attachment is happening just fine. What is not happening is the Render methods I have overridden to make the feedback panel fit my layout (I have overridden the renderBefore and renderAfter methods with additional markup). Any thoughts on making this happen? Thanks, Chris -- View this message in context: http://www.nabble.com/Attaching-Feedback-from-Child-Form-to-Parent-Feedback-Panel-tf4734232.html#a13537937 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Preserving user input after form error
I've created a form and set up some validators on various fields. When there is an error and the page is redisplayed showing the errors none of the previous values that the user typed in are there. Is there an easy way to preserve the values already entered by the user? I tried overriding onError but it didn't seem to do get it working: public final void onError() { // update model fields so the user doesn't have to type them in again // - I was hoping that the next page render would get these //values from the updated model updateFormComponentModels(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BUG: Ajax Panel Replacement Issue on Fireforx only (Kind of Complex Scenario)
Done, I reported the issue. Attached the Ziped QuickStart and added the FIX or a Fix in the form of a Comment. Please let me know as I might done something incorrectly like filling the correct values for the properties of the Issue. Example: it is not major, it is minor. things like that. f(t) On 11/1/07, Matej Knopp [EMAIL PROTECTED] wrote: Yeah, that would work. Cheers, -Matej On 11/1/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Matej I've got the QuickStart. I've loaded it with Netbeans 6 beta 2 with the maven plugin. Everything compiled and ran perfectly. I added the panels that show the issue. Now what? Do I Zip the root project folder with all inside and attach it to a JIRA? thanks, f(t) On 10/31/07, Matej Knopp [EMAIL PROTECTED] wrote: Well, it's the last resort for you, but first resort for me :) Issues that are easily reproduce (quickstart) can expect to be resolved sooner, that's how it works. -Matej On 10/31/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Ok I wanted to leave the QuickStart the last resort. I'll get right on it. Jira + QuickStart. We must all contribute. :-) f(t) On 10/31/07, Matej Knopp [EMAIL PROTECTED] wrote: So even better than html page would be a quickstart attched to jira issue that you create about this problem :-) Cheers, -Matej On 10/31/07, Matej Knopp [EMAIL PROTECTED] wrote: Hi, I got your point. But I need a complete html file to be able to reproduce it with as little effort as possible :) My time is quite limited lately :( I don't mind fixing this in wicket, but I need to make sure that this is the right fix and has no side-effect. -Matej On 10/31/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi Matej. Have you read the the forwarded part of the last message? Because that is where I explained the behavior. Basically in Firefox if I replace a panel with two subpanels the second subpanel doesn't get replaced. Please check out the message bellow, the one I forwarded. If you see the org/apache/wicket/ajax/wicket-ajax.js in wicket-1.3.0-beta4.jar. You will see the code for the * Wicket.replaceOuterHtml* In there, I understand that there are two main things going on: 1) There is some code that it is not used and so, in our version we commented it. 2) And most important, we fixed a the issue for us by moving the nodes in the tree herarchy that appears wrongly in the get * range.createContextualFragment*() function from the Gecko (firefox) engine. If there are many subpanels, the range uncorrectly parses the content, resulting in a fragment that contains many childs instead of one. The HTML is explained bellow, if that explanation fails I'll try to send you a file. ok? Our function basically call the * Wicket.replaceOuterHtml=function (){ blah, blah* to replace the one in the framework with the fixed one. And we call the replacement on a window.setTimeOut() on the specific page in which we have the panel with subpanels. thanks, f(t) On 10/30/07, Matej Knopp [EMAIL PROTECTED] wrote: Sorry, I'm not sure I follow. there is some code in replaceOuterHtml that seems redundant so it could be like this: Wicket.replaceOuterHtml = function(element, text) { if (Wicket.Browser.isIE()) { Wicket.replaceOuterHtmlIE(element, text); } else if (Wicket.Browser.isSafari() || Wicket.Browser.isOpera()) { Wicket.replaceOuterHtmlSafari(element, text); } else /* GECKO */ { // create range and fragment var range = element.ownerDocument.createRange(); range.selectNode(element); var fragment = range.createContextualFragment(text); element.parentNode.replaceChild(fragment, element); } } Still I'm not sure what the problem is that your code solves. Can you please provide me a html file where the replaceOuterHtml call fails? -Matej Francisco Diaz Trepat - gmail wrote / napĂsal(a): Hi a cowerker here might have found something here. We have fix the issue by replacing the *Wicket.replaceOuterHtml* function. Could this be a BUG? I have forwarded the initial message that explains the behavior.
Re: Preserving user input after form error
thats odd, all the values should be preserved, thats our rawinput that all formcomponents have. Do you have a repeater/listview around your formcomponents. On 11/1/07, Chris Colman [EMAIL PROTECTED] wrote: I've created a form and set up some validators on various fields. When there is an error and the page is redisplayed showing the errors none of the previous values that the user typed in are there. Is there an easy way to preserve the values already entered by the user? I tried overriding onError but it didn't seem to do get it working: public final void onError() { // update model fields so the user doesn't have to type them in again // - I was hoping that the next page render would get these //values from the updated model updateFormComponentModels(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket:enclosure and authorization
they are not really 2 concepts, if something is not visible then it wont be rendered or if something is not rendered then it is not visible, so isRenderedAllowed() is just isVisibleAllowed(), So rename it?? On 11/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, but you see how we have two concepts: visible and render, where as we really only need one, i will tweak the enclosure and add isrenderallowed check -igor On 11/1/07, Johan Compagner [EMAIL PROTECTED] wrote: On 11/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i mean the action should be called VISIBLE instead of RENDER and we should also have isVisibleAllowed() just like we have isEnabled()/isEnabledAllowed() thats just isRenderedAllowed() thats the same thing. Just different name rename it if you want. makes more sense? that way the check in enclosure is: if (child.isvisible()child.isvisibleallowed()) { ...} and thats the same as child.isVisible() child.isRenderedAllowed() which is the same is child.isVisibleInHierarchy() (that only also walks the hierarchy) johan -igor On 11/1/07, Maurice Marrink [EMAIL PROTECTED] wrote: On Oct 31, 2007 9:58 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: there seems to be a bit of a disconnect between render in auth and our general component visibility concept. perhaps it might be an improvement to aligh auth strategy with visibility rather then render...what do others think? What exactly do you mean by this? Do you want isVisible to also check permission for the render action? Maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IE 3-7
On Nov 1, 2007 4:52 PM, William Hoover [EMAIL PROTECTED] wrote: If anyone is interested in running IE versions 3-7 on the same machine checkout http://tredosoft.com/Multiple_IE and http://tredosoft.com/IE7_standalone william, thanks for the link. i tried Multiple IE (for IE6) and it works well. no more need for a dedicated vm windows installation just for IE6 ;) Gerolf
RE: Preserving user input after form error
thats odd, all the values should be preserved, thats our rawinput that all formcomponents have. Do you have a repeater/listview around your formcomponents. Hmmm, I don't know why my form doesn't preserve it. Here's the source of the form. Can you spot anything that I'm doing wrong? // -[KeepHeading]- // -[Copyright]- /** * (c) 2007. Step Ahead Software. All rights reserved. * * Source file created and managed by Javelin (TM) Step Ahead Software. * To maintain code and model synchronization you may directly edit code in method bodies * and any sections starting with the 'Keep_*' marker. Make all other changes via Javelin. * See http://stepaheadsoftware.com for more details. */ package com.sas.av.ui.wicket.templates.original; import java.lang.*; import com.sas.av.ui.wicket.templates.original.StandardPage; import com.sas.av.model.context.EServerContext; // -[KeepBeforeClass]- import com.sas.av.ui.wicket.templates.*; import wicket.PageParameters; import wicket.markup.html.basic.Label; import wicket.markup.html.form.*; import wicket.markup.html.panel.*; import wicket.util.string.*; import wicket.model.*; import wicket.model.PropertyModel; import wicket.markup.html.image.*; import wicket.extensions.markup.html.captcha.*; import java.lang.*; import java.util.Random; // -[Class]- /** * Information Request Page. * * @author Chris Colman */ public class InformationRequestPage extends StandardPage { // -[KeepWithinClass]- // inner class form: public final class InformationRequestForm extends Form { private final InformationRequest infoRequest = new InformationRequest(); // CAPTCHA Challenge private String captchaValue = generateCaptchaValue(); private String captchaInput = new String(fred); public String getCaptchaInput() {return captchaInput;} public void setCaptchaInput(String iCaptchaInput) { captchaInput = iCaptchaInput; } public String generateCaptchaValue() { return Integer.toString(random.nextInt(200)+100); } private Image captchaImage = new Image(captchaImage); private CaptchaValidator captchaValidator; public InformationRequestForm(final String iId) { super(iId); add(new TextArea(name, new PropertyModel(infoRequest, name)).setRequired(true)); add(new TextArea(company, new PropertyModel(infoRequest, company))); add(new TextArea(phone, new PropertyModel(infoRequest, phone))); add(new TextArea(email, new PropertyModel(infoRequest, email)).setRequired(true)); add(new TextArea(comments, new PropertyModel(infoRequest, comments))); TextField captchaField = new TextField(captcha, new PropertyModel(this, captchaInput)); captchaValidator = new CaptchaValidator(captchaValue); captchaField.add(captchaValidator); add(captchaField); refreshCapture(); add(captchaImage); } public final void onError() { super.onError(); // update model fields so the user doesn't have to // type them in again updateFormComponentModels(); refreshCapture(); } public void refreshCapture() { captchaValue = generateCaptchaValue(); CaptchaImageResource captchaImageResource = new CaptchaImageResource(captchaValue, 80, 5); captchaImage.setImageResource(captchaImageResource); captchaValidator.setCaptchaValue(captchaValue); } public final void onSubmit() { StringBuffer sb = new StringBuffer(); sb.append(Name + infoRequest.getName()); PageParameters pageParameters = new PageParameters(); // set up parameters ... setResponsePage( InformationRequestAckPage.class, pageParameters); } } // -[Fields]- /** * A random object! */ public static transient Random random = new Random(); // -[Methods]- /** * Constructs the object */ public InformationRequestPage() { } /** * */ public InformationRequestPage(final PageParameters parameters) throws StringValueConversionException { super(parameters); add(new FeedbackPanel(feedback)); add(new InformationRequestForm(informationRequest)); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Preserving user input after form error
Oh yeah, I'm using Wicket 1.2.6 if that has any bearing on the situation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using tables with the SortableListView
Hi, I've been working on a project that uses the SortableListView (wicket extensions). My current code uses ul li tags to display the sortable list, just like the example shows here: http://wicketstuff.org/confluence/display/STUFFWIKI/Script.aculo.us+SortableListView But instead of having a li dot in front of the selection I tried using table and tr as suggested on that examples page, but I couldn't sort it anymore... Is using tables supported? Does anybody have it working? I tried to do it like this (copied the example): table wicket:id=itemList tr wicket:id=item td span wicket:id=labelSomething unique for this object/span /td /tr /table Any ideas what I did wrong? Roy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Preserving user input after form error
i dont know what goes wrong then for you because if i test this: http://wicketstuff.org/wicket12/forminput/ that that works fine. If you make a validation error on 1 the rest keep there values. On 11/1/07, Chris Colman [EMAIL PROTECTED] wrote: Oh yeah, I'm using Wicket 1.2.6 if that has any bearing on the situation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Preserving user input after form error
i dont know what goes wrong then for you because if i test this: http://wicketstuff.org/wicket12/forminput/ that that works fine. If you make a validation error on 1 the rest keep there values. The only difference I can see so far is that my form page is an 'extended' page where the form component is added in mark up inside a wicket:extend ... form sits in here ... /wicket:extend construct. On 11/1/07, Chris Colman [EMAIL PROTECTED] wrote: Oh yeah, I'm using Wicket 1.2.6 if that has any bearing on the situation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Removed Validator? (was Re: Two forms on the same page)
Thursday, November 1, 2007, 4:26:24 PM, you wrote: IV wait until you discover we support embedded forms, that will really IV screw with your mind... Talking of which, are there any Best Practices for dynamic instances of that? The specific issue I've just run across is where I have a outer form and, depending upon a checkbox, might have an inner form being enabled of not. (It's an inner form, rather than just a part of the main form as it's off as a component with it's own panel.) Anyway, the inner form has password/confirmPassword fields and an EqualInputValidator, but if the form is displayed but then disabled again (via Ajax, if significant,) when the form's finally submitted I get a warning, saying IFormValidator in form '...' depends on a component that has been removed from the page or is no longer visible. Offending component id `password`. Any thoughts on the best approach to this? -- /Gwyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: communication between frames and customizing LinkTree
I'd be happy to not use frames, but I don't have the choice at this time because the application is already written using frames and time won't permit a total rewrite---at least that was our thinking when we decided to leave most of the application as-is. From my experience so far, I guess we should have just abandoned frames because it's harder to work with them using Wicket. That's no fault of Wicket---it's designed for panels and not frames. -Devin On 11/1/07, Matej Knopp [EMAIL PROTECTED] wrote: Why do you use frames anyway? If you want to pass things between frames javascript is the only way, but I don't see what's the point of using frames when you have framework capable of Ajax partial page updates. -Matej On 11/1/07, Devin Venable [EMAIL PROTECTED] wrote: I posted a question a few days ago on how to best deal with frames, in particular how to pass arguments between a tree view in one frame and a list view in another. I didn't get any takers. I finally determined that there was no good way other than to use plain-old javascript to push values from the tree up to the parent frame, where they are dispersed to the other frames. I wanted to use LinkTree, but really didn't need most of the features other than the look and feel. I just needed to be able to insert an onclick link that would pass a value to my parent frame. After a lot of digging I came up with a solution that worked, but seems verbose for the job I'm attempting. My question for dear reader is this: Can you propose an more concise solution? public class CategoryTree extends LinkTree { @Override protected Component newNodeComponent(String id, IModel model) { return new LinkIconPanel(id, model, CategoryTree.this) { private static final long serialVersionUID = 1L; protected void onNodeLinkClicked(TreeNode node, BaseTree tree, AjaxRequestTarget target) { super.onNodeLinkClicked(node, tree, target); CategoryTree.this.onNodeLinkClicked(node, tree, target); } protected Component newContentComponent(String componentId, BaseTree tree, IModel model) { Label l = new Label(componentId, model) { private static final long serialVersionUID = 1L; @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put(onclick, parent.notifyViews(this.getAttribute('catalogid'))); } }; DefaultMutableTreeNode n = (DefaultMutableTreeNode)model.getObject(); if (n.getUserObject() instanceof EcCategoryTreeNode) { EcCategoryTreeNode ec = (EcCategoryTreeNode)n.getUserObject(); l.add(new SimpleAttributeModifier(catalogid, + ec.getId())); } return l; }; }; } public CategoryTree(String s, TreeModel tm) { super(s,tm); this.setLinkType(LinkType.REGULAR); } } Devin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Devin Venable Senior Programmer Analyst Vetsource Work: 503-802-7471 Mobile: 918-946-6806 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
pageMap question ?
PageMap stores a single instance of a particular page ? OR could it have multiple instances of the same page (browsed by user at different instances against 2 different use-case lets say), and if there could be muliple instances of the same page, its just the page being viewed which is in the PageMap (in session) and the rest are all serialized on the disk, database etc... ARE they all rendered instances or the components and models are stored seperately...? i am just familiarizing myself with the concept, i mean wouldnt we want to have latest data against each page displayed every time, why version them then ? is it there to handle the back button problem.. ALOT of questions at teh same time..just want to clarify the concept/idea so if someone could be kind enough to shed some light ? Farhan. -- View this message in context: http://www.nabble.com/pageMap-question---tf4735205.html#a13541168 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Removed Validator? (was Re: Two forms on the same page)
looks like we need to update form processing code to skip inner disabled forms, mind making a jira issue? the whole concept is somewhat radical and we havent been able to think through it completely just because its new. so there are still a few caveats here and there for embedded forms. -igor On 11/1/07, Gwyn Evans [EMAIL PROTECTED] wrote: Thursday, November 1, 2007, 4:26:24 PM, you wrote: IV wait until you discover we support embedded forms, that will really IV screw with your mind... Talking of which, are there any Best Practices for dynamic instances of that? The specific issue I've just run across is where I have a outer form and, depending upon a checkbox, might have an inner form being enabled of not. (It's an inner form, rather than just a part of the main form as it's off as a component with it's own panel.) Anyway, the inner form has password/confirmPassword fields and an EqualInputValidator, but if the form is displayed but then disabled again (via Ajax, if significant,) when the form's finally submitted I get a warning, saying IFormValidator in form '...' depends on a component that has been removed from the page or is no longer visible. Offending component id `password`. Any thoughts on the best approach to this? -- /Gwyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket:enclosure and authorization
if we rename it then we should also rename Component.RENDER action to Component.VISIBLE -igor On 11/1/07, Johan Compagner [EMAIL PROTECTED] wrote: they are not really 2 concepts, if something is not visible then it wont be rendered or if something is not rendered then it is not visible, so isRenderedAllowed() is just isVisibleAllowed(), So rename it?? On 11/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: yes, but you see how we have two concepts: visible and render, where as we really only need one, i will tweak the enclosure and add isrenderallowed check -igor On 11/1/07, Johan Compagner [EMAIL PROTECTED] wrote: On 11/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i mean the action should be called VISIBLE instead of RENDER and we should also have isVisibleAllowed() just like we have isEnabled()/isEnabledAllowed() thats just isRenderedAllowed() thats the same thing. Just different name rename it if you want. makes more sense? that way the check in enclosure is: if (child.isvisible()child.isvisibleallowed()) { ...} and thats the same as child.isVisible() child.isRenderedAllowed() which is the same is child.isVisibleInHierarchy() (that only also walks the hierarchy) johan -igor On 11/1/07, Maurice Marrink [EMAIL PROTECTED] wrote: On Oct 31, 2007 9:58 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: there seems to be a bit of a disconnect between render in auth and our general component visibility concept. perhaps it might be an improvement to aligh auth strategy with visibility rather then render...what do others think? What exactly do you mean by this? Do you want isVisible to also check permission for the render action? Maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Preserving user input after form error
can you make sure your servlet mapping is of form /foo/* -igor On 11/1/07, Chris Colman [EMAIL PROTECTED] wrote: i dont know what goes wrong then for you because if i test this: http://wicketstuff.org/wicket12/forminput/ that that works fine. If you make a validation error on 1 the rest keep there values. The only difference I can see so far is that my form page is an 'extended' page where the form component is added in mark up inside a wicket:extend ... form sits in here ... /wicket:extend construct. On 11/1/07, Chris Colman [EMAIL PROTECTED] wrote: Oh yeah, I'm using Wicket 1.2.6 if that has any bearing on the situation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pageMap question ?
Thanks igor, that really clarifies a lot of things..a couple of followup question though.. So as you said versioning is implemented to handle the back button (and subsequently forward properly, but i wonder if wicket enforces a hit to the server on a browser back button by setting every response header as no-cache/no-store (or by setting the page expiry etc)..otherwise wouldnt it be the browser cache showing the last viewed page, instead of wicket showing the page from the session (or the serialized version of the same if an older page).. Also when you say just the page objects with their component graph are stored, i assume also the models associated with the components are also stored (thats where detach comes into play)...right ? Thanks alot again and Regards, Farhan. igor.vaynberg wrote: On 11/1/07, mfs [EMAIL PROTECTED] wrote: PageMap stores a single instance of a particular page ? OR could it have multiple instances of the same page (browsed by user at different instances against 2 different use-case lets say), yes, it can have multiple instances of the same page-class and if there could be muliple instances of the same page, its just the page being viewed which is in the PageMap (in session) and the rest are all serialized on the disk, database etc... in 1.2.x they would all be stored in session, at least the last X instances. in 1.3 only the current page is in session (last viewed), the rest are swapped to disk. ARE they all rendered instances or the components and models are stored seperately...? they are not rendered instances, they are the page object with its component graph, stored in the detached state (detach() is called on page and all its children before serialization) i am just familiarizing myself with the concept, i mean wouldnt we want to have latest data against each page displayed every time, why version them then ? is it there to handle the back button problem.. yes, versioning is done to support the back button, so an instance of the page can be retrieved in the correct state. -igor ALOT of questions at teh same time..just want to clarify the concept/idea so if someone could be kind enough to shed some light ? Farhan. -- View this message in context: http://www.nabble.com/pageMap-question---tf4735205.html#a13541168 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/pageMap-question---tf4735205.html#a13542377 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Preserving user input after form error
On Fri, 02 Nov 2007, Chris Colman wrote: private String captchaInput = new String(fred); private String captchaInput = fred; public final void onError() { super.onError(); // update model fields so the user doesn't have to // type them in again updateFormComponentModels(); refreshCapture(); } This is suspicious. If I understand correctly, Wicket manipulates form component input via three diffferent phases: 1) raw input: directly from the HTTP request 2) converted input: raw input converted to objects 3) model: converted input set to models of FormComponents onError might get called before raw input could be converted, for example when entering text to an HTML field bound to a numeric java field. And if you then update the model values from (empty) converted input, the HTML input fields might display the new, empty values instead of the preserved raw input. I might be wrong as welll and suggest you to dig in the source code and/or debug to see what really happens. Best wishes, Timo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]