Re: [Wicket-user] PopupSettings with no window name set generates invalid xhtml on Link
Hi James. Can you open a jira issue for this? https://issues.apache.org/jira/browse/WICKET Regards Frank On 5/11/07, James Renfro [EMAIL PROTECTED] wrote: Hi, I've just switched my code over from 1.2 to 1.3 beta, and I'm running into a problem where Wicket seems to be generating invalid xhtml -- specifically, it produces an href tag with a blank target attribute, as here: a href=?wicket:interface=:6:rows:1:launch::ILinkListener: target wicket:id=launch onclick=var w = window.open(href, '', 'scrollbars=yes,location=no,menuBar=no,resizable=yes,status=no,toolbar=no'); if(w.blur) w.focus(); return false;Launch/a Notice right after the href=, there's a naked 'target' attribute. I'm guessing this is because the Link popupPageMap.getName() method is returning a null. Looks like the code checks to make sure that popupPageMap is NOT null, but it doesn't check getName(). In the Wicket code I can see the following: snip class=org.apache.wicket.markup.html.link.Link lines=460:467 if (popupSettings != null) { IPageMap popupPageMap = popupSettings.getPageMap(this); if (popupPageMap != null) { tag.put(target, popupPageMap.getName()); } } /snip Here's my code: snip item.add(new Link(launch) { public void onClick() { setResponsePage(new LaunchFrameset()); } }.setPopupSettings(new PopupSettings(PopupSettings.RESIZABLE | PopupSettings.SCROLLBARS))); /snip If I add .setWindowName to my new PopupSettings object, everything seems to work. But I'm guessing it should work even if I forget to specify a window name. Thanks, James. -- James Renfro Programmer IET Mediaworks, UC Davis [EMAIL PROTECTED] W: 530-754-5097 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Tapestry vs. Wicket
Heres something on the toppic, this has been up in the past on the list, I would use nabble to search for it. Also use google to search for wicket vs JSF and tapestry vs JSF. And then compare after wards.. http://www.nabble.com/Re:-Wicket-vs-Tapestry-p290050.html craigdd wrote: I started looking at tapestry today, for some reason through out all my webapp development experience I never have taken a look at it. With that said I see a lot of similarities to wicket. Can someone point out the advantages that wicket has over tapestry. Kind of a side note, and I little off subject, but does anyone know the process of the Wicket in Action book? -Craig - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] DropDownChoice with IModel and ChoiceRenderer
hi, I am new to wicket so I am not sure how simple this issue is. I am creating DropDownChoice components. I want to a) build the the Options from a list of Objects (not primitives) and b) want to render the option id and value as an attribute of the object in the list. this definitly works in the following sample code: public class WicketSandbox extends WebPage { public WicketSandbox() { addPageTitle(Development Sandbox); final Form myForm = new Form(form); add(myForm); final ChoiceRenderer myRenderer = new ChoiceRenderer(name, id); myForm.add(new DropDownChoice(select,new MyChoices(),myRenderer)); } } But as soon as I add an IModel to the form it seems that the DropDownChoice looks up the choices in the form's IModel. I have tried to use the other constructors for the DropDownChoice which require an (String id, IModel model, IModel choices, IChoicerenderer renderer) but I can't figure out what is the difference between the 2 IModel objects that have to be provided. If I provide twice a ref to the same object I get a different error: The expression 'id' is neither an index nor is it a method for the list class java.util.ArrayList this is an improvement because it is accessing the right object and retrieving the list of choices but not extracting the the objects from the list as it does when I use (String id, IModel choices, IChoicerenderer renderer). In all cases if I remove the ChoiceRenderer my web page builds and displays but I see object.toString() values in my drop-downs. Any tips or pointers would be greatly appreciated. Florian Hehlen - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Partial page rendering with AjaxSubmitButton
1. Yes, it should be invoked. 2. form.replaceWith(anotherComponent); -Matej On 5/16/07, Mark van Leeuwen [EMAIL PROTECTED] wrote: I have a form on a page which I want to replace with another form when a Next button is pressed. I want to do this with AJAX. The form should only be replaced if there are no validation errors. Two questions: - the AjaxSubmitButton.onSubmit method is not being invoked when the button is clicked. Should I expect it to be? - assuming that it was invoked, how can can I replace the enclosing form with a new form? Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] [Request for enhancement] TabbedPanel
Currently, the markup generated for the tabbedPanel component looks like this: [code] wicket:panel div class=tab-row ul li wicket:id=tabs # [[tab title]] /li /ul /div [panel] /wicket:panel [/code] I think that it would be more useful to add a container to the existing tabs, so the resulted markup would look like this: [code] wicket:panel div wicket:id=tabsContainer class=tab-row ul li wicket:id=tabs # [[tab title]] /li /ul /div [panel] /wicket:panel [/code] This way you can append a new css class to this container (using AttributeAppender behavior) and can control the specific visual appearance of the tabbed panel... It is not enough to have only tab-row class, because if you have nested tabbed panels (which have different styling) it is hard to style them as you want... And finally, you give the developer a freedom to do what he wants with this container... What do you think? Thank you! -- View this message in context: http://www.nabble.com/-Request-for-enhancement--TabbedPanel-tf3764064.html#a10640047 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Highlander - 1 Template, Some Sub Pages, Many Components
More one doubt, if I want to add more than one component in these containers, than I need to use a List of components? It´s the best choice? For example, in my container Header1, I need to put some Panels, like HeaderPanel(panel), SearchPanel(search), AdsPanel(ads), like, addToHeader1(new HeaderPanel(panel)); addToHeader1(new SearchPanel(search)); addToHeader1(new AdsPanel(ads)); I need to change the code and insert something like this, List Components list that´s the idea? Thanks for any help Bombonato. On 5/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote: youre welcome -igor On 5/15/07, Fábio Bombonato [EMAIL PROTECTED] wrote: Igor, Thanks so much for the fast response. It seems exactly what I want. I´ll try to use your examples. I need to send you a postal card ;-) And again, thanks ! Bombonato. On 5/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote: class templatepage extends webpage { private boolean initialized=false; private final RepeatingView header1,content1; public templatepage() { add(header1=new RepeatingView(header1)); add(header2=new RepeatingView(content1)); } protected void addToHeader(Component c) { header1.add(c); } protected void addToContent1(Component c) { content1.add(c); } protected abstract initialize(); onBeforeRender() { if (!initialized) { initialize(); initialized=true; } } templatepage.html htmlbody... div id=header1div wicket:id=header1/div/div div id=header1div wicket:id=content1/div/div wicket:child/!-- needed for markup inheritance -- /body /html class page1 extends templatepage { initialize() { addToHeader1(new HeaderPanel(panel)); Fragment f=new Fragment(1,contentfrag); f.add(new Label(hello,hello)); addToContent1(f); } } page1.html wicket:extend wicket:fragment wicket:id=contentfrag div wicket:id=hello/div /wicket:fragment /wicket:extend you can add two types of components into those containers: panels and fragments. if you use a fragment then you have to define its markup in the page's html. -igor On 5/15/07, Fábio Bombonato [EMAIL PROTECTED] wrote: Hi Folks, I´m newbie in Wicket, but until last week I trying to figure out how to organize the code and html markup with wicket to get a template page to work. Let me explain, I´m want to create a Template web page that contains markup´s that I called containers, for example: Template.html: html head /head body div id=header1 wicket:id=header1/div div id=content1 wicket:id=content1/div div id=content2 wicket:id=content2/div /body /html In this containers I could insert many components in each one, or simple no one, depends on which web page will use this template. Than, I create a web page to use the containers of theTemplate.html and insert in it the components that I want. For example, MainPage.html html head /head body div id=header1 wicket:id=header1 span wicket:id=login/span /div div id=content1 wicket:id=content1 span wicket:id=lastNews/span /div div id=content2 wicket:id=content2 span wicket:id=blogContent/span /div /body /html In above example I repeat the Template html code to exemplify the situation, however the problem is that I don´t want to repeat the Template page all time to create some web page, I want to reuse the template web page and not repeat that in sub pages. The template page is used for all the pages, so it´s easy if the design is centralized in that template page the only place that I need to modify that design if I want to change the main template page and not in all sub pages. Reading the Maillist, the people call this the Dreamweaver centric. Remembering, the pages that use template could change the components used in it. For example: UserProfilePage.html html head /head body div id=header1 wicket:id=header1 span wicket:id=showAd/span /div div id=content1 wicket:id=content1 span wicket:id=userProfileDetails/span /div div id=content2 wicket:id=content2 span wicket:id=lastUsers/span /div /body /html Note that all components was changed. So, it´s not the simple Header, Content and Footer centric, which header and footer is static, but all parts in the containers could be changed. Them, use the markup inheritance and wicket:child / it isn´t sufficient, because all content could change and not a
[Wicket-user] Wicket-Kronos-CMS repository locked on startup
Hi, I want to run a Wicket-Kronos-CMS on Tomcat. When I try to enter a home page I have an error: WicketMessage: Can't instantiate page using constructor public wicket.kronos.frontpage.Frontpage(wicket.PageParameters) and argument which is caused by: javax.jcr.RepositoryException: The repository home at repository appears to be in use since the file at repository\.lock is locked by another process. at org.apache.jackrabbit.core.RepositoryImpl.acquireRepositoryLock(RepositoryImpl.java:323) at org.apache.jackrabbit.core.RepositoryImpl.init(RepositoryImpl.java:198) at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:484) at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:241) at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:261) at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:329) at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:359) at wicket.kronos.KronosSession.getJCRSession(KronosSession.java:145) at wicket.kronos.frontpage.Frontpage.init(Frontpage.java:43) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) At KronosApplication class there is a line 44: DataProcessor.repositoryStartup(); which starts repository and makes a .lock. When I want to enter a Kronos home page in web browser then KronosSession.getJCRSession() is called and it wants to start a repository once again. Is it a bug or what do I wrong? Is there any documentation about this project? Best regards, Daniel Stoch - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Request for enhancement] TabbedPanel
Hi Alex, The way I've tackled this is to have a wrapper div around the entire tab panel, like so... div class=mytabs div class=tab-row ul ... /ul /div /div You just need to add the wrapper div to your CSS selector: div.mytabs li { background-color: green; } Then you can have different wrapper divs for different styling: div.othertabs li { background-color: purple; } If you need to dynamically manipulate the wrapper div, simply attach a WebMarkupContainer to it. HTH jk On Wed, May 16, 2007 at 04:33:37AM -0700, Alex Objelean wrote: Currently, the markup generated for the tabbedPanel component looks like this: [code] wicket:panel div class=tab-row ul li wicket:id=tabs # [[tab title]] /li /ul /div [panel] /wicket:panel [/code] I think that it would be more useful to add a container to the existing tabs, so the resulted markup would look like this: [code] wicket:panel div wicket:id=tabsContainer class=tab-row ul li wicket:id=tabs # [[tab title]] /li /ul /div [panel] /wicket:panel [/code] This way you can append a new css class to this container (using AttributeAppender behavior) and can control the specific visual appearance of the tabbed panel... It is not enough to have only tab-row class, because if you have nested tabbed panels (which have different styling) it is hard to style them as you want... And finally, you give the developer a freedom to do what he wants with this container... What do you think? Thank you! -- View this message in context: http://www.nabble.com/-Request-for-enhancement--TabbedPanel-tf3764064.html#a10640047 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Request for enhancement] TabbedPanel
That is the problem. How can I attach a WebMarkupContainer to a tab-row container? The markup is generated by TabbedPanel and I cannot manipulate it's markup... :( Hi Alex, The way I've tackled this is to have a wrapper div around the entire tab panel, like so... div class=mytabs div class=tab-row ul ... /ul /div /div You just need to add the wrapper div to your CSS selector: div.mytabs li { background-color: green; } Then you can have different wrapper divs for different styling: div.othertabs li { background-color: purple; } If you need to dynamically manipulate the wrapper div, simply attach a WebMarkupContainer to it. HTH jk On Wed, May 16, 2007 at 04:33:37AM -0700, Alex Objelean wrote: Currently, the markup generated for the tabbedPanel component looks like this: [code] wicket:panel div class=tab-row ul li wicket:id=tabs # [[tab title]] /li /ul /div [panel] /wicket:panel [/code] I think that it would be more useful to add a container to the existing tabs, so the resulted markup would look like this: [code] wicket:panel div wicket:id=tabsContainer class=tab-row ul li wicket:id=tabs # [[tab title]] /li /ul /div [panel] /wicket:panel [/code] This way you can append a new css class to this container (using AttributeAppender behavior) and can control the specific visual appearance of the tabbed panel... It is not enough to have only tab-row class, because if you have nested tabbed panels (which have different styling) it is hard to style them as you want... And finally, you give the developer a freedom to do what he wants with this container... What do you think? Thank you! -- View this message in context: http://www.nabble.com/-Request-for-enhancement--TabbedPanel-tf3764064.html#a10641787 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] reseting the input in form components
Hi, I'd like to have a feature in a form to reset the input in the form components to the original value in the model (thus allowing the user to cancel or revert all changes he has done in the textfields and so on and instead display the original values in the backing model). My current implementation in the form ctor is like this: cancelButton = new Button(cancelButton) { protected void onSubmit() { SettingsForm.this.setModel(SettingsForm.this.getModel()); } }; cancelButton.setDefaultFormProcessing(false); cancelButton.setOutputMarkupId(true); add(cancelButton); This works but maybe there is some better way to achieve what I want? The main problem with my implementation is that I also use a FormComponentVisitor to install the following Ajaxbehaviour on the FormComponents in order to only enable the cancel button (which as default is disabled) whenever the user changes the input in a form component. Installing the behaviour destroys the cancel functionality for a DropDownChoice in the form (textfields/textarea still working). I suppose that the model of the DropDownChoice is updated due to the ajax round-trip, but why is the model of the textfields not touched? public void formComponent(FormComponent c) { if (! (c instanceof Button)) { c.add(new AjaxFormComponentUpdatingBehavior(onclick) { protected void onUpdate(AjaxRequestTarget target) { cancelButton.setEnabled(true); target.addComponent(cancelButton); } }); } Any suggestions? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Need to reload app in tomcat aftering adding a variant markup
* Juergen Donnerstag: This is true, but I understand Chris has a general need for markup reloading in production as well (though I haven't understood yet how Chris creates the markup files at runtime). Or did I misunderstand that? And though disabled in deployment mode by default, he could enable it for his specific application. Indeed, ModificationWatcher acting on previously not found files should be done only in development mode by default, and Chris will just have to enable it for his deployment. Cheers, -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Request for enhancement] TabbedPanel
In fact now that I think of it, you don't even need the wrapper div. Remember that the TabbedPanel renders the tabs *inside* the tag to which it's attached. That tag can contain the CSS class that makes that set of tabs unique: div wicket:id=tabs class=greentabs/div add(new TabbedPanel(tabs, tabs)); The result is like this: div class=greentabs div class=tab-row ... /div /div If you need to determine the class dynamically, just add an appropriate behaviour to the TabbedPanel: add(new TabbedPanel(tabs, tabs) .add(new AttributeModifier(class, new Model(purpletabs; jk On Wed, May 16, 2007 at 06:28:57AM -0700, Alex Objelean wrote: That is the problem. How can I attach a WebMarkupContainer to a tab-row container? The markup is generated by TabbedPanel and I cannot manipulate it's markup... :( Hi Alex, The way I've tackled this is to have a wrapper div around the entire tab panel, like so... div class=mytabs div class=tab-row ul ... /ul /div /div You just need to add the wrapper div to your CSS selector: div.mytabs li { background-color: green; } Then you can have different wrapper divs for different styling: div.othertabs li { background-color: purple; } If you need to dynamically manipulate the wrapper div, simply attach a WebMarkupContainer to it. HTH jk On Wed, May 16, 2007 at 04:33:37AM -0700, Alex Objelean wrote: Currently, the markup generated for the tabbedPanel component looks like this: [code] wicket:panel div class=tab-row ul li wicket:id=tabs # [[tab title]] /li /ul /div [panel] /wicket:panel [/code] I think that it would be more useful to add a container to the existing tabs, so the resulted markup would look like this: [code] wicket:panel div wicket:id=tabsContainer class=tab-row ul li wicket:id=tabs # [[tab title]] /li /ul /div [panel] /wicket:panel [/code] This way you can append a new css class to this container (using AttributeAppender behavior) and can control the specific visual appearance of the tabbed panel... It is not enough to have only tab-row class, because if you have nested tabbed panels (which have different styling) it is hard to style them as you want... And finally, you give the developer a freedom to do what he wants with this container... What do you think? Thank you! -- View this message in context: http://www.nabble.com/-Request-for-enhancement--TabbedPanel-tf3764064.html#a10641787 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] How to format a TextField to get a valid Date
Hi can some one point me on how to format a text field to get a date like ' dd.MM.yy' and then, when submitting the form get a clean pass? you see I am getting a not a valid date message. regards, f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Request for enhancement] TabbedPanel
This solution adds the css class the the entire tabbedPanel container, subsequently all nested tabbedPanels will be treated the same way What I need is to identify the tab-row container John Krasnay wrote: In fact now that I think of it, you don't even need the wrapper div. Remember that the TabbedPanel renders the tabs *inside* the tag to which it's attached. That tag can contain the CSS class that makes that set of tabs unique: div wicket:id=tabs class=greentabs/div add(new TabbedPanel(tabs, tabs)); The result is like this: div class=greentabs div class=tab-row ... /div /div If you need to determine the class dynamically, just add an appropriate behaviour to the TabbedPanel: add(new TabbedPanel(tabs, tabs) .add(new AttributeModifier(class, new Model(purpletabs; jk On Wed, May 16, 2007 at 06:28:57AM -0700, Alex Objelean wrote: That is the problem. How can I attach a WebMarkupContainer to a tab-row container? The markup is generated by TabbedPanel and I cannot manipulate it's markup... :( Hi Alex, The way I've tackled this is to have a wrapper div around the entire tab panel, like so... div class=mytabs div class=tab-row ul ... /ul /div /div You just need to add the wrapper div to your CSS selector: div.mytabs li { background-color: green; } Then you can have different wrapper divs for different styling: div.othertabs li { background-color: purple; } If you need to dynamically manipulate the wrapper div, simply attach a WebMarkupContainer to it. HTH jk On Wed, May 16, 2007 at 04:33:37AM -0700, Alex Objelean wrote: Currently, the markup generated for the tabbedPanel component looks like this: [code] wicket:panel div class=tab-row ul li wicket:id=tabs # [[tab title]] /li /ul /div [panel] /wicket:panel [/code] I think that it would be more useful to add a container to the existing tabs, so the resulted markup would look like this: [code] wicket:panel div wicket:id=tabsContainer class=tab-row ul li wicket:id=tabs # [[tab title]] /li /ul /div [panel] /wicket:panel [/code] This way you can append a new css class to this container (using AttributeAppender behavior) and can control the specific visual appearance of the tabbed panel... It is not enough to have only tab-row class, because if you have nested tabbed panels (which have different styling) it is hard to style them as you want... And finally, you give the developer a freedom to do what he wants with this container... What do you think? Thank you! -- View this message in context: http://www.nabble.com/-Request-for-enhancement--TabbedPanel-tf3764064.html#a10641787 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/-Request-for-enhancement--TabbedPanel-tf3764064.html#a10642947 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] DropDownChoice with IModel and ChoiceRenderer
if you type it it looks like this DDCT(String,IModelT,IModelListT,IChoiceRendererT) the first model is the one that holds the selection, the second is the one that holds a list of available choices. the constructor with a single model: DDCT(String,IModelListT,IChoiceRendererT) is used when you use DDC in combination with a compound property model on the form, in which case the ddc's id is used as a property expression into form's model to determine the selection. there is a great wiki page on models. so try this myForm.add(new DropDownChoice(select,new Model(),new MyChoices(),myRenderer)); this will create a ddc with a null selection. its not practical, because to get the selection you have to call ddc.getmodelobject(), but it will at least get you going before you decide on what model to use. -igor On 5/16/07, Florian Hehlen [EMAIL PROTECTED] wrote: hi, I am new to wicket so I am not sure how simple this issue is. I am creating DropDownChoice components. I want to a) build the the Options from a list of Objects (not primitives) and b) want to render the option id and value as an attribute of the object in the list. this definitly works in the following sample code: public class WicketSandbox extends WebPage { public WicketSandbox() { addPageTitle(Development Sandbox); final Form myForm = new Form(form); add(myForm); final ChoiceRenderer myRenderer = new ChoiceRenderer(name, id); myForm.add(new DropDownChoice(select,new MyChoices(),myRenderer)); } } But as soon as I add an IModel to the form it seems that the DropDownChoice looks up the choices in the form's IModel. I have tried to use the other constructors for the DropDownChoice which require an (String id, IModel model, IModel choices, IChoicerenderer renderer) but I can't figure out what is the difference between the 2 IModel objects that have to be provided. If I provide twice a ref to the same object I get a different error: The expression 'id' is neither an index nor is it a method for the list class java.util.ArrayList this is an improvement because it is accessing the right object and retrieving the list of choices but not extracting the the objects from the list as it does when I use (String id, IModel choices, IChoicerenderer renderer). In all cases if I remove the ChoiceRenderer my web page builds and displays but I see object.toString() values in my drop-downs. Any tips or pointers would be greatly appreciated. Florian Hehlen - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Highlander - 1 Template, Some Sub Pages, Many Components
On 5/16/07, Fábio Bombonato [EMAIL PROTECTED] wrote: More one doubt, if I want to add more than one component in these containers, than I need to use a List of components? It´s the best choice? For example, in my container Header1, I need to put some Panels, like HeaderPanel(panel), SearchPanel(search), AdsPanel(ads), like, addToHeader1(new HeaderPanel(panel)); addToHeader1(new SearchPanel(search) ); addToHeader1(new AdsPanel(ads)); I need to change the code and insert something like this, List Components list that´s the idea? not sure what you mean, but those multiple add calls should work because they are adding components into a repeater. the rest (how you invoke those add calls) is up to you. -igor Thanks for any help Bombonato. On 5/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote: youre welcome -igor On 5/15/07, Fábio Bombonato [EMAIL PROTECTED] wrote: Igor, Thanks so much for the fast response. It seems exactly what I want. I´ll try to use your examples. I need to send you a postal card ;-) And again, thanks ! Bombonato. On 5/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote: class templatepage extends webpage { private boolean initialized=false; private final RepeatingView header1,content1; public templatepage() { add(header1=new RepeatingView(header1)); add(header2=new RepeatingView(content1)); } protected void addToHeader(Component c) { header1.add(c); } protected void addToContent1(Component c) { content1.add(c); } protected abstract initialize(); onBeforeRender() { if (!initialized) { initialize(); initialized=true; } } templatepage.html htmlbody... div id=header1div wicket:id=header1/div/div div id=header1div wicket:id=content1/div/div wicket:child/!-- needed for markup inheritance -- /body /html class page1 extends templatepage { initialize() { addToHeader1(new HeaderPanel(panel)); Fragment f=new Fragment(1,contentfrag); f.add(new Label(hello,hello)); addToContent1(f); } } page1.html wicket:extend wicket:fragment wicket:id=contentfrag div wicket:id=hello/div /wicket:fragment /wicket:extend you can add two types of components into those containers: panels and fragments. if you use a fragment then you have to define its markup in the page's html. -igor On 5/15/07, Fábio Bombonato [EMAIL PROTECTED] wrote: Hi Folks, I´m newbie in Wicket, but until last week I trying to figure out how to organize the code and html markup with wicket to get a template page to work. Let me explain, I´m want to create a Template web page that contains markup´s that I called containers, for example: Template.html: html head /head body div id=header1 wicket:id=header1/div div id=content1 wicket:id=content1/div div id=content2 wicket:id=content2/div /body /html In this containers I could insert many components in each one, or simple no one, depends on which web page will use this template. Than, I create a web page to use the containers of theTemplate.html and insert in it the components that I want. For example, MainPage.html html head /head body div id=header1 wicket:id=header1 span wicket:id=login/span /div div id=content1 wicket:id=content1 span wicket:id=lastNews/span /div div id=content2 wicket:id=content2 span wicket:id=blogContent/span /div /body /html In above example I repeat the Template html code to exemplify the situation, however the problem is that I don´t want to repeat the Template page all time to create some web page, I want to reuse the template web page and not repeat that in sub pages. The template page is used for all the pages, so it´s easy if the design is centralized in that template page the only place that I need to modify that design if I want to change the main template page and not in all sub pages. Reading the Maillist, the people call this the Dreamweaver centric. Remembering, the pages that use template could change the components used in it. For example: UserProfilePage.html html head /head body div id=header1 wicket:id=header1 span wicket:id=showAd/span /div div id=content1 wicket:id=content1 span wicket:id=userProfileDetails/span /div div id=content2 wicket:id=content2
Re: [Wicket-user] Need to reload app in tomcat aftering adding a variant markup
is the modification watcher what causes file handles to be left open? how do you expect that to be enabled in production? -igor On 5/16/07, Jean-Baptiste Quenot [EMAIL PROTECTED] wrote: * Juergen Donnerstag: This is true, but I understand Chris has a general need for markup reloading in production as well (though I haven't understood yet how Chris creates the markup files at runtime). Or did I misunderstand that? And though disabled in deployment mode by default, he could enable it for his specific application. Indeed, ModificationWatcher acting on previously not found files should be done only in development mode by default, and Chris will just have to enable it for his deployment. Cheers, -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] How to format a TextField to get a valid Date
see DateTextField in extensions. you can specify the desired pattern when you instantiate it, and it will do the rest. -igor On 5/16/07, Francisco Diaz Trepat - gmail [EMAIL PROTECTED] wrote: Hi can some one point me on how to format a text field to get a date like 'dd.MM.yy' and then, when submitting the form get a clean pass? you see I am getting a not a valid date message. regards, f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Modifying GridView elements
Hi, I'm new to Wicket, so pardon me if this is a newbie question; I haven't found any posts addressing the issue though. I'm reviewing the various repeater-based classes in wicket.extensions, and while I like several of them I don't see any existing pattern(s) for saving user-modified values presented in grid cells. I'm particularly interested in the IDataProvider-based classes; I like this mechanism for getting data into the grid, and want to have a parallel mechanism for persisting data back into the model. Any guidance? Thanks, Neil -- View this message in context: http://www.nabble.com/Modifying-GridView-elements-tf3767974.html#a10652338 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Highlander - 1 Template, Some Sub Pages, Many Components
People, forget about, my mistake. Only need to add the other component by calling the addToHeader1 (or any other) again with the new panel, like: addToHeader1(new HeaderPanel(panel)); addToHeader1(new SearchPanel(search) ); addToHeader1(new AdsPanel(ads)); Thanks for everybody e mainly Igor! Bombonato. On 5/16/07, Fábio Bombonato [EMAIL PROTECTED] wrote: More one doubt, if I want to add more than one component in these containers, than I need to use a List of components? It´s the best choice? For example, in my container Header1, I need to put some Panels, like HeaderPanel(panel), SearchPanel(search), AdsPanel(ads), like, addToHeader1(new HeaderPanel(panel)); addToHeader1(new SearchPanel(search) ); addToHeader1(new AdsPanel(ads)); I need to change the code and insert something like this, List Components list that´s the idea? Thanks for any help Bombonato. On 5/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote: youre welcome -igor On 5/15/07, Fábio Bombonato [EMAIL PROTECTED] wrote: Igor, Thanks so much for the fast response. It seems exactly what I want. I´ll try to use your examples. I need to send you a postal card ;-) And again, thanks ! Bombonato. On 5/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote: class templatepage extends webpage { private boolean initialized=false; private final RepeatingView header1,content1; public templatepage() { add(header1=new RepeatingView(header1)); add(header2=new RepeatingView(content1)); } protected void addToHeader(Component c) { header1.add(c); } protected void addToContent1(Component c) { content1.add(c); } protected abstract initialize(); onBeforeRender() { if (!initialized) { initialize(); initialized=true; } } templatepage.html htmlbody... div id=header1div wicket:id=header1/div/div div id=header1div wicket:id=content1/div/div wicket:child/!-- needed for markup inheritance -- /body /html class page1 extends templatepage { initialize() { addToHeader1(new HeaderPanel(panel)); Fragment f=new Fragment(1,contentfrag); f.add(new Label(hello,hello)); addToContent1(f); } } page1.html wicket:extend wicket:fragment wicket:id=contentfrag div wicket:id=hello/div /wicket:fragment /wicket:extend you can add two types of components into those containers: panels and fragments. if you use a fragment then you have to define its markup in the page's html. -igor On 5/15/07, Fábio Bombonato [EMAIL PROTECTED] wrote: Hi Folks, I´m newbie in Wicket, but until last week I trying to figure out how to organize the code and html markup with wicket to get a template page to work. Let me explain, I´m want to create a Template web page that contains markup´s that I called containers, for example: Template.html: html head /head body div id=header1 wicket:id=header1/div div id=content1 wicket:id=content1/div div id=content2 wicket:id=content2/div /body /html In this containers I could insert many components in each one, or simple no one, depends on which web page will use this template. Than, I create a web page to use the containers of theTemplate.html and insert in it the components that I want. For example, MainPage.html html head /head body div id=header1 wicket:id=header1 span wicket:id=login/span /div div id=content1 wicket:id=content1 span wicket:id=lastNews/span /div div id=content2 wicket:id=content2 span wicket:id=blogContent/span /div /body /html In above example I repeat the Template html code to exemplify the situation, however the problem is that I don´t want to repeat the Template page all time to create some web page, I want to reuse the template web page and not repeat that in sub pages. The template page is used for all the pages, so it´s easy if the design is centralized in that template page the only place that I need to modify that design if I want to change the main template page and not in all sub pages. Reading the Maillist, the people call this the Dreamweaver centric. Remembering, the pages that use template could change the components used in it. For example: UserProfilePage.html html head /head body div id=header1 wicket:id=header1 span wicket:id=showAd/span /div div id=content1 wicket:id=content1 span
Re: [Wicket-user] Page Expiration when first clicking AJAX
HomePage is the actual page itself. The mount is just what I mounted in the Application class using: mount(/app, PackageName.forClass(getHomePage())); On 5/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote: if your homepage is mounted to /app then the url should be /context/app. so where does HomePage come from? -igor On 5/15/07, Andrew Berman [EMAIL PROTECTED] wrote: It's mapped to /context/* and the HomePage class is mounted to /app, so the url for the homepage is http://blah.com/context/app/HomePage. Going directly to http://blah.com/context redirects to http://blah.com/context/app/HomePage On 5/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote: so wicket is mapped to /* but homepage is mounted to /app/homepage? -igor On 5/15/07, Andrew Berman [EMAIL PROTECTED] wrote: I'm not doing any redirect using index.html and a meta redirect. I just call blah.com/context and Wicket is doing the redirect to /app/homepage. /app is what I use for the mount point. On 5/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i dont think that is it. jsessionid is only appended when there is a session. when you hit blah.com/context you are probably hitting index.htmlthat does a metaredirect to blah.com/context/app/homepage. so on the first hit to blah.com/context there is no session. now when you hit /app/home a session is created, and cookie is set. -igor On 5/15/07, Andrew Berman [EMAIL PROTECTED] wrote: I'm going to debug it a bit more to see what's going on. The jsessionid is not appended to the URL until Wicket performs a redirect from the context to the actual home page (e.g. from http://blah.com/context redirects to http://blah.com/context/app/HomePage), so I'm wondering if the redirect is doing something that's causing Tomcat to think it's a new session, thereby making the jsessionid in the URL not equal the one in the cookie. Eelco, I'll take a look at what you're saying too and see if I can reconfigure Tomcat as well. On 5/15/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Also, sessions are managed by the app server, not by Wicket or Spring MVC. I had a problem a while ago losing sessions going from foo.mydomain.com to bar.mydomain.com, and that only worked well when I configured Jetty's session manager to use .mydomain.com as it's session domain. Maybe your problem is similar? Or even if it isn't, what I'm saying is that it is very unlikely Wicket or any other framework is the bad guy as Wicket just uses the servlet API as-is. Eelco On 5/15/07, Johan Compagner [EMAIL PROTECTED] wrote: can you look at the first request if the wicket session is really pushed to the http session (so is the http session created?) you can look at that in the set atribute of the session store On 5/15/07, Andrew Berman [EMAIL PROTECTED] wrote: I think I found the crux of the problem. When you first go to the app, as I've mentioned, it puts the jsessionid in the URL. Well, I compared that sessionid to the one in the cookie created and they are different! That has to be the reason it creates a new session. Now to figure out why it's doing that. On 5/14/07, Andrew Berman [EMAIL PROTECTED] wrote: Spring MVC does put the jsessionid in the URL. What I don't understand is that when coming into the Wicket app for the first time, it goes to the home page fine with the jsessionid in the URL, and then I click any link and all session attributes are gone. Literally a brand new session is created no matter what link I click. However, once I click that next link, all is fine and that second new session is the one that is used. Just doesn't make any sense. On 5/14/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Definitely not what I want, but it's the only thing that works. There's clearly a problem in how Wicket is getting the session from the cookie. My Spring MVC app which uses the same WAR has no issues pulling the session info. I don't really understand the problem though. Like Johan said, the first time a persistent session is made, Tomcat puts the session id in the URL as it doesn't know yet whether it can rely on cookies (if I understand correctly). Spring MVC might not do that for the particular things you test it for as it doesn't create a session? If you would use stateless
[Wicket-user] I AM NOT RECEIVING THE MAILING LIST ANYMORE
I just read a reply from Chuck about a DateTextField. Sorry guys I didn't get the mail. but I read it on Nabble. cheers, f(t) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] autolink-problem with img and relative path
Maybe the answer to the following question is the problem's solution: How it is intented to add an own IAutolinkResolverDelegate to the AutoLinkResolver? Tom Thomas Singer-4 wrote: I have a WebPage pages.Index (mapping to /index.html) whose markup contains an img-tag with the relative path ../../../screenshots/foo.png (the 1st ../ to get out of the pages-package, the 2nd ../ to get out of the classes-directory, the third ../ to get out of the WEB-INF-directory). This has the advantage, that the path is already valid in my undeployed project. Unfortunately, the autolink resolver seems not able to convert it to a valid path: java.lang.IllegalArgumentException: Invalid path ../../../screenshots/foo.png at wicket.util.lang.Packages.absolutePath(Packages.java:109) at wicket.util.lang.Packages.absolutePath(Packages.java:46) at wicket.markup.html.PackageResource.exists(PackageResource.java:263) at wicket.markup.resolver.AutoLinkResolver$ResourceReferenceAutolink.init(AutoLinkResolver.java:547) at wicket.markup.resolver.AutoLinkResolver$AbstractAutolinkResolverDelegate.newPackageResourceReferenceAutoComponent(AutoLinkResolver.java:118) at wicket.markup.resolver.AutoLinkResolver$ResourceReferenceResolverDelegate.newAutoComponent(AutoLinkResolver.java:620) at wicket.markup.resolver.AutoLinkResolver.resolveAutomaticLink(AutoLinkResolver.java:832) at wicket.markup.resolver.AutoLinkResolver.resolve(AutoLinkResolver.java:763) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1361) ... I would have expected it to convert the path to /screenshots/foo.png. How can I work around this issue? Is it possible to plug in an own resolver implementation? If so, where can I find some documentation (beside digging the source code)? -- View this message in context: http://www.nabble.com/autolink-problem-with-img-and-relative-path-tf3761166.html#a10652747 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] TabbedPanel - select which tab to show when page loads
Sorry..I just remembered that it could be a problem with the userId value (which I tried to pass to the first tab and show on a Label). THAT only appears AFTER I click on the tab, and not when the TabbedPanel page loads.. Actually, if I add another Label with it's contents defined within the first tab panel, it shows up.. :/ duuh Nevertheless, I'd still like to know how to pass the userId argument from the LoginPage to the first tab..if someone wants to take a look at the previous post..or maybe I'll find out (my guess is that It's some kind of Java-related mistake and not a Wicket one.. :) PS: kind of newbie in wicket and haven't been programming much in Java :P Thanks, Edd eddmosphere wrote: Hi there! Maybe someone can help me: I have a Login page which sends me to another page that contains the TabbedPanel. What I need is to show the contents of the first tab (as if it was the user Home page) when the TabbedPanel page loads..but that's not happening, because I couldn't find how to set that first tab as the active tab..I tried setSelectedTab(0) but it didn't work - I always need to select the tab before it's contents show. Here's some code: ---BasePage-- page that contains the TabbedPanel and is called by the LoginPage onSubmit() ... public BasePage() { setModel(new Model(tabpanel)); List tabs = new ArrayList(); tabs.add(new AbstractTab(new Model(Home)){ public Panel getPanel(String panelId){ return new TabPanel1(panelId, userId); //userId is the TabPanel1 content (a Label) } }); tabs.add(new AbstractTab(new Model(Users)){ public Panel getPanel(String panelId){ return new TabPanel2(panelId); } }); TabbedPanel tabbedPanel = new TabbedPanel(tabs, tabs); tabbedPanel.setSelectedTab(0); add(tabbedPanel); ... ---LoginPage-- ... if(authenticate...){ BasePage basePage = new BasePage(); basePage.setUserId(userIdIn); //value to pass to the TabPanel1 Label setResponsePage(basePage); } ... Hope I explained well ._. Thanks, Edd -- View this message in context: http://www.nabble.com/TabbedPanel---select-which-tab-to-show-when-page-loads-tf3765927.html#a10652961 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [Request for enhancement] TabbedPanel
Ahh, I see...the problem is *nested* tabs. Sorry for not picking that up earlier. However, I think the same principle applies, no? Just give the inner tab panel a different CSS class than the outer one. jk On Wed, May 16, 2007 at 07:39:04AM -0700, Alex Objelean wrote: This solution adds the css class the the entire tabbedPanel container, subsequently all nested tabbedPanels will be treated the same way What I need is to identify the tab-row container John Krasnay wrote: In fact now that I think of it, you don't even need the wrapper div. Remember that the TabbedPanel renders the tabs *inside* the tag to which it's attached. That tag can contain the CSS class that makes that set of tabs unique: div wicket:id=tabs class=greentabs/div add(new TabbedPanel(tabs, tabs)); The result is like this: div class=greentabs div class=tab-row ... /div /div If you need to determine the class dynamically, just add an appropriate behaviour to the TabbedPanel: add(new TabbedPanel(tabs, tabs) .add(new AttributeModifier(class, new Model(purpletabs; jk On Wed, May 16, 2007 at 06:28:57AM -0700, Alex Objelean wrote: That is the problem. How can I attach a WebMarkupContainer to a tab-row container? The markup is generated by TabbedPanel and I cannot manipulate it's markup... :( Hi Alex, The way I've tackled this is to have a wrapper div around the entire tab panel, like so... div class=mytabs div class=tab-row ul ... /ul /div /div You just need to add the wrapper div to your CSS selector: div.mytabs li { background-color: green; } Then you can have different wrapper divs for different styling: div.othertabs li { background-color: purple; } If you need to dynamically manipulate the wrapper div, simply attach a WebMarkupContainer to it. HTH jk On Wed, May 16, 2007 at 04:33:37AM -0700, Alex Objelean wrote: Currently, the markup generated for the tabbedPanel component looks like this: [code] wicket:panel div class=tab-row ul li wicket:id=tabs # [[tab title]] /li /ul /div [panel] /wicket:panel [/code] I think that it would be more useful to add a container to the existing tabs, so the resulted markup would look like this: [code] wicket:panel div wicket:id=tabsContainer class=tab-row ul li wicket:id=tabs # [[tab title]] /li /ul /div [panel] /wicket:panel [/code] This way you can append a new css class to this container (using AttributeAppender behavior) and can control the specific visual appearance of the tabbed panel... It is not enough to have only tab-row class, because if you have nested tabbed panels (which have different styling) it is hard to style them as you want... And finally, you give the developer a freedom to do what he wants with this container... What do you think? Thank you! -- View this message in context: http://www.nabble.com/-Request-for-enhancement--TabbedPanel-tf3764064.html#a10641787 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/-Request-for-enhancement--TabbedPanel-tf3764064.html#a10642947 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -
Re: [Wicket-user] DropDownChoice with IModel and ChoiceRenderer
On Wed, 16 May 2007, Florian Hehlen wrote: (String id, IModel model, IModel choices, IChoicerenderer renderer) but I can't figure out what is the difference between the 2 IModel objects that have to be provided. If I provide twice a ref to the same object I One is the default choice, and the other is the select list. You do have wicket source in your IDE right? It should be more obvious from there. - Timo -- Timo Rantalaiho +358-45-6709709 Reaktor Innovations OyURL: http://www.ri.fi/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Partial page rendering with AjaxSubmitButton
From: [EMAIL PROTECTED] [mailto:wicket-user- [EMAIL PROTECTED] On Behalf Of Matej Knopp Sent: Wednesday, 16 May 2007 7:17 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Partial page rendering with AjaxSubmitButton 1. Yes, it should be invoked. I get the same and other errors with the AJAX Form Example on http://www.wicket-library.com/wicket-examples/ajax. Without entering Name or Email, clicking the submit via ajax button does not display error messages. However clicking the non-ajax submit button does display errors. Curiously, when I downloaded the examples (ver 1.2.6) and ran them locally it works correctly at first. However if I wait a few minutes, then the ajax submit stops working. The issue seems to be in the following code from DefaultRequestTargetResolverStrategy.java: Session session = Session.get(); PageMap pageMap = session.pageMapForName(requestParameters.getPageMapName(), false); if (pageMap == null) { // requested pagemap no longer exists - ignore this // request processRequest = false; } In the above code, the ajax submit fails to do anything when pageMap is returned as null. 2. form.replaceWith(anotherComponent); -Matej On 5/16/07, Mark van Leeuwen [EMAIL PROTECTED] wrote: I have a form on a page which I want to replace with another form when a Next button is pressed. I want to do this with AJAX. The form should only be replaced if there are no validation errors. Two questions: - the AjaxSubmitButton.onSubmit method is not being invoked when the button is clicked. Should I expect it to be? - assuming that it was invoked, how can can I replace the enclosing form with a new form? Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Wicket modal window
Hi , I have one lamer question. Is technologically possible to call wicket modal window from the server code? I want to use it for example for alert message that something goes wrong when server tries to update the database. Can Ajax do this? Thanks for answer. -- View this message in context: http://www.nabble.com/Wicket-modal-window-tf3765331.html#a10644257 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] autolink-problem with img and relative path
No Ideas? Tom Thomas Singer wrote: I have a WebPage pages.Index (mapping to /index.html) whose markup contains an img-tag with the relative path ../../../screenshots/foo.png (the 1st ../ to get out of the pages-package, the 2nd ../ to get out of the classes-directory, the third ../ to get out of the WEB-INF-directory). This has the advantage, that the path is already valid in my undeployed project. Unfortunately, the autolink resolver seems not able to convert it to a valid path: java.lang.IllegalArgumentException: Invalid path ../../../screenshots/foo.png at wicket.util.lang.Packages.absolutePath(Packages.java:109) at wicket.util.lang.Packages.absolutePath(Packages.java:46) at wicket.markup.html.PackageResource.exists(PackageResource.java:263) at wicket.markup.resolver.AutoLinkResolver$ResourceReferenceAutolink.init(AutoLinkResolver.java:547) at wicket.markup.resolver.AutoLinkResolver$AbstractAutolinkResolverDelegate.newPackageResourceReferenceAutoComponent(AutoLinkResolver.java:118) at wicket.markup.resolver.AutoLinkResolver$ResourceReferenceResolverDelegate.newAutoComponent(AutoLinkResolver.java:620) at wicket.markup.resolver.AutoLinkResolver.resolveAutomaticLink(AutoLinkResolver.java:832) at wicket.markup.resolver.AutoLinkResolver.resolve(AutoLinkResolver.java:763) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1361) ... I would have expected it to convert the path to /screenshots/foo.png. How can I work around this issue? Is it possible to plug in an own resolver implementation? If so, where can I find some documentation (beside digging the source code)? Tom - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] HttpServletRequest's attributes?
Does anyone know if Wicket exposes the HttpServletRequest's attributes somewhere? I can get them through ((WebRequest)getRequest()).getHttpServletRequest().getAttribute(myattr); But the javadoc says that it's not recommended to call getHttpServletRequest. Thanks, James. -- James Renfro Programmer IET Mediaworks, UC Davis [EMAIL PROTECTED] W: 530-754-5097 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Need to reload app in tomcat aftering adding a variant markup
The modification watcher should only test the last modifed time. I thought these issues have been fixed, haven't they? Juergen On 5/16/07, Igor Vaynberg [EMAIL PROTECTED] wrote: is the modification watcher what causes file handles to be left open? how do you expect that to be enabled in production? -igor On 5/16/07, Jean-Baptiste Quenot [EMAIL PROTECTED] wrote: * Juergen Donnerstag: This is true, but I understand Chris has a general need for markup reloading in production as well (though I haven't understood yet how Chris creates the markup files at runtime). Or did I misunderstand that? And though disabled in deployment mode by default, he could enable it for his specific application. Indeed, ModificationWatcher acting on previously not found files should be done only in development mode by default, and Chris will just have to enable it for his deployment. Cheers, -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Need to reload app in tomcat aftering adding a variant markup
This is true, but I understand Chris has a general need for markup reloading in production as well (though I haven't understood yet how Chris creates the markup files at runtime). Or did I misunderstand that? And though disabled in deployment mode by default, he could enable it for his specific application. Indeed, ModificationWatcher acting on previously not found files should be done only in development mode by default, and Chris will just have to enable it for his deployment. How do I do that? Will it slow things down? Maybe the option to add a method that allows explicit clearing of the cache would be very useful because then we it can be high performance most of the time and just rebuild the cache when we indicate there is a new markup file. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Partial page rendering with AjaxSubmitButton
But there must be a reason why pagemap is returned as null. Session expiration maybe? -Matej On 5/16/07, Mark van Leeuwen [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] [mailto:wicket-user- [EMAIL PROTECTED] On Behalf Of Matej Knopp Sent: Wednesday, 16 May 2007 7:17 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Partial page rendering with AjaxSubmitButton 1. Yes, it should be invoked. I get the same and other errors with the AJAX Form Example on http://www.wicket-library.com/wicket-examples/ajax. Without entering Name or Email, clicking the submit via ajax button does not display error messages. However clicking the non-ajax submit button does display errors. Curiously, when I downloaded the examples (ver 1.2.6) and ran them locally it works correctly at first. However if I wait a few minutes, then the ajax submit stops working. The issue seems to be in the following code from DefaultRequestTargetResolverStrategy.java: Session session = Session.get(); PageMap pageMap = session.pageMapForName(requestParameters.getPageMapName(), false); if (pageMap == null) { // requested pagemap no longer exists - ignore this // request processRequest = false; } In the above code, the ajax submit fails to do anything when pageMap is returned as null. 2. form.replaceWith(anotherComponent); -Matej On 5/16/07, Mark van Leeuwen [EMAIL PROTECTED] wrote: I have a form on a page which I want to replace with another form when a Next button is pressed. I want to do this with AJAX. The form should only be replaced if there are no validation errors. Two questions: - the AjaxSubmitButton.onSubmit method is not being invoked when the button is clicked. Should I expect it to be? - assuming that it was invoked, how can can I replace the enclosing form with a new form? Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Accessing a static resource in my webapp dir
Hello Matt, I'd suggest you put the CSS in the same package as your (base) page. Then you can do the following in the constructor: add(HeaderContributor.forCss(new CompressedResourceReference(MyPage.class, style.css))); Is it possible to use this method to add a .css that isn't in the classpath but at some fully specified URL eg., http://mycssserver.com/css/style.css? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Page Expiration when first clicking AJAX
So I've been debugging this pretty extensively now. I put a breakpoint in WicketServlet. 1. On the first request (http://blah.com/context), the session id in the URL and in the session all match and when I look at the cookie the jsessionid also matches. 2. On the last request, the session id is the same as in the first request. 3. When all requests are finished, the URL displays the original session id, BUT the cookie is showing some new session id. So somehow, the original cookie is being overwritten with a new cookie which includes a new jsessionid. Anyone have any thoughts on this? A new cookie should not be created when a redirect occurs, right? If the URL could change to the new session id this would also solve the problem. On 5/16/07, Andrew Berman [EMAIL PROTECTED] wrote: HomePage is the actual page itself. The mount is just what I mounted in the Application class using: mount(/app, PackageName.forClass (getHomePage())); On 5/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote: if your homepage is mounted to /app then the url should be /context/app. so where does HomePage come from? -igor On 5/15/07, Andrew Berman [EMAIL PROTECTED] wrote: It's mapped to /context/* and the HomePage class is mounted to /app, so the url for the homepage is http://blah.com/context/app/HomePage. Going directly to http://blah.com/context redirects to http://blah.com/context/app/HomePage On 5/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote: so wicket is mapped to /* but homepage is mounted to /app/homepage? -igor On 5/15/07, Andrew Berman [EMAIL PROTECTED] wrote: I'm not doing any redirect using index.html and a meta redirect. I just call blah.com/context and Wicket is doing the redirect to /app/homepage. /app is what I use for the mount point. On 5/15/07, Igor Vaynberg [EMAIL PROTECTED] wrote: i dont think that is it. jsessionid is only appended when there is a session. when you hit blah.com/context you are probably hitting index.html that does a metaredirect to blah.com/context/app/homepage. so on the first hit to blah.com/context there is no session. now when you hit /app/home a session is created, and cookie is set. -igor On 5/15/07, Andrew Berman [EMAIL PROTECTED] wrote: I'm going to debug it a bit more to see what's going on. The jsessionid is not appended to the URL until Wicket performs a redirect from the context to the actual home page (e.g. from http://blah.com/context redirects to http://blah.com/context/app/HomePage), so I'm wondering if the redirect is doing something that's causing Tomcat to think it's a new session, thereby making the jsessionid in the URL not equal the one in the cookie. Eelco, I'll take a look at what you're saying too and see if I can reconfigure Tomcat as well. On 5/15/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Also, sessions are managed by the app server, not by Wicket or Spring MVC. I had a problem a while ago losing sessions going from foo.mydomain.com to bar.mydomain.com, and that only worked well when I configured Jetty's session manager to use .mydomain.com as it's session domain. Maybe your problem is similar? Or even if it isn't, what I'm saying is that it is very unlikely Wicket or any other framework is the bad guy as Wicket just uses the servlet API as-is. Eelco On 5/15/07, Johan Compagner [EMAIL PROTECTED] wrote: can you look at the first request if the wicket session is really pushed to the http session (so is the http session created?) you can look at that in the set atribute of the session store On 5/15/07, Andrew Berman [EMAIL PROTECTED] wrote: I think I found the crux of the problem. When you first go to the app, as I've mentioned, it puts the jsessionid in the URL. Well, I compared that sessionid to the one in the cookie created and they are different! That has to be the reason it creates a new session. Now to figure out why it's doing that. On 5/14/07, Andrew Berman [EMAIL PROTECTED] wrote: Spring MVC does put the jsessionid in the URL. What I don't understand is that when coming into the Wicket app for the first time, it goes to the home page fine with the jsessionid in the URL, and then I click any link and all session attributes are gone. Literally a brand new session is created no matter what link I click. However, once I click that next link, all is fine and that second new session is the one that is
Re: [Wicket-user] Modifying GridView elements
persistence is done via formcomponents, just add those into the gridview. -igor On 5/16/07, NeilRedding [EMAIL PROTECTED] wrote: Hi, I'm new to Wicket, so pardon me if this is a newbie question; I haven't found any posts addressing the issue though. I'm reviewing the various repeater-based classes in wicket.extensions, and while I like several of them I don't see any existing pattern(s) for saving user-modified values presented in grid cells. I'm particularly interested in the IDataProvider-based classes; I like this mechanism for getting data into the grid, and want to have a parallel mechanism for persisting data back into the model. Any guidance? Thanks, Neil -- View this message in context: http://www.nabble.com/Modifying-GridView-elements-tf3767974.html#a10652338 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket modal window
yes, ajax can do this. submit the form using ajax, and if something goes wrong in response you can open a modal window with the error in it. see modal window examples in wicket-examples. -igor On 5/16/07, kubino [EMAIL PROTECTED] wrote: Hi , I have one lamer question. Is technologically possible to call wicket modal window from the server code? I want to use it for example for alert message that something goes wrong when server tries to update the database. Can Ajax do this? Thanks for answer. -- View this message in context: http://www.nabble.com/Wicket-modal-window-tf3765331.html#a10644257 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] TabbedPanel - select which tab to show when page loads
hehe just keep answering myself.. so, as I see it, in order to have the username passed from LoginPage to the first tab/panel of my BasePage tabbedPanel, I need to pass it as an argument to the constructor of the page, right? because..the tabs are constructed when the page is called and so, if I used a setter method on a BasePage object, that value wouldn't be available on tab creation time..is this correct? It seems that way - at least, I think it does. so..can I say that setters should be used when we need to create content for simple components - as Labels - and that argument-passing should be used when creating more complex components like TabbedPanel and AbstractTab (which don't have all the values available during creation time) ?? does this make sense? ;) Edd -- View this message in context: http://www.nabble.com/TabbedPanel---select-which-tab-to-show-when-page-loads-tf3765927.html#a10656011 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] TabbedPanel - select which tab to show when page loads
yes, it makes sense. and furthermore sometimes you should be passing models for more dynamic arguments. in your case doing something like this basepage { private long userid; //setter+getter. basepage() { add(new userpanel(userpanel, new propertymodel(this, userid)); that way the userpanel can always pull out the userid by using the passedin model. -igor On 5/16/07, eddmosphere [EMAIL PROTECTED] wrote: hehe just keep answering myself.. so, as I see it, in order to have the username passed from LoginPage to the first tab/panel of my BasePage tabbedPanel, I need to pass it as an argument to the constructor of the page, right? because..the tabs are constructed when the page is called and so, if I used a setter method on a BasePage object, that value wouldn't be available on tab creation time..is this correct? It seems that way - at least, I think it does. so..can I say that setters should be used when we need to create content for simple components - as Labels - and that argument-passing should be used when creating more complex components like TabbedPanel and AbstractTab (which don't have all the values available during creation time) ?? does this make sense? ;) Edd -- View this message in context: http://www.nabble.com/TabbedPanel---select-which-tab-to-show-when-page-loads-tf3765927.html#a10656011 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Partial page rendering with AjaxSubmitButton
As you can probably gather I am new to Wicket. If session expiry is the cause of the problem, shouldn't that somehow be communicated back to the user? How can I detect session expiry with an AJAX submit and then handle it appropriately? The problem with the AJAX Form Example run from www.wicket-library.com is different. The AJAX submit button never works - at least for me. Can someone else please verify that? Mark -Original Message- From: [EMAIL PROTECTED] [mailto:wicket-user- [EMAIL PROTECTED] On Behalf Of Matej Knopp Sent: Thursday, 17 May 2007 7:49 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Partial page rendering with AjaxSubmitButton But there must be a reason why pagemap is returned as null. Session expiration maybe? -Matej On 5/16/07, Mark van Leeuwen [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] [mailto:wicket-user- [EMAIL PROTECTED] On Behalf Of Matej Knopp Sent: Wednesday, 16 May 2007 7:17 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Partial page rendering with AjaxSubmitButton 1. Yes, it should be invoked. I get the same and other errors with the AJAX Form Example on http://www.wicket-library.com/wicket-examples/ajax. Without entering Name or Email, clicking the submit via ajax button does not display error messages. However clicking the non-ajax submit button does display errors. Curiously, when I downloaded the examples (ver 1.2.6) and ran them locally it works correctly at first. However if I wait a few minutes, then the ajax submit stops working. The issue seems to be in the following code from DefaultRequestTargetResolverStrategy.java: Session session = Session.get(); PageMap pageMap = session.pageMapForName(requestParameters.getPageMapName(), false); if (pageMap == null) { // requested pagemap no longer exists - ignore this // request processRequest = false; } In the above code, the ajax submit fails to do anything when pageMap is returned as null. 2. form.replaceWith(anotherComponent); -Matej On 5/16/07, Mark van Leeuwen [EMAIL PROTECTED] wrote: I have a form on a page which I want to replace with another form when a Next button is pressed. I want to do this with AJAX. The form should only be replaced if there are no validation errors. Two questions: - the AjaxSubmitButton.onSubmit method is not being invoked when the button is clicked. Should I expect it to be? - assuming that it was invoked, how can can I replace the enclosing form with a new form? Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Partial page rendering with AjaxSubmitButton
On 5/16/07, Mark van Leeuwen [EMAIL PROTECTED] wrote: As you can probably gather I am new to Wicket. If session expiry is the cause of the problem, shouldn't that somehow be communicated back to the user? How can I detect session expiry with an AJAX submit and then handle it appropriately? we have this fixed in 1.3. if ajax hits an expired page error it will show the page expired page, just like a regular request. -igor - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] AjaxSubmitButton IE vs. FF Behavior
Using Wicket 1.2.6 Using FF 2.0 when I click on the submit button or hit 'enter' on a field in the form the ajax call is processed. With IE 7.0 when I click on the submit button, the ajax class is processed, BUT when I hit 'enter' the form submits normally. Any idea what I can do to keep the same behavior all around and make IE 7 'enter' behave the same as the click? Thanks - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] TabbedPanel - select which tab to show when page loads
Thanksss! :D gonna try that! Edd yes, it makes sense. and furthermore sometimes you should be passing models for more dynamic arguments. in your case doing something like this basepage { private long userid; //setter+getter. basepage() { add(new userpanel(userpanel, new propertymodel(this, userid)); that way the userpanel can always pull out the userid by using the passedin model. -igor -- View this message in context: http://www.nabble.com/TabbedPanel---select-which-tab-to-show-when-page-loads-tf3765927.html#a10656526 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] WicketTester Sessions (1.3.0-incubating-beta1)
Did a JIRA bug get created for this? I'm having the same issue and want to document in my code the JIRA issue number. If a bug hasn't been created then I'd be happy to create it myself. Thanks Craig severian wrote: I've been having trouble using sessions with WicketTester, even after looking over the old messages on this list. I've been trying to implement something like the example in Gurumurthy's Pro Wicket book, where a Login page places a User object in the session, and other pages subsequently have access to the cached User object. When trying to unit test one of the subsequent pages in isolation (i.e. without first going through the Login page), I figured I just had to place a User object in the test instance of my session class, like this: -- WicketTester tester = new WicketTester(myApp, myPath); MySession mySession = (MySession) tester.getWicketSession(); mySession.setCurrentUser(getCurrentUser()); tester.startPage(MyPage.class); -- Unfortunately, this didn't work. The WicketTester constructor correctly creates an instance of MySession, but never binds it to the session store. Consequently, the later call to tester.startPage() creates a new instance of MySession, which obviously contains no User object, causing my tests to fail. As a workaround, I forced the bind() call myself, after the WicketTester constructor: -- WicketTester tester = new WicketTester(myApp, myPath); tester.getApplication().getSessionStore().bind(tester.getWicketRequest(), tester.getWicketSession()); MySession mySession = (MySession) tester.getWicketSession(); mySession.setCurrentUser(getCurrentUser()); tester.startPage(MyPage.class); -- This allows my tests to succeed. However, I'm suspicious that either I'm missing something subtle, or there's a bug in the wicket test framework. For example, should MockWebApplication.createRequestCycle() force a bind after setting up its session via: this.wicketSession = (WebSession) Session.findOrCreate(); It seems to me that it should, but I'm a Wicket newbie... -- View this message in context: http://www.nabble.com/WicketTester---Sessions-%281.3.0-incubating-beta1%29-tf3759412.html#a10656736 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Add feedback message to internal error page.
In my application I'm overriding the default internal error page to my application's login page, however, I want to supply the user with a feedback panel message starting that something bad happened and include an error code from my internal runtime exception. What would be the proper way to go about this? I was thinking about extending my login page but want to keep the same markup(.html), but I don't think that is possible. I'm also looking into the various things you can do with overriding or implementing IExceptionResponseStrategy but in the end I don't really want to get rid of 90% of that default logic. Thanks Craig -- View this message in context: http://www.nabble.com/Add-feedback-message-to-internal-error-page.-tf3769482.html#a10657238 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user