Re: wicket:enclosure and authorization
On Nov 2, 2007 3:26 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: if we rename it then we should also rename Component.RENDER action to Component.VISIBLE Perhaps something for after 1.3 is released? Maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Two forms on the same page
i think that's what i called imbricated :)) On 11/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: 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 =
Re: wicket:enclosure and authorization
On 11/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: if we rename it then we should also rename Component.RENDER action to Component.VISIBLE Do you really think it is worth it renaming this late in the game? Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Submit Form Automatically during Load
Hello... I want to support a URL like this: http://host/webapp/home/?userid=foopassword=barsubmit=true The page is meant to perform login. When both userid and password are correct, I want to pass to the following page directly. This works well. When the password is wrong, I want an error message in the feedback panel and stay on the page. This works, too. When either of the (required) parameters userid/password is missing, I want the usual validation error message. This does NOT work, for some reason I do not understand. I suspect, the constructor is probably the wrong place where to place the if(...){...}. But where should it go? Many thanks in advance. Hubert [Code] public class Home extends WebPage { private static final long serialVersionUID = 1L; private String userid; private String password; // Getters and Setters public String getUserid() { return userid; } public void setUserid( String userid ){ this.userid = userid; } public String getPassword() { return password; } public void setPassword( String password ){ this.password = password; } // Constructor public Home(PageParameters parameters) { this(); userid = parameters.getString(userid); password = parameters.getString(password); if( parameters.getBoolean(submit) ) { if( ((LoginForm)get(loginForm)).process() ) { ((LoginForm)get(loginForm)).onSubmit(); } } } // Constructor public Home() { super(); add( new LoginForm( loginForm, this ) ); add( new FeedbackPanel( feedback )); } // Form public class LoginForm extends Form { private static final long serialVersionUID = 1L; public LoginForm(String id, Object modelObject ) { super(id, new CompoundPropertyModel( modelObject )); add(new RequiredTextField(userid)); add(new PasswordTextField(password).setResetPassword(false)); } public void onSubmit() { if( userid == null ) return; if (userid.equals(password)) { setResponsePage(new Welcome(userid)); } else error(Wrong Password); } } } -- View this message in context: http://www.nabble.com/Submit-Form-Automatically-during-Load-tf4736602.html#a13545251 Sent from the Wicket - User mailing list archive at Nabble.com.
Re: Disabling Palette buttons
I solved the problem by creating custom add and remove buttons. It turned out that the original buttons that are used by Palette are not subclasses of Button but subclasses of WebMarkupContainer and hence they don't properly support disabled state and generating of markup id. I wonder why plain buttons were not used. Now I use the following subclass and it works just fine: [code] private class PupilPalette extends Palette { private static final long serialVersionUID = 6962784629546969362L; private Button addButton; private Button removeButton; public PupilPalette(final String id, final IModel model, final IModel choicesModel, final IChoiceRenderer choiceRenderer, final int rows, final boolean allowOrder) { super(id, model, choicesModel, choiceRenderer, rows, allowOrder); setOutputMarkupId(true); getRecorderComponent().add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = -1322527042794395640L; @Override protected void onUpdate(final AjaxRequestTarget target) { checkButtonsEnabled(); target.addComponent(addButton); target.addComponent(removeButton); } }); checkButtonsEnabled(); } /** * Checks whether the add or remove buttons are enabled. */ private void checkButtonsEnabled() { addButton.setEnabled(availablePupils.size() != selectedPupils.size()); removeButton.setEnabled(!selectedPupils.isEmpty()); } /** [EMAIL PROTECTED] */ @Override protected Component newAvailableHeader(final String componentId) { return new Label(componentId, getString(available.pupils)); } /** [EMAIL PROTECTED] */ @Override protected Component newSelectedHeader(final String componentId) { return new Label(componentId, getString(selected.pupils)); } /** [EMAIL PROTECTED] */ @Override protected Component newAddComponent() { addButton = new Button(addButton, new Model(-)) { private static final long serialVersionUID = 0L; protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); tag.getAttributes().put(onclick, PupilPalette.this.getAddOnClickJS()); } }; addButton.add(new Image(image, new ResourceReference(Palette.class, add.gif))); addButton.setOutputMarkupId(true); return addButton; } /** [EMAIL PROTECTED] */ @Override protected Component newRemoveComponent() { removeButton = new Button(removeButton) { private static final long serialVersionUID = 1L; protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); tag.getAttributes().put(onclick, PupilPalette.this.getRemoveOnClickJS()); } }; removeButton.add(new Image(image, new ResourceReference(Palette.class, remove.gif))); removeButton.setOutputMarkupId(true); return removeButton; } } [/code] wheleph -- View this message in context: http://www.nabble.com/Disabling-Palette-buttons-tf4732206.html#a13545250 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
By the way, Component.RENDER doesn't have to be renamed for me either. Maybe add one extra method to component: isVisibleAllowed() that checks both properties: isRenderedAllowed and isVisible() and that method is again called for every component in the hierachy in isVisibleInHiearchy() i think thats more clear. johan On 11/2/07, Johan Compagner [EMAIL PROTECTED] wrote: true that if something is not rendered then it is not visible. The problem is that the you're confusing the name of the visible property with what it means, namely: isVisible() means is visible IF the component is allowed to render But the problem is that that line above is not true... isVisible() only checks the visible property, it doesn't check if it is also allowed to render. we have such a method that does both thats isVisibleInHierarchy() that checks everything. isVisible()/isRenderedAllowed() and all the parents if they are both that. what is true in wicket is that: Component not rendered then isVisible() or isRenderedAllowed() returned false; (ofcourse you have 1 exception to this rule and the component doesn't has markup at all, but thats another beast) johan
Re: BUG: Ajax Panel Replacement Issue on Fireforx only (Kind of Complex Scenario)
Great. On 11/2/07, Matej Knopp [EMAIL PROTECTED] wrote: Thanks, I've assigned the issue to me, will look at it as soon as I have time. -Matej On 11/1/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: 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); } }
Re: BUG: Ajax Panel Replacement Issue on Fireforx only (Kind of Complex Scenario)
Thanks, I've assigned the issue to me, will look at it as soon as I have time. -Matej On 11/1/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: 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
Re: wicket:enclosure and authorization
Just some thoughts I have on the issue... Johan Compagner 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?? Note that your reasoning is not quite correct above: while it IS true that if something is not visible then it won't be rendered, it IS NOT true that if something is not rendered then it is not visible. The problem is that the you're confusing the name of the visible property with what it means, namely: isVisible() means is visible IF the component is allowed to render If you rename the method isRenderAllowed() to isVisibleAllowed() and add the isVisibleAllowed() check to the enclosure check, that still won't change what isVisible() really means (namely, what I wrote above). Note also that RENDER is an *action*, which is why I think it's kind of strange to rename Component.RENDER to Component.VISIBLE. Personally, I think the best solution is probably to just add the isRenderAllowed() to the enclosure check and do nothing else. Regards, Sebastiaan 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] smime.p7s Description: S/MIME Cryptographic Signature
Re: wicket:enclosure and authorization
I think this should wait after 1.3. And I'm not the one who's usually hesitating what it comes to breaking stuff :) -Matej On 11/2/07, Eelco Hillenius [EMAIL PROTECTED] wrote: On 11/1/07, Igor Vaynberg [EMAIL PROTECTED] wrote: if we rename it then we should also rename Component.RENDER action to Component.VISIBLE Do you really think it is worth it renaming this late in the game? Eelco - 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
what servlet container are you using? i think this problem popped up on weblogic before and was due to a combination of a weblogic bug and the particular servlet mapping that was used. does the behavior happen to all form components or just some particular one? try it without that funky onerror() override. -igor On 11/2/07, Chris Colman [EMAIL PROTECTED] wrote: can you make sure your servlet mapping is of form /foo/* -igor Yes it's of that form. - 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
this is how enabled works: the actual outcome of whether something will end up being enabled or not is the combination of isEnabled()isEnabledAllowed() for visibility it is currently: isVisible()isRenderAllowed() which makes little sense to me because i have to deal with two concepts: visibility and rendering. from my point of view as a user i dont care to know about rendering, i just want to plop my components down and tweak their visibility. when we first introduced this i argued to make isenabled() and isvisible() include the is*allowed() checks, but i didnt win that one back then...but thats another thread. -igor On 11/2/07, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Johan Compagner wrote: true that if something is not rendered then it is not visible. The problem is that the you're confusing the name of the visible property with what it means, namely: isVisible() means is visible IF the component is allowed to render But the problem is that that line above is not true... isVisible() only checks the visible property, it doesn't check if it is also allowed to render. That's what I'm saying! I'm saying isVisible() does not really mean what the word visible means! That is, visible means I can see it (in ordinary English), but isVisible() means something else, namely what I wrote above (precisely BECAUSE it does not check isRenderAllowed())! In wicket if something isVisible() then it will be rendered, but if something is not rendered, you CANNOT conclude that isVisible(). Therefore, there ARE 2 different concepts! But that's pretty much what you're saying in the rest of the mail, so I think we're agreeing... :-) Regards, Sebastiaan we have such a method that does both thats isVisibleInHierarchy() that checks everything. isVisible()/isRenderedAllowed() and all the parents if they are both that. what is true in wicket is that: Component not rendered then isVisible() or isRenderedAllowed() returned false; (ofcourse you have 1 exception to this rule and the component doesn't has markup at all, but thats another beast) johan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Disabling Palette buttons
webmarkupcontainers were used because the buttons do not need to submit anything to serverside, they are just there to add an onclick javascript. i agree they dont handle disabling properly and that is a bug, please open a jira issue. -igor On 11/2/07, wheleph [EMAIL PROTECTED] wrote: I solved the problem by creating custom add and remove buttons. It turned out that the original buttons that are used by Palette are not subclasses of Button but subclasses of WebMarkupContainer and hence they don't properly support disabled state and generating of markup id. I wonder why plain buttons were not used. Now I use the following subclass and it works just fine: [code] private class PupilPalette extends Palette { private static final long serialVersionUID = 6962784629546969362L; private Button addButton; private Button removeButton; public PupilPalette(final String id, final IModel model, final IModel choicesModel, final IChoiceRenderer choiceRenderer, final int rows, final boolean allowOrder) { super(id, model, choicesModel, choiceRenderer, rows, allowOrder); setOutputMarkupId(true); getRecorderComponent().add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = -1322527042794395640L; @Override protected void onUpdate(final AjaxRequestTarget target) { checkButtonsEnabled(); target.addComponent(addButton); target.addComponent(removeButton); } }); checkButtonsEnabled(); } /** * Checks whether the add or remove buttons are enabled. */ private void checkButtonsEnabled() { addButton.setEnabled(availablePupils.size() != selectedPupils.size()); removeButton.setEnabled(!selectedPupils.isEmpty()); } /** [EMAIL PROTECTED] */ @Override protected Component newAvailableHeader(final String componentId) { return new Label(componentId, getString(available.pupils)); } /** [EMAIL PROTECTED] */ @Override protected Component newSelectedHeader(final String componentId) { return new Label(componentId, getString(selected.pupils)); } /** [EMAIL PROTECTED] */ @Override protected Component newAddComponent() { addButton = new Button(addButton, new Model(-)) { private static final long serialVersionUID = 0L; protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); tag.getAttributes().put(onclick, PupilPalette.this.getAddOnClickJS()); } }; addButton.add(new Image(image, new ResourceReference(Palette.class, add.gif))); addButton.setOutputMarkupId(true); return addButton; } /** [EMAIL PROTECTED] */ @Override protected Component newRemoveComponent() { removeButton = new Button(removeButton) { private static final long serialVersionUID = 1L; protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); tag.getAttributes().put(onclick, PupilPalette.this.getRemoveOnClickJS()); } }; removeButton.add(new Image(image, new ResourceReference(Palette.class, remove.gif))); removeButton.setOutputMarkupId(true); return removeButton; } } [/code] wheleph -- View this message in context: http://www.nabble.com/Disabling-Palette-buttons-tf4732206.html#a13545250 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
this will make it hugely inconsistent with how isenabled() isenabledallowed() works. -igor On 11/2/07, Johan Compagner [EMAIL PROTECTED] wrote: By the way, Component.RENDER doesn't have to be renamed for me either. Maybe add one extra method to component: isVisibleAllowed() that checks both properties: isRenderedAllowed and isVisible() and that method is again called for every component in the hierachy in isVisibleInHiearchy() i think thats more clear. johan On 11/2/07, Johan Compagner [EMAIL PROTECTED] wrote: true that if something is not rendered then it is not visible. The problem is that the you're confusing the name of the visible property with what it means, namely: isVisible() means is visible IF the component is allowed to render But the problem is that that line above is not true... isVisible() only checks the visible property, it doesn't check if it is also allowed to render. we have such a method that does both thats isVisibleInHierarchy() that checks everything. isVisible()/isRenderedAllowed() and all the parents if they are both that. what is true in wicket is that: Component not rendered then isVisible() or isRenderedAllowed() returned false; (ofcourse you have 1 exception to this rule and the component doesn't has markup at all, but thats another beast) johan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Get Page expired after closing javascript opened window (containing a wicket page)
make sure you are opening your popup in a different pagemap -igor On 11/2/07, pixotec [EMAIL PROTECTED] wrote: I'm developing a CMS in wicket and have a selfmade wysiwyg textarea in the page. when clicking on insert image an image dialog is opened in a new window. the dialog is a wicket page. I provide the url for the dialog in the textarea page by this (shortened): CharSequence charSequence = RequestCycle.get().urlFor(new DialogImagePage(settings)); js.append(var dialogImageUrl=' + charSequence.toString() + ';\n); add(new StringHeaderContributor(js.toString())); the source code of the calling page is then: ?xml version='1.0' encoding='UTF-8'? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head ... script type=text/javascript !--/*--![CDATA[/*!--*/ var dialogImageUrl='/kms/app/?wicket:interface=:16::'; /*--]]*/ /script ... script type=text/javascript !-- function openImageDialog() { var dialog = window.open(dialogImageUrl, Image, status=no,modal=yes,width=700,height=550); } -- ... script type=text/javascript !--/*--![CDATA[/*!--*/ if (window.name=='') { window.location=/kms/app/?wicket:interface=:14::INewBrowserWindowListener; } /*--]]*/ /script ... /head body ... tdlt;img width=25 height=24 title=Insert image wicket:id=btnImage onclick=openImageDialog(); onmouseup=drawButtonDown(this); src=/kms/app/resources/wicket.extensions.markup.html.form.wysiwyg.WysiwygTextarea/res/btnImage_up.gif border=0 alt=Insert image id=btnImage/gt;/td ... /body /html after closing the dialog window (using javascript's window.close() or a PopupCloseLink) the dialog window is closed. When I click then on save in the calling page containing the textarea I always get a Page expired. Why? (even doing a getPageSettings().setAutomaticMultiWindowSupport(true); in my application did not help...) -- View this message in context: http://www.nabble.com/Get-Page-expired-after-closing-javascript-opened-window-%28containing-a-wicket-page%29-tf4737168.html#a13546851 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]
difference between Link(SomePage.class) and Link(new SomePage())
Hey all, Sorry to be the wicket newbie, but I was wondering if you guys could help me to understand how Links work. I understand that when you do Link(SomePage.class), it calls the zero param constructor of SomePage, and when you do Link(new SomePage(someParams)) you can call other constructors, but besides this, what are the other differences? I have a LoginPage that renders a login form if the zero param constructor is called, and when LoginPage(false) is called, it signs out the user first and then renders a login page. The problem is that when I use Link(new LoginPage(false)) to sign out the user, it does indeed sign out the user, but a wicket page expired message is rendered rather than the LoginPage. public LoginPage() { this(true); } public LoginPage(boolean isLogin) { Model simpleUser = new Model(new SimpleUser()); add(new SignInForm(loginform, simpleUser)); ACPSession session = getACPSession(); if (isLogin) { if (session.isSignedIn()) { error(getLocalizer().getString(login.errors.alreadysignedin, LoginPage.this)); } } else { if (session.isSignedIn()) { info(getLocalizer().getString(login.info.signedout)); session.signOut(); //after this, Page Expired error. } } } Hope this made sense, any help is greatly appreciated. Thank you, jin -- View this message in context: http://www.nabble.com/difference-between-Link%28SomePage.class%29-and-Link%28new-SomePage%28%29%29-tf4738073.html#a13549579 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: Prompting a User to Save When Leaving a Page
I have a problem while doing this... I am using Wicket 1.2.6 and when I attempt to leave the page after modifying the form, the alert pops up, but if I select Cancel, in order to remain in the page, everything that had Ajax stops working, without any visible errors. Any ideas? Did anyone had the same problem? This also happened to me without using the behaviour On 10/2/07, JulianS [EMAIL PROTECTED] wrote: Thanks, this is a great tip. swaroop belur wrote: Have a look at this blog http://www.jroller.com/karthikg/entry/modelling_client_side_form_modifications#comments Basically state of the form onload is compared to that of beforeonunload. Just understand the concept and modify accordingly. Here the author tries to add a behavior to form's page in bind method of behavior. Not sure- but the page may be null at this point if form is not yet attched to page. Just modify accd. -swaroop - Julian http://javathoughts.capesugarbird.com/ My blog about Wicket and other Java stuff -- View this message in context: http://www.nabble.com/Prompting-a-User-to-Save-When-Leaving-a-Page-tf4549589.html#a13001983 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TabbedPanel question
I have a question about the TabbedPanel. I've got a page that has a header, body, and footer. I've got a tabbedpanel with 3 tabs (each with a list of BookmarkablePageLinkssort of a submenu) in the header. 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 .. -- View this message in context: http://www.nabble.com/TabbedPanel-question-tf4737525.html#a13547959 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: Submit Form Automatically during Load
Nino.Martinez wrote: have you mounted the page? I want to support a URL like this: http://host/webapp/home/?userid=foopassword=barsubmit=true Well, no. I haven't. Even without mounting, in the absence of *submit* the *userid* and *password* parameters show up nicely in the page after loading. The only thing is, when one of them is missing, the usual validation does not seem to run. Do you suppose, mounting the page name would make any difference? -- View this message in context: http://www.nabble.com/Submit-Form-Automatically-during-Load-tf4736602.html#a13547958 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: pageMap question ?
On 11/1/07, mfs [EMAIL PROTECTED] wrote: 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).. have you pressed a back button in a wicket app? it works exactly as you describe, the previous page is retrieved from browser cache. but, when you click a link - which has the page id/version encoded - wicket can pull out the proper page version from the disk to handle the click. 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 ? yes. but components can also have state that is shed in detaching, so detaching applies to components and models. -igor 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket:enclosure and authorization
for visibility it is currently: isVisible()isRenderAllowed() which makes little sense to me because i have to deal with two concepts: visibility and rendering. from my point of view as a user i dont care to know about rendering, i just want to plop my components down and tweak their visibility. so just introduce an extra final method on component that does just that check. when we first introduced this i argued to make isenabled() and isvisible() include the is*allowed() checks, but i didnt win that one back then...but thats another thread. no i still think thats a bad idea, because then isEnabled and isVisible must be both final i guess because then with simple isVisible override by some developer the security is by passed. johan
RE: IE 3-7
Yeah, I was using a dedicated vm as well. It was interesting to see what some of our sites looked like under older versions of IE (3-5.5), but beyond that I can't see any practical reasons to do so. However, it is useful to have IE6 IE7 running under the same machine. Glad it could be of use for you :) -Original Message- From: Gerolf Seitz [mailto:[EMAIL PROTECTED] Sent: Thursday, November 01, 2007 6:18 PM To: users@wicket.apache.org Subject: 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: wicket:enclosure and authorization
Johan Compagner wrote: true that if something is not rendered then it is not visible. The problem is that the you're confusing the name of the visible property with what it means, namely: isVisible() means is visible IF the component is allowed to render But the problem is that that line above is not true... isVisible() only checks the visible property, it doesn't check if it is also allowed to render. That's what I'm saying! I'm saying isVisible() does not really mean what the word visible means! That is, visible means I can see it (in ordinary English), but isVisible() means something else, namely what I wrote above (precisely BECAUSE it does not check isRenderAllowed())! In wicket if something isVisible() then it will be rendered, but if something is not rendered, you CANNOT conclude that isVisible(). Therefore, there ARE 2 different concepts! But that's pretty much what you're saying in the rest of the mail, so I think we're agreeing... :-) Regards, Sebastiaan we have such a method that does both thats isVisibleInHierarchy() that checks everything. isVisible()/isRenderedAllowed() and all the parents if they are both that. what is true in wicket is that: Component not rendered then isVisible() or isRenderedAllowed() returned false; (ofcourse you have 1 exception to this rule and the component doesn't has markup at all, but thats another beast) johan smime.p7s Description: S/MIME Cryptographic Signature
Wicket jBPM
Has anyone successfully setup JBoss jBPM with Wicket? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Localizing title of ModalWindow
Is it correct that the jira entry says it is fixed in beta4? Because we use beta4 and the title still needs a Model instead of an IModel. Cheers Per - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
subscription
- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple wicket:child / tags on a single base page?
Hi folks, I just stumbled on a situation where it would be useful to have two or more wicket:child / tags in a base page. Just consider a layout that consists of the usual footer, header, navigation, and content parts. But now, the content should be arranged in two columns, e.g. two different div /s. To give a short example, the BasePage.html cloud look like this body !-- some layout markup -- div class=content_left wicket:child / /div !-- more layout markup -- div class=content_rigt wicket:child / /div !-- even more layout markup -- /body And the Child.html markup would look like this: body div class=content_left wicket:extend !-- content of left column (first child) goes here -- /wicket:extend /div div class=content_rigt wicket:extend !-- content of right column (second child) goes here -- /wicket:extend /div /body Wouldn't that be a desirable feature? I tried to run the above example expecting to get an exception. The second wicket:child/wicket:extend pair was happily ignored though. Best regards, Stefan -- View this message in context: http://www.nabble.com/Multiple-%3Cwicket%3Achild--%3E-tags-on-a-single-base-page--tf4738673.html#a13551448 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
security is bypassed anyways because most component writers will forget to do the double check. so neither solution is good. -igor On 11/2/07, Johan Compagner [EMAIL PROTECTED] wrote: for visibility it is currently: isVisible()isRenderAllowed() which makes little sense to me because i have to deal with two concepts: visibility and rendering. from my point of view as a user i dont care to know about rendering, i just want to plop my components down and tweak their visibility. so just introduce an extra final method on component that does just that check. when we first introduced this i argued to make isenabled() and isvisible() include the is*allowed() checks, but i didnt win that one back then...but thats another thread. no i still think thats a bad idea, because then isEnabled and isVisible must be both final i guess because then with simple isVisible override by some developer the security is by passed. johan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Submit Form Automatically during Load
have you mounted the page? Hubert Kauker wrote: Hello... I want to support a URL like this: http://host/webapp/home/?userid=foopassword=barsubmit=true The page is meant to perform login. When both userid and password are correct, I want to pass to the following page directly. This works well. When the password is wrong, I want an error message in the feedback panel and stay on the page. This works, too. When either of the (required) parameters userid/password is missing, I want the usual validation error message. This does NOT work, for some reason I do not understand. I suspect, the constructor is probably the wrong place where to place the if(...){...}. But where should it go? Many thanks in advance. Hubert [Code] public class Home extends WebPage { private static final long serialVersionUID = 1L; private String userid; private String password; // Getters and Setters public String getUserid() { return userid; } public void setUserid( String userid ){ this.userid = userid; } public String getPassword() { return password; } public void setPassword( String password ){ this.password = password; } // Constructor public Home(PageParameters parameters) { this(); userid = parameters.getString(userid); password = parameters.getString(password); if( parameters.getBoolean(submit) ) { if( ((LoginForm)get(loginForm)).process() ) { ((LoginForm)get(loginForm)).onSubmit(); } } } // Constructor public Home() { super(); add( new LoginForm( loginForm, this ) ); add( new FeedbackPanel( feedback )); } // Form public class LoginForm extends Form { private static final long serialVersionUID = 1L; public LoginForm(String id, Object modelObject ) { super(id, new CompoundPropertyModel( modelObject )); add(new RequiredTextField(userid)); add(new PasswordTextField(password).setResetPassword(false)); } public void onSubmit() { if( userid == null ) return; if (userid.equals(password)) { setResponsePage(new Welcome(userid)); } else error(Wrong Password); } } } - 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 Yes it's of that form. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple wicket:child / tags on a single base page?
this has been discussed multiple times on this list, search the archives. the conclusion has always been that what you want can be accomplished by factory methods on the basepage that generate panels. -igor On 11/2/07, Stefan Fußenegger [EMAIL PROTECTED] wrote: Hi folks, I just stumbled on a situation where it would be useful to have two or more wicket:child / tags in a base page. Just consider a layout that consists of the usual footer, header, navigation, and content parts. But now, the content should be arranged in two columns, e.g. two different div /s. To give a short example, the BasePage.html cloud look like this body !-- some layout markup -- div class=content_left wicket:child / /div !-- more layout markup -- div class=content_rigt wicket:child / /div !-- even more layout markup -- /body And the Child.html markup would look like this: body div class=content_left wicket:extend !-- content of left column (first child) goes here -- /wicket:extend /div div class=content_rigt wicket:extend !-- content of right column (second child) goes here -- /wicket:extend /div /body Wouldn't that be a desirable feature? I tried to run the above example expecting to get an exception. The second wicket:child/wicket:extend pair was happily ignored though. Best regards, Stefan -- View this message in context: http://www.nabble.com/Multiple-%3Cwicket%3Achild--%3E-tags-on-a-single-base-page--tf4738673.html#a13551448 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
true that if something is not rendered then it is not visible. The problem is that the you're confusing the name of the visible property with what it means, namely: isVisible() means is visible IF the component is allowed to render But the problem is that that line above is not true... isVisible() only checks the visible property, it doesn't check if it is also allowed to render. we have such a method that does both thats isVisibleInHierarchy() that checks everything. isVisible()/isRenderedAllowed() and all the parents if they are both that. what is true in wicket is that: Component not rendered then isVisible() or isRenderedAllowed() returned false; (ofcourse you have 1 exception to this rule and the component doesn't has markup at all, but thats another beast) johan
OT Øredev...
Anyone comming to the øredev developer congress...? regards Nino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket jBPM
On 11/2/07, William Hoover [EMAIL PROTECTED] wrote: Has anyone successfully setup JBoss jBPM with Wicket? Several people who I know. You can use jBPM like any regular Java API. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple wicket:child / tags on a single base page?
Thanks for that awesomely fast reply! I found an excellent thread in the archives that explains this topic very well - I swear I searched before, but obviously with the wrong keywords ;) http://www.nabble.com/Multiple-wicket%3Achild-tags-in-the-same-page-tf3775143.html To sum it up for those that came across this thread looking for the same answer: there are two different solutions to this kind of problem: 1. without child-extends-tags using abstract tags like this: BasePage() { // maybe you want to doublecheck if the returned component has the expected id add(createComponent(left); add(createComponent(right); } abstract Component createComponent(String id) 2. using child-extends-tags using fragments in the html of the subclass The obvious disadvantage of the latter is its need for a html page for every page you create. If you only want to add 2 existing panels (or components), you will find yourself copying a template page over and over again that only has two fragments, each with a wicket:component /. Its advantage is, that one can have the contents of both columns on the same page, which is convenient if there is some JS interaction between both panels ... of if your html/css designer needs to have both on the same page for proper validation. Multiple child/extends pairs (where you have to see such a pair as an abstract method rather than a baseclass/subclass relationship) could help to combine the advantages of both approaches. However, its not a feature that would improve wickets functionality and probably not worth the effort of implementing it ... though it might be convenient. I hope I got it right. Best regards, Stefan Fußenegger http://talk-on-tech.blogspot.com // looking for a nicer domain ;) igor.vaynberg wrote: this has been discussed multiple times on this list, search the archives. the conclusion has always been that what you want can be accomplished by factory methods on the basepage that generate panels. -igor On 11/2/07, Stefan Fußenegger [EMAIL PROTECTED] wrote: Hi folks, I just stumbled on a situation where it would be useful to have two or more wicket:child / tags in a base page. Just consider a layout that consists of the usual footer, header, navigation, and content parts. But now, the content should be arranged in two columns, e.g. two different div /s. To give a short example, the BasePage.html cloud look like this body !-- some layout markup -- div class=content_left wicket:child / /div !-- more layout markup -- div class=content_rigt wicket:child / /div !-- even more layout markup -- /body And the Child.html markup would look like this: body div class=content_left wicket:extend !-- content of left column (first child) goes here -- /wicket:extend /div div class=content_rigt wicket:extend !-- content of right column (second child) goes here -- /wicket:extend /div /body Wouldn't that be a desirable feature? I tried to run the above example expecting to get an exception. The second wicket:child/wicket:extend pair was happily ignored though. Best regards, Stefan -- View this message in context: http://www.nabble.com/Multiple-%3Cwicket%3Achild--%3E-tags-on-a-single-base-page--tf4738673.html#a13551448 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/Multiple-%3Cwicket%3Achild--%3E-tags-on-a-single-base-page--tf4738673.html#a13553489 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: pageMap question ?
igor.vaynberg wrote: On 11/1/07, mfs [EMAIL PROTECTED] wrote: 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).. have you pressed a back button in a wicket app? it works exactly as you describe, the previous page is retrieved from browser cache. but, when you click a link - which has the page id/version encoded - wicket can pull out the proper page version from the disk to handle the click. I SEE..BUT i am wondering of scenarios where one would want to refer to earlier version of a page (by have an explicit link to it)..? one scenario that comes to mind is like e.g. for use-case add-CreditCard for which the user clicks on add CC link (from a view user profile page) with add-CC screen being shown with 'back/cancel' (with link to the last viewed user-profile page) and 'save' on it (which results in new instances of teh the same page getting constructed)..but still in this scenario its just the last viewed user-profile page (which infact is in the RAM and not serialized) that is accessed i m still thinking where would the old serialized pages would come to use...can u give me an example..? ..though even in this scenario (i.e. clicking back) i would want to re-construct a new user-profile-page so as to show the latest data instead of showing the one in session with not the latest model data.. OR you might say that we are not saving the model data, and with using the detach model we load the data against the component and hence always a fresh model..but still i would know of examples where the old pages are really being valuable? Thanks alot again.. 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 ? yes. but components can also have state that is shed in detaching, so detaching applies to components and models. -igor 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
RE: Wicket jBPM
I guess what I'm really asking is if anyone actually composed the UI integration piece that supports the API (similar to the JBoss jBPM webapp) so that all of the controller variables could be seamlessly linked to models. -Original Message- From: Eelco Hillenius [mailto:[EMAIL PROTECTED] Sent: Friday, November 02, 2007 1:31 PM To: users@wicket.apache.org Subject: Re: Wicket jBPM On 11/2/07, William Hoover [EMAIL PROTECTED] wrote: Has anyone successfully setup JBoss jBPM with Wicket? Several people who I know. You can use jBPM like any regular Java API. Eelco - 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 ?
I do that..i mean this scenario is still sort of comprehensible where i say i want to view the previous page via a go-back link (and we can certainly achieve that with the way u mentioned)..but i what i would really want to know are some real life examples/scenarios/use-cases where i would come to the need to view the older version of any particular pages (which happen to be serialized by wicket) and access them from a particular page.. Thanks, Farhan/ igor.vaynberg wrote: for scenarios like those simply pass the page instance to another page class secondsteppage extends webpage { public secondsteppage(page first) { add(new link(go-back) { onclick() { setresponsepage(first); }}); } } -igor On 11/2/07, mfs [EMAIL PROTECTED] wrote: igor.vaynberg wrote: On 11/1/07, mfs [EMAIL PROTECTED] wrote: 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).. have you pressed a back button in a wicket app? it works exactly as you describe, the previous page is retrieved from browser cache. but, when you click a link - which has the page id/version encoded - wicket can pull out the proper page version from the disk to handle the click. I SEE..BUT i am wondering of scenarios where one would want to refer to earlier version of a page (by have an explicit link to it)..? one scenario that comes to mind is like e.g. for use-case add-CreditCard for which the user clicks on add CC link (from a view user profile page) with add-CC screen being shown with 'back/cancel' (with link to the last viewed user-profile page) and 'save' on it (which results in new instances of teh the same page getting constructed)..but still in this scenario its just the last viewed user-profile page (which infact is in the RAM and not serialized) that is accessed i m still thinking where would the old serialized pages would come to use...can u give me an example..? ..though even in this scenario (i.e. clicking back) i would want to re-construct a new user-profile-page so as to show the latest data instead of showing the one in session with not the latest model data.. OR you might say that we are not saving the model data, and with using the detach model we load the data against the component and hence always a fresh model..but still i would know of examples where the old pages are really being valuable? Thanks alot again.. 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 ? yes. but components can also have state that is shed in detaching, so detaching applies to components and models. -igor 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:
Re: Is Beta5 coming soon? Beta4 has caused these issues for us....
Hi, You mostly get NoSuchMethodErrors if one of the slf4j jars on your classpath is too old. But I guess you already knew that. You may find more help on the sl4j site. Regards, Erik. PS. on the dev list there was a vote with the result that Wicket 1.3 RC1 will be build (not released?) on Sunday. landry soules wrote: Hello Please Al, what is the fix for this problem with slf4j ? I spent half a day trying every possible combination between log4j and slf4j, and got nothing but a strong headache ( and NoSuchMethodError) !!! -- Erik van Oosten http://2008.rubyenrails.nl/ http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is Beta5 coming soon? Beta4 has caused these issues for us....
you have to use slf4j version 1.4.2 (instead of 1.0.x) in your pom file Gerolf On Nov 2, 2007 8:11 PM, landry soules [EMAIL PROTECTED] wrote: Hello Please Al, what is the fix for this problem with slf4j ? I spent half a day trying every possible combination between log4j and slf4j, and got nothing but a strong headache ( and NoSuchMethodError) !!! 2007/10/30, Al Maw [EMAIL PROTECTED]: Chris Lintz wrote: Any chance of getting a Beta5 out soon. As luck would have it, Beta4 to say the least has been frustrating for us. So far beta4 has caused these problems in our app (all stuff that worked in Beta3) 1) AJAXLink is broke when using the Crypted URL encoding strategy. 2) StringResourceModel change on toString() method (this is fine, we refactored and are now using getString() ) 3) UpdateFeedback gone - http://www.nabble.com/1.3.0-beta4%3A-updateFeedback%28%29-gone--tf4707707.html 4) Pages are stateful now because of - http://www.nabble.com/Stateless-page-creating-session-tf4604432.html#a13147396 Any chance of getting a Wicket beta5 out with at least the stateless page fix? We have a high traffic site so the thought of generating some where in the neighborhood of hundreds of thousands session IDs on disk for pages as simple as a WebMarkupcontainer and a Label is very scary thought. Additionally, the maven 2 quickstart is broken because it uses the wrong version of slf4j-log4j (which results in a NoSuchMethodError). Easy to fix if you know how, but not good that you should have to. ;-( +1 on getting beta 5 out ASAP. Al - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pageMap question ?
for scenarios like those simply pass the page instance to another page class secondsteppage extends webpage { public secondsteppage(page first) { add(new link(go-back) { onclick() { setresponsepage(first); }}); } } -igor On 11/2/07, mfs [EMAIL PROTECTED] wrote: igor.vaynberg wrote: On 11/1/07, mfs [EMAIL PROTECTED] wrote: 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).. have you pressed a back button in a wicket app? it works exactly as you describe, the previous page is retrieved from browser cache. but, when you click a link - which has the page id/version encoded - wicket can pull out the proper page version from the disk to handle the click. I SEE..BUT i am wondering of scenarios where one would want to refer to earlier version of a page (by have an explicit link to it)..? one scenario that comes to mind is like e.g. for use-case add-CreditCard for which the user clicks on add CC link (from a view user profile page) with add-CC screen being shown with 'back/cancel' (with link to the last viewed user-profile page) and 'save' on it (which results in new instances of teh the same page getting constructed)..but still in this scenario its just the last viewed user-profile page (which infact is in the RAM and not serialized) that is accessed i m still thinking where would the old serialized pages would come to use...can u give me an example..? ..though even in this scenario (i.e. clicking back) i would want to re-construct a new user-profile-page so as to show the latest data instead of showing the one in session with not the latest model data.. OR you might say that we are not saving the model data, and with using the detach model we load the data against the component and hence always a fresh model..but still i would know of examples where the old pages are really being valuable? Thanks alot again.. 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 ? yes. but components can also have state that is shed in detaching, so detaching applies to components and models. -igor 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:
WICKET-606 Broken Again in beta4?
It appears that the issue http://issues.apache.org/jira/browse/WICKET-606 that was fixed in beta2 is broken again in beta4. Basically TextFields for Strings (configured with the defaults) are always converting to empty strings. They should convert to null by default based on the AbstractTextComponent.getConvertEmptyInputStringToNull() setting, which is true by default. All of my TextFields are now setting empty strings on their Models where they used to set nulls. Can anyone confirm this? Do we need to reopen the issue? -Dan
Re: Localizing title of ModalWindow
Sorry, that is just a typo. Will be fixed in a second. -Matej On 11/2/07, Per Newgro [EMAIL PROTECTED] wrote: Is it correct that the jira entry says it is fixed in beta4? Because we use beta4 and the title still needs a Model instead of an IModel. Cheers Per - 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: Is Beta5 coming soon? Beta4 has caused these issues for us....
Thanks for your answers, but still no success : I tried (once again) to use maven to generate a brand new project, but eclipse freezes when i import the project generated with mvn eclipse:eclipse -DdownloadSources=true... Is there something i'm missing ? In my classpath, i have slf4j-log4j12-1.4.2.jar + log4j-1.2.14.jar, and still the infamous NoSuchMethodError Should i better rollback to wicket 1.3 beta2 ? 2007/11/2, Gerolf Seitz [EMAIL PROTECTED]: you have to use slf4j version 1.4.2 (instead of 1.0.x) in your pom file Gerolf On Nov 2, 2007 8:11 PM, landry soules [EMAIL PROTECTED] wrote: Hello Please Al, what is the fix for this problem with slf4j ? I spent half a day trying every possible combination between log4j and slf4j, and got nothing but a strong headache ( and NoSuchMethodError) !!! 2007/10/30, Al Maw [EMAIL PROTECTED]: Chris Lintz wrote: Any chance of getting a Beta5 out soon. As luck would have it, Beta4 to say the least has been frustrating for us. So far beta4 has caused these problems in our app (all stuff that worked in Beta3) 1) AJAXLink is broke when using the Crypted URL encoding strategy. 2) StringResourceModel change on toString() method (this is fine, we refactored and are now using getString() ) 3) UpdateFeedback gone - http://www.nabble.com/1.3.0-beta4%3A-updateFeedback%28%29-gone--tf4707707.html 4) Pages are stateful now because of - http://www.nabble.com/Stateless-page-creating-session-tf4604432.html#a13147396 Any chance of getting a Wicket beta5 out with at least the stateless page fix? We have a high traffic site so the thought of generating some where in the neighborhood of hundreds of thousands session IDs on disk for pages as simple as a WebMarkupcontainer and a Label is very scary thought. Additionally, the maven 2 quickstart is broken because it uses the wrong version of slf4j-log4j (which results in a NoSuchMethodError). Easy to fix if you know how, but not good that you should have to. ;-( +1 on getting beta 5 out ASAP. Al - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WICKET-606 Broken Again in beta4?
If you see that it is broken, then please open the issue again. If it is, before fixing we really need to create a test case for this so that when we fix it, it stays fixed. Eelco On 11/2/07, Dan Syrstad [EMAIL PROTECTED] wrote: It appears that the issue http://issues.apache.org/jira/browse/WICKET-606 that was fixed in beta2 is broken again in beta4. Basically TextFields for Strings (configured with the defaults) are always converting to empty strings. They should convert to null by default based on the AbstractTextComponent.getConvertEmptyInputStringToNull() setting, which is true by default. All of my TextFields are now setting empty strings on their Models where they used to set nulls. Can anyone confirm this? Do we need to reopen the issue? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is Beta5 coming soon? Beta4 has caused these issues for us....
Hi landry, Did you modify the SLF version specified in the created pom.xml before trying to import it? /Gwyn Friday, November 2, 2007, 8:36:37 PM, landry soules [EMAIL PROTECTED] wrote: ls Thanks for your answers, but still no success : ls I tried (once again) to use maven to generate a brand new project, but ls eclipse freezes when i import the project generated with mvn ls eclipse:eclipse -DdownloadSources=true... ls Is there something i'm missing ? In my classpath, i have ls slf4j-log4j12-1.4.2.jar + log4j-1.2.14.jar, and still the infamous ls NoSuchMethodError ls Should i better rollback to wicket 1.3 beta2 ? ls 2007/11/2, Gerolf Seitz [EMAIL PROTECTED]: you have to use slf4j version 1.4.2 (instead of 1.0.x) in your pom file Gerolf On Nov 2, 2007 8:11 PM, landry soules [EMAIL PROTECTED] wrote: Hello Please Al, what is the fix for this problem with slf4j ? I spent half a day trying every possible combination between log4j and slf4j, and got nothing but a strong headache ( and NoSuchMethodError) !!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is Beta5 coming soon? Beta4 has caused these issues for us....
Actually, i didn't go on with maven, since my project is already quite advanced now, i don't want to reconfigure it to use maven. I just tried to create a sample project to figure out what is the correct combination of slf4j/log4j to use (bad idea, since it appears to be broken in the original wicket pom). So i'm back in my real eclipse project, and this neverending error : Exception in thread ModificationWatcher Task java.lang.NoSuchMethodError: org.slf4j.Logger.isTraceEnabled()Z at org.apache.wicket.util.thread.Task$1.run(Task.java:103) at java.lang.Thread.run(Thread.java:595) even though i'm using slf4j-log4j12-1.4.2.jar + log4j-1.2.14.jar. 2007/11/2, Gwyn Evans [EMAIL PROTECTED]: Hi landry, Did you modify the SLF version specified in the created pom.xml before trying to import it? /Gwyn Friday, November 2, 2007, 8:36:37 PM, landry soules [EMAIL PROTECTED] wrote: ls Thanks for your answers, but still no success : ls I tried (once again) to use maven to generate a brand new project, but ls eclipse freezes when i import the project generated with mvn ls eclipse:eclipse -DdownloadSources=true... ls Is there something i'm missing ? In my classpath, i have ls slf4j-log4j12-1.4.2.jar + log4j-1.2.14.jar, and still the infamous ls NoSuchMethodError ls Should i better rollback to wicket 1.3 beta2 ? ls 2007/11/2, Gerolf Seitz [EMAIL PROTECTED]: you have to use slf4j version 1.4.2 (instead of 1.0.x) in your pom file Gerolf On Nov 2, 2007 8:11 PM, landry soules [EMAIL PROTECTED] wrote: Hello Please Al, what is the fix for this problem with slf4j ? I spent half a day trying every possible combination between log4j and slf4j, and got nothing but a strong headache ( and NoSuchMethodError) !!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple wicket:child / tags on a single base page?
I found an excellent thread in the archives that explains this topic very well - I swear I searched before, but obviously with the wrong keywords ;) http://www.nabble.com/Multiple-wicket%3Achild-tags-in-the-same-page-tf37 75143.html Multiple child/extends pairs (where you have to see such a pair as an abstract method rather than a baseclass/subclass relationship) could help to combine the advantages of both approaches. However, its not a feature that would improve wickets functionality and probably not worth the effort of implementing it ... though it might be convenient. I was the original poster of that topic (although I made a few more replies that must have ended up in a different topic). I still think that viewing the child/extends pairs as abstracts methods instead of baseclass/sublass relationships is an ultimately cool model that Wicket will eventually support one day because now I see that I'm not the only one who has seen its potential. I think the belief that the concept of multiple overridden sections in a page constitutes or is analogous to multiple inheritance is incorrect. Looking at the overridden sections as abstract methods (of which you can have many per class in Java) makes a lot of sense. It's a very clean model and totally analogous to a single inheritance model as per Java: each page or panel still only has a single page or panel (analogous to class) from which it extends. The only requirement would be that if you do choose to support multiple abstract/overridden sections you would need to provide identifiers (just like an abstract method has a name) so that the 'compiler' (wicket) knows which section in a superclass an extended class section is overriding. In pages where only one section is overridden no identifiers would be necessary and so existing markup works without change, the way it does now. I also made comment that I think the 'child/extends' nomenclature was kinda wrong sounding. It doesn't seem like a natural fit. One of the things we try to teach the OO youngsters is that inheritance is very different to a parent/child relationship. Parent/Child is an association relationship where as inheritance is more of an 'extension', 'derivation' or 'specialization'. Too late for changing this now but that's never stopped me from making a pedantic contribution in the past so why stop now? ;-) In wicket we already specify the superclass of particular page markup via the 'extends' relationship between the corresponding Java classes so there's no need to use the 'extends' term in defining the individual overridable sections in the markup. Perhaps that tag might have been called 'abstract' in the base page and 'override' in the extended page and declared like: wicket:abstract id=sidemenubar Derived pages will supply their own side bar menu. [Abstract is a great word here because it indicates that no definition exists here - it's just declaring a placeholder - and it's perfectly analogous to the Java abstract keyword] /wicket:abstract id=sidemenubar 'Funky divider' that is common throughout the entire site goes in here wicket:abstract id=body Derived pages will supply their own body /wicket:abstract id=body In the derived (extended) page markups: wicket:override id=sidemenubar This is the side menu bar [A nice thing about the word override is that it is perfectly analogous to the @Override annotation in Java] /wicket:override id=sidemenubar 'Funky divider' comes from the base class - this section is ignored wicket:override id=body This is the side menu bar /wicket:override id=body One reason that support for multiple overridden sections in a page is so useful is that it is often desirable for a whole category of pages, each with a different body section, to have a common side bar menu - that is not common throughout the entire site - just common for that range of pages - yet the 'Funky divider' IS common to the entire site and so I only want to define it in one place - in the base page. I am sure there are many other examples of its usefulness which is probably why the topic arises from the ashes like a phoenix on a regular basis. :) It would be quite feasible to add support for multiple overridden sections using the above tag names while remaining backwards compatible with existing markup by continuing to support the old child/extends tags working the way they always have. I hope I got it right. Same here! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best practice question
Hi Doug, It is hard to say without knowing more about your app. As a rule, I never keep references to data in my components. Components have only refs to services (injectable) and all the data are encapsulated by IModels of one sort or another. The IModels always implement IDetachable and keep only the minumum of info necessary to rehydrate the data. Usually, LoadableDetachableModel provides all the functionality I need. Check to make sure you have followed these rules of thumb. You should be ok if you have. best, jim 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]
One Page Load Producing Three GETs
I've been trying to figure out why when I hit my wicket page, it loads three times. I discovered this while debugging...my constructor was called three times for my derived WebPage. I've captured the call stack produced by the three calls. (See below) In my web browser I'm merely pasting the URL and pressing enter once. It seems I'm getting three HTTP GETs. Stranger still, this seems to be Firefox specific. IE or WGET only create on GET. Using Live HTTP Headers, the firefox plugin, I've verified that three GET requests are sent to the server. By the way, this output appears in the java console and I haven't been able to track down the source that generates it. I can't seem to reproduce this using non-wicket pages, which is why I'm posting here, just in case anyone has seen anything like it and has comment. Any thoughts? 127.0.0.1 - - [02/Nov/2007:14:59:44 -0600] GET /myapp?pagemap=mainwicket:bookmarkablePage=mainframe:com.vetsource.web.wholesale.Pro_Search HTTP/1.1 200 28367 http://localhost:8090/; Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20061201 Firefox/2.0.0.8 (Ubuntu-feisty) - 127.0.0.1 - - [02/Nov/2007:14:59:47 -0600] GET /myapp?pagemap=mainwicket:bookmarkablePage=mainframe:com.vetsource.web.wholesale.Pro_Search HTTP/1.1 200 16384 http://localhost:8090/myapp?pagemap=mainwicket:bookmarkablePage=mainframe:com.vetsource.web.wholesale.Pro_Search; Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20061201 Firefox/2.0.0.8 (Ubuntu-feisty) - 127.0.0.1 - - [02/Nov/2007:14:59:48 -0600] GET /myapp?pagemap=mainwicket:bookmarkablePage=mainframe:com.vetsource.web.wholesale.Pro_Search HTTP/1.1 200 28367 - Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20061201 Firefox/2.0.0.8 (Ubuntu-feisty) - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: difference between Link(SomePage.class) and Link(new SomePage())
Hey Igor - Thanks for the reply. Unfortunately I am still having some trouble finding the solution for this. I've been using nabble to search the forums and so far I cannot find anything of use (perhaps my search terms aren't effective). it seems that main problem is that when invalidating a session and calling a page that was previously within the session, the page expires, which makes sense, but I need a way to tell wicket to use a new page and new session? once this happens. The closest thing I found on the mailing list were these threads: http://www.nabble.com/Page-expiration-tf4191798.html#a11972501 http://www.nabble.com/Clearing-Session-tf4684426.html#a13452853 Any help is greatly appreciated. Thanks. igor.vaynberg wrote: search the archives for this. this is a common mistake and has been explained/corrected on this mailing list a multitude of times. -igor On 11/2/07, auron [EMAIL PROTECTED] wrote: Hey all, Sorry to be the wicket newbie, but I was wondering if you guys could help me to understand how Links work. I understand that when you do Link(SomePage.class), it calls the zero param constructor of SomePage, and when you do Link(new SomePage(someParams)) you can call other constructors, but besides this, what are the other differences? I have a LoginPage that renders a login form if the zero param constructor is called, and when LoginPage(false) is called, it signs out the user first and then renders a login page. The problem is that when I use Link(new LoginPage(false)) to sign out the user, it does indeed sign out the user, but a wicket page expired message is rendered rather than the LoginPage. public LoginPage() { this(true); } public LoginPage(boolean isLogin) { Model simpleUser = new Model(new SimpleUser()); add(new SignInForm(loginform, simpleUser)); ACPSession session = getACPSession(); if (isLogin) { if (session.isSignedIn()) { error(getLocalizer().getString(login.errors.alreadysignedin, LoginPage.this)); } } else { if (session.isSignedIn()) { info(getLocalizer().getString(login.info.signedout)); session.signOut(); //after this, Page Expired error. } } } Hope this made sense, any help is greatly appreciated. Thank you, jin -- View this message in context: http://www.nabble.com/difference-between-Link%28SomePage.class%29-and-Link%28new-SomePage%28%29%29-tf4738073.html#a13549579 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/difference-between-Link%28SomePage.class%29-and-Link%28new-SomePage%28%29%29-tf4738073.html#a13556635 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why is LoadableDetachableModel read-only?
Hi, setObject() is not supported on LoadableDetachableModel because it extends AbstractReadOnlyModel. What is the reason for this? This way LoadableDetachableModel cannot be used with form controls. In my case I have a DropDownChoice with a list of non-serializable objects. What kind of model could I use to store the selected object? Best regards, Petar -- View this message in context: http://www.nabble.com/Why-is-LoadableDetachableModel-read-only--tf4740811.html#a13556640 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
what servlet container are you using? i think this problem popped up on weblogic before and was due to a combination of a weblogic bug and the particular servlet mapping that was used. Tomcat 5.5.20 does the behavior happen to all form components or just some particular one? All components don't preserve their values. try it without that funky onerror() override. I commented out the funky onerror() override and the problem still exists. H, getting curiouser and curiouser! -igor On 11/2/07, Chris Colman [EMAIL PROTECTED] wrote: can you make sure your servlet mapping is of form /foo/* -igor Yes it's of that form. - 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: One Page Load Producing Three GETs
empty src attributes in img tags seem to cause this kind of problems. Not sure if that is your case though. Martijn On 11/2/07, Devin Venable [EMAIL PROTECTED] wrote: I've been trying to figure out why when I hit my wicket page, it loads three times. I discovered this while debugging...my constructor was called three times for my derived WebPage. I've captured the call stack produced by the three calls. (See below) In my web browser I'm merely pasting the URL and pressing enter once. It seems I'm getting three HTTP GETs. Stranger still, this seems to be Firefox specific. IE or WGET only create on GET. Using Live HTTP Headers, the firefox plugin, I've verified that three GET requests are sent to the server. By the way, this output appears in the java console and I haven't been able to track down the source that generates it. I can't seem to reproduce this using non-wicket pages, which is why I'm posting here, just in case anyone has seen anything like it and has comment. Any thoughts? 127.0.0.1 - - [02/Nov/2007:14:59:44 -0600] GET /myapp?pagemap=mainwicket:bookmarkablePage=mainframe:com.vetsource.web.wholesale.Pro_Search HTTP/1.1 200 28367 http://localhost:8090/; Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20061201 Firefox/2.0.0.8 (Ubuntu-feisty) - 127.0.0.1 - - [02/Nov/2007:14:59:47 -0600] GET /myapp?pagemap=mainwicket:bookmarkablePage=mainframe:com.vetsource.web.wholesale.Pro_Search HTTP/1.1 200 16384 http://localhost:8090/myapp?pagemap=mainwicket:bookmarkablePage=mainframe:com.vetsource.web.wholesale.Pro_Search; Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20061201 Firefox/2.0.0.8 (Ubuntu-feisty) - 127.0.0.1 - - [02/Nov/2007:14:59:48 -0600] GET /myapp?pagemap=mainwicket:bookmarkablePage=mainframe:com.vetsource.web.wholesale.Pro_Search HTTP/1.1 200 28367 - Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20061201 Firefox/2.0.0.8 (Ubuntu-feisty) - - 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: Multiple wicket:child / tags on a single base page?
It would be quite feasible to add support for multiple overridden sections using the above tag names while remaining backwards compatible with existing markup by continuing to support the old child/extends tags working the way they always have. It's kind of a predictable answer, but the best way to push new ideas forward is to supply us with a patch, so that we can discuss some working code. The current committers don't see much in the idea, but that doesn't mean they wouldn't want to support at least the option of plugging this in. And hey, maybe some working code convinces us :-) Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is LoadableDetachableModel read-only?
setObject() is not supported on LoadableDetachableModel because it extends AbstractReadOnlyModel. What is the reason for this? Because load is an algorithm to get the value; if you set the value you have two different ways of getting that value which gets inconsistent easily. This way LoadableDetachableModel cannot be used with form controls. Why not? Typically, you would let the LDM return the form object - e.g. a User - and you let individual components work on it's properties - e.g. firstName -. You never need to set the actual user object. In my case I have a DropDownChoice with a list of non-serializable objects. What kind of model could I use to store the selected object? The model that provides the possible choices is different from the actual choice. The list could be done with the LDM and the choice e.g. with a property model. Also note that LDM, as convenient a class as it is, is really simple. If you want it to behave differently, it is trivial to create your own kind of model that does what you want. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple wicket:child / tags on a single base page?
It would be quite feasible to add support for multiple overridden sections using the above tag names while remaining backwards compatible with existing markup by continuing to support the old child/extends tags working the way they always have. It's kind of a predictable answer, but the best way to push new ideas forward is to supply us with a patch, so that we can discuss some working code. The current committers don't see much in the idea, but that doesn't mean they wouldn't want to support at least the option of plugging this in. And hey, maybe some working code convinces us :-) Eelco There's nothing I would love more right now than to have to time to implement a patch to support multiple overridden sections in a wicket page but unfortunately time is one thing I don't seem to have much of these days. I can't believe 2007 is almost over - heck, where did this year go? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple wicket:child / tags on a single base page?
There's nothing I would love more right now than to have to time to implement a patch to support multiple overridden sections in a wicket page but unfortunately time is one thing I don't seem to have much of these days. I can't believe 2007 is almost over - heck, where did this year go? Tell us about it :-) Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple wicket:child / tags on a single base page?
There's nothing I would love more right now than to have to time to implement a patch to support multiple overridden sections in a wicket page but unfortunately time is one thing I don't seem to have much of these days. I can't believe 2007 is almost over - heck, where did this year go? Tell us about it :-) Eelco Well if time is flying by so fast that means we all must be having waay too much fun - which is probably a good thing! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: difference between Link(SomePage.class) and Link(new SomePage())
boolean loggedIn = session.get().isSignedIn(); MySignInForm.setVisible(!loggedIn); then you can set your expired page settings to point to the page with your SignInForm hope this assists your design decision why should you invalidate a session by passing parameter to another page why not just call session.invalidate() from Link.onClick? On 11/2/07, auron [EMAIL PROTECTED] wrote: Hey Igor - Thanks for the reply. Unfortunately I am still having some trouble finding the solution for this. I've been using nabble to search the forums and so far I cannot find anything of use (perhaps my search terms aren't effective). it seems that main problem is that when invalidating a session and calling a page that was previously within the session, the page expires, which makes sense, but I need a way to tell wicket to use a new page and new session? once this happens. The closest thing I found on the mailing list were these threads: http://www.nabble.com/Page-expiration-tf4191798.html#a11972501 http://www.nabble.com/Clearing-Session-tf4684426.html#a13452853 Any help is greatly appreciated. Thanks. igor.vaynberg wrote: search the archives for this. this is a common mistake and has been explained/corrected on this mailing list a multitude of times. -igor On 11/2/07, auron [EMAIL PROTECTED] wrote: Hey all, Sorry to be the wicket newbie, but I was wondering if you guys could help me to understand how Links work. I understand that when you do Link(SomePage.class), it calls the zero param constructor of SomePage, and when you do Link(new SomePage(someParams)) you can call other constructors, but besides this, what are the other differences? I have a LoginPage that renders a login form if the zero param constructor is called, and when LoginPage(false) is called, it signs out the user first and then renders a login page. The problem is that when I use Link(new LoginPage(false)) to sign out the user, it does indeed sign out the user, but a wicket page expired message is rendered rather than the LoginPage. public LoginPage() { this(true); } public LoginPage(boolean isLogin) { Model simpleUser = new Model(new SimpleUser()); add(new SignInForm(loginform, simpleUser)); ACPSession session = getACPSession(); if (isLogin) { if (session.isSignedIn()) { error(getLocalizer().getString(login.errors.alreadysignedin, LoginPage.this)); } } else { if (session.isSignedIn()) { info(getLocalizer().getString(login.info.signedout)); session.signOut(); //after this, Page Expired error. } } } Hope this made sense, any help is greatly appreciated. Thank you, jin -- View this message in context: http://www.nabble.com/difference-between-Link%28SomePage.class%29-and-Link%28new-SomePage%28%29%29-tf4738073.html#a13549579 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/difference-between-Link%28SomePage.class%29-and-Link%28new-SomePage%28%29%29-tf4738073.html#a13556635 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
Could it be because the form page is bookmarkable? 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]
Re: Preserving user input after form error
why dont you submit a quickstart and then we can figure out why its happening -igor On 11/2/07, Chris Colman [EMAIL PROTECTED] wrote: Could it be because the form page is bookmarkable? 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]