Can WICKET-2150 please be fixed in 1.5-SNAPSHOT
Hi guys, Can someone of the committers please implement the fix to Wicket-2150 in the trunk. It was postponed from 1.4 to 1.5 and I really need this, but it is not yet in the 1.5 codebase (as far as I can see). The code that needs to be changed is the delegateSubmit-method in the Form and it should read something like this: protected void delegateSubmit(IFormSubmittingComponent submittingComponent) { /* WICKET-2150: execute the onSubmit's from most general to most specific */ // when the given submitting component is not null, it means that it was the // submitting component Form? formToProcess = this; if (submittingComponent != null) { // use the form which the submittingComponent has submitted for further processing formToProcess = submittingComponent.getForm(); } // Model was successfully updated with valid data formToProcess.onSubmit(); // call onSubmit on nested forms formToProcess.visitChildren(Form.class, new IVisitorForm?() { public Object component(Form? component) { Form? form = component; if (form.isEnabledInHierarchy() form.isVisibleInHierarchy()) { form.onSubmit(); return IVisitor.CONTINUE_TRAVERSAL; } return IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER; } }); // most specific if (submittingComponent != null) { submittingComponent.onSubmit(); } } Thanks very much, Dave - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Can WICKET-2150 please be fixed in 1.5-SNAPSHOT
How the fix in 1.5-SNAPSHOT will help you ? Currently 1.5-SNAPSHOT is not even buildable (at least the tests), so it is not quite ready for use. On Fri, 2010-01-15 at 09:07 +0100, Dave Schoorl wrote: Hi guys, Can someone of the committers please implement the fix to Wicket-2150 in the trunk. It was postponed from 1.4 to 1.5 and I really need this, but it is not yet in the 1.5 codebase (as far as I can see). The code that needs to be changed is the delegateSubmit-method in the Form and it should read something like this: protected void delegateSubmit(IFormSubmittingComponent submittingComponent) { /* WICKET-2150: execute the onSubmit's from most general to most specific */ // when the given submitting component is not null, it means that it was the // submitting component Form? formToProcess = this; if (submittingComponent != null) { // use the form which the submittingComponent has submitted for further processing formToProcess = submittingComponent.getForm(); } // Model was successfully updated with valid data formToProcess.onSubmit(); // call onSubmit on nested forms formToProcess.visitChildren(Form.class, new IVisitorForm?() { public Object component(Form? component) { Form? form = component; if (form.isEnabledInHierarchy() form.isVisibleInHierarchy()) { form.onSubmit(); return IVisitor.CONTINUE_TRAVERSAL; } return IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER; } }); // most specific if (submittingComponent != null) { submittingComponent.onSubmit(); } } Thanks very much, Dave - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Can WICKET-2150 please be fixed in 1.5-SNAPSHOT
I don't know about the tests, but in the snapshot repository there are 1.5-SNAPSHOT binaries. My application is not yet in production, so I (think I) can manage the rough edges of working with a development release. On top of that, I want to make sure it is in 1.5. What would be a reason not to put it in the trunk yet? Martin Grigorov wrote: How the fix in 1.5-SNAPSHOT will help you ? Currently 1.5-SNAPSHOT is not even buildable (at least the tests), so it is not quite ready for use. On Fri, 2010-01-15 at 09:07 +0100, Dave Schoorl wrote: Hi guys, Can someone of the committers please implement the fix to Wicket-2150 in the trunk. It was postponed from 1.4 to 1.5 and I really need this, but it is not yet in the 1.5 codebase (as far as I can see). The code that needs to be changed is the delegateSubmit-method in the Form and it should read something like this: protected void delegateSubmit(IFormSubmittingComponent submittingComponent) { /* WICKET-2150: execute the onSubmit's from most general to most specific */ // when the given submitting component is not null, it means that it was the // submitting component Form? formToProcess = this; if (submittingComponent != null) { // use the form which the submittingComponent has submitted for further processing formToProcess = submittingComponent.getForm(); } // Model was successfully updated with valid data formToProcess.onSubmit(); // call onSubmit on nested forms formToProcess.visitChildren(Form.class, new IVisitorForm?() { public Object component(Form? component) { Form? form = component; if (form.isEnabledInHierarchy() form.isVisibleInHierarchy()) { form.onSubmit(); return IVisitor.CONTINUE_TRAVERSAL; } return IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER; } }); // most specific if (submittingComponent != null) { submittingComponent.onSubmit(); } } Thanks very much, Dave - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicketstuff push, publishing event in a page2 and component installed with channel listener in page1
Sorry ,a little late .. push is a great project,thanks for your efforts. i am a little confused, 1)does the time out only happens after a remove event is published or apart from this, there is another timeout which happens when server is finished pushing into the client? 2)i see some problems when using more than one listener on one component, i tried reproducing the problem by a little tinkering in your example , currently the example in the quickstart i am attaching has two listeners on different components ,you can reproduce the problem by adding listeners to the same component. a event in one channel is caught by channel listener meant for another channel. thanks again .. On Sat, Dec 26, 2009 at 11:15 PM, Rodolfo Hansen kry...@gmail.com wrote: Regarding remove listeners: Most browsers fail to report the remove event. Only firefox reports removal immediately, all other browsers depend on the timeout for a comet reconnect to notice and fire the remove event; you may need to lower the timeout for the cometd connections. Also,can i install more than one channel listener on a component? Never tried it, but there should be no problem, can you write a quickstart with your use cases, so I can flesh any bugs out? On Thu, Dec 24, 2009 at 10:03 AM, vineet semwal vineetsemwal1...@gmail.comwrote: Hellos, recently i started using wicketstuff push ,i have few doubts as following .. i have a situation where i need to publish a event in page 2 and add the channel listener in page 1 . for eg. a sign out event published in page 2 which i do using a remove listener. Also,can i install more than one channel listener on a component? -- regards, Vineet Semwal -- Rodolfo Hansen CTO, KindleIT Software Development Email: rhan...@kindleit.net Mobile: +1 (809) 860-6669 -- regards, Vineet Semwal quickcomet.jar Description: application/java-archive - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Questions about Wicket sessions
Sorry for jumping into this issue again, but I am still a bit confused. I need a definitive answer for this as I have to document it in my diploma thesis. In my app I have a requirement that a new page has to be opened in a popup window, which is pretty easy with wicket using the popupsettings object and bookmarkable pages. I made a tiny test app and implemented this scenario but have problems to access the former user session from the newly opened page. It seems that a new session is generated. So I am using the same browser but a new window/instance of it. So is there a way to access the wicket session where this window was opened from? Considering the above answers I think there is no way, right? If I am right this problem is not a problem of wicket (architecture) but of (modern) browsers implementing it this way, right? Regards, richard Erik van Oosten wrote: Igor Vaynberg wrote: 2. If I start IE or FF in another window, visitor activities on the same Wicket app are considered in the same or different session? always a different sessions, browsers do not share sessions. I think it depends on what David meant by 'another window'. I assumed it to be the 'open in new window' function. Then you still have the same browser, but another window. Regards. Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/jboss-5%2C-jdk-1.6%2C-and-wicket-1.3-disk-space-problem-tp24633011p27173781.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get a cell work as a link in AjaxFallbackDefaultDataTable
Nino, When I add the link to a Panel (see below) and run the application, I get an erro: org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'org.apache.wicket.markup.html.panel.Panel' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried.: [MarkupContainer [Component id = cell]] at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:227) at columns.add(new PropertyColumnComestibleDto(new ModelString(Name), name, name) { @Override public void populateItem(ItemICellPopulatorComestibleDto item, String componentId, IModelComestibleDto rowModel) { AjaxFallbackLinkComestibleDto link = new AjaxFallbackLinkComestibleDto(componentId, rowModel) { @Override public void onClick(AjaxRequestTarget target) { setResponsePage(new ComestiblePage(getModel())); } }; Panel panel = new Panel(componentId, rowModel); panel.add(link); item.add(panel); } }); Regards, Johan. 2010/1/14 nino martinez wael nino.martinez.w...@gmail.com You still create the panel and add that to the AjaxFallbackDefaultDataTable . ListPromoType subscriptions = Arrays.asList(PromoType.values()); selectionsList.setObject(subscriptions); ListAbstractColumn columns = new ArrayListAbstractColumn(); columns.add(new PropertyColumn(new Model(id), id)); columns.add(new PropertyColumn(new Model(alias), alias)); columns .add(new PropertyColumn(new Model(logins), logins)); columns.add(new PropertyColumn(new Model(email), email)); columns.add(new AbstractColumn(new Model(userType)) { public void populateItem(Item cellItem, String componentId, IModel model) { Person person = (Person) model.getObject(); cellItem.add(new DropDownPanel(componentId, new PropertyModel( person, userType), Arrays.asList(UserType.values(; } }); ajaxTable = new AjaxFallbackDefaultDataTable( ajaxTable, columns, new SortablePersonDataProvider(), 5); addMenu(ajaxTable); 2010/1/14 Johan Vogelzang johan.vogelz...@gmail.com: Thanks Ernesto, but i don't get it ... The only markup the AjaxFallbackDefaultDataTable needs is: .. table class=horizontal wicket:id=table[table]/table .. So I don't know how to apply your solution. Regards, Johan. 2010/1/14 Ernesto Reinaldo Barreiro reier...@gmail.com You could create a panel containing the link and the label and add that panel as the cell e.g. something like html xmlns:wicket=org.apache.wicket body wicket:panel a wicket:id=link title= class=button span wicket:id=text[text goes here]/span /a /wicket:panel /body /html Regards, Ernesto On Thu, Jan 14, 2010 at 2:38 PM, Johan Vogelzang johan.vogelz...@gmail.comwrote: Hi all, I am trying out the AjaxFallbackDefaultDataTable, but have trouble when I want to make a cell work as a link. With the code below the table displays the word [cell] in all the cells of the first column (Name). When I click on the cell, the correct response page is opened. I tried to add a Label to the link but that results into a Wicket error. I red some posts about this issue, but I did not managed to find the correct solution. Who can help me? Regards, Johan. public class ComestiblesDataTablePage extends RBSTemplate { @SpringBean(name = breakfastService) private BreakfastLocalService service; private Integer maxItemsPerPage = 8; @SuppressWarnings(serial) public ComestiblesDataTablePage() { ListIColumnComestibleDto columns = new ArrayListIColumnComestibleDto(); columns.add(new PropertyColumnComestibleDto(new ModelString(Name), name, name) { @Override public void populateItem(ItemICellPopulatorComestibleDto item, String componentId, IModelComestibleDto rowModel) { AjaxFallbackLinkComestibleDto link = new AjaxFallbackLinkComestibleDto(componentId, rowModel) { @Override public void onClick(AjaxRequestTarget target) { setResponsePage(new ComestiblePage(getModel())); } }; // link.add(new
Re: How to get a cell work as a link in AjaxFallbackDefaultDataTable
Johan, The Markup is defined by the panel. Just copy the first class a sent you and the HTML snippet html xmlns:wicket=org.apache. wicket body wicket:panel a wicket:id=link title=Title class=button span wicket:id=text[text goes here]/span /a /wicket:panel /body /html into a file MyLinkPanel.html )on the same package as MyLinkPanel.java and then modify your AjaxFallbackDefaultDataTable code as columns.add(new PropertyColumnComestibleDto( new ModelString(Name), name, name) { @Override public void populateItem(ItemICellPopulatorComestibleDto item, String componentId, IModelComestibleDto rowModel) { MyLinkPanelComestibleDto link = new MyLinkPanelComestibleDto( componentId, rowModel, new ModelString(Click Me), new ModelString(Click Me)) { @Override public void onClick(AjaxRequestTarget target) { setResponsePage(new ComestiblePage(getModel())); } }; item.add(link); } }); I haven´t tried this code (I just hacked it for your use case) but it should work: and if not you could get to work with minor twicks. In fact the the Markup of AjaxFallbackDefaultDataTable is not table class=horizontal wicket:id=table[table]/table But wicket:panel thead wicket:id=topToolbars wicket:container wicket:id=toolbar/wicket: container /thead tfoot wicket:id=bottomToolbars wicket:container wicket:id=toolbar/wicket:container /tfoot tbody tr wicket:id=rows td wicket:id=cells span wicket:id=cell[cell]/span /td /tr /tbody /wicket:panel See class DataTable from which AjaxFallbackDefaultDataTable inherits. This is the way panels works in Wicket. The table class=horizontal wicket:id=table[table]/table Is expended with the code generated by the above panel. And the code for MyLinkPanel replaces the span wicket:id=cell[cell]/span above. It is just the way Wicket works. So, you can replace this with any panel (e.g. a panel containing an image, another table with details, a link going to another page, or whatever you want to place in there. Best, On Fri, Jan 15, 2010 at 11:47 AM, Johan Vogelzang johan.vogelz...@gmail.com wrote: Btw, I am using Wicket 1.4.1. Johan 2010/1/14 Johan Vogelzang johan.vogelz...@gmail.com Hi all, I am trying out the AjaxFallbackDefaultDataTable, but have trouble when I want to make a cell work as a link. With the code below the table displays the word [cell] in all the cells of the first column (Name). When I click on the cell, the correct response page is opened. I tried to add a Label to the link but that results into a Wicket error. I red some posts about this issue, but I did not managed to find the correct solution. Who can help me? Regards, Johan. public class ComestiblesDataTablePage extends RBSTemplate { @SpringBean(name = breakfastService) private BreakfastLocalService service; private Integer maxItemsPerPage = 8; @SuppressWarnings(serial) public ComestiblesDataTablePage() { ListIColumnComestibleDto columns = new ArrayListIColumnComestibleDto(); columns.add(new PropertyColumnComestibleDto(new ModelString(Name), name, name) { @Override public void populateItem(ItemICellPopulatorComestibleDto item, String componentId, IModelComestibleDto rowModel) { AjaxFallbackLinkComestibleDto link = new AjaxFallbackLinkComestibleDto(componentId, rowModel) { @Override public void onClick(AjaxRequestTarget target) { setResponsePage(new ComestiblePage(getModel())); } }; // link.add(new Label(componentId)); -- Error: component not markup, Component id = cell item.add(link); } }); columns.add(new PropertyColumnComestibleDto(new ModelString(Minimal Quantity), minimalQuantity, minimalQuantity)); columns.add(new PropertyColumnComestibleDto(new ModelString(Price), price, price)); columns.add(new PropertyColumnComestibleDto(new ModelString(TransportForm), transportForm)); add(new AjaxFallbackDefaultDataTableComestibleDto(table, columns, new ComestibleSortableDataProvider( service), maxItemsPerPage)); add(new BookmarkablePageLinkObject(edit, ComestiblesEditPage.class)); } @Override public String getPageTitle() { return getLocalizer().getString(lbl.comestibles, this); } } -- Johan Vogelzang
Re: LegUp updated for latest version of Wicket, and other frameworks
Looks good, sure will save time of new explorers. Are you going to add more archetypes in future (what's next)? I saw hibernate there, maybe ibatis or cayenne would be fine, although they are not that hard to figure out. I will try the wicket-guice myself. Good luck, Marek On 01/15/2010 05:34 AM, Jeremy Thomerson wrote: This looks really great guys! I just created a project with it and looked through it and it will be a great leg up for anyone needing to start a project and needing help wiring all the pieces together. Thanks!! -- Jeremy Thomerson http://www.wickettraining.com On Thu, Jan 14, 2010 at 11:03 AM, Richard Wilkinson richardjohnwilkin...@googlemail.com wrote: We have updated LegUp [1] so you can now create projects using the latest (compatible) versions of Wicket, Spring, Guice, JPA (1.0), Warp, Hibernate... LegUp is a collection of Maven archetypes to help you get quickly and easily started with your enterprise projects. Wicket 1.4.5, Guice 2.0 Wicket 1.4.5, Spring 3.0.0, JPA 1.0 Wicket 1.4.5, Guice 1.0, WarpPersist 1.0, Hibernate 3.2 Wicket 1.4.5, Guice 1.0, WarpPersist 1.0, JPA 1.0 Spring 3.0.0, JPA 1.0 Spring 3.0.0, JDBC The source is available on the LegUp Google code project [2]. Drop us a line at [3] if you have any ideas for or would like to contribute new archetypes. -- Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com [1] http://www.jweekend.com/dev/LegUp [2] http://code.google.com/p/legup/ [3] http://www.jweekend.com/dev/ContactUs - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
urlFor works, but combined with mountBookmarkablePage it doesn't
Hi all, I have the following code which generates a URL to a page with some parameters: String url = urlFor(MyMessageView.class, new PageParameters(thread= + ad9697d2-8328-43b4-be28-ee677a88bc9a)).toString(); This generates a URL like so: ?wicket:bookmarkablePage=:org.mypackage.pages.MyMessageViewthread=ad9697d2-8328-43b4-be28-ee677a88bc9a which works, it takes me to the right page and everything is constructed correctly. However, if I then mount that page as a bookmarkable page: mountBookmarkablePage(/messages, MyMessageView.class); then the URL created by the same urlFor method above is: /messages/thread/ad9697d2-8328-43b4-be28-ee677a88bc9a and this does not work. Any ideas? thanks, Steve smime.p7s Description: S/MIME cryptographic signature
Re: urlFor works, but combined with mountBookmarkablePage it doesn't
On Fri, 2010-01-15 at 22:29 +1100, Steve Swinsburg wrote: Hi all, I have the following code which generates a URL to a page with some parameters: String url = urlFor(MyMessageView.class, new PageParameters(thread= + ad9697d2-8328-43b4-be28-ee677a88bc9a)).toString(); This generates a URL like so: ?wicket:bookmarkablePage=:org.mypackage.pages.MyMessageViewthread=ad9697d2-8328-43b4-be28-ee677a88bc9a which works, it takes me to the right page and everything is constructed correctly. However, if I then mount that page as a bookmarkable page: mountBookmarkablePage(/messages, MyMessageView.class); then the URL created by the same urlFor method above is: /messages/thread/ad9697d2-8328-43b4-be28-ee677a88bc9a Looking it I would say it should work but I am not that familiar with it. Try with mount(new SomeUrlCodingStrategy(/messages, MyMessageView.class)) e.g. IndexedParamUrlCodingStrategy, IndexedHybridUrlCodingStrategy, ... and this does not work. Any ideas? thanks, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: LegUp updated for latest version of Wicket, and other frameworks
This is great ! 2010/1/15 Cemal Bayramoglu jweekend_for...@cabouge.com Marek, Jeremy, Thanks. Yes, we do plan to gradually add more configurations. We have already had offers to contribute Wicket/Scala templates and a few others we will consider. Wicket/WiQuery will be popular too, once we've got WiQuery itself onto a public Maven repo. All suggestions/ideas for new project configurations/framework combination are welcome. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com 2010/1/15 Marek Šabo ms...@buk.cvut.cz: Looks good, sure will save time of new explorers. Are you going to add more archetypes in future (what's next)? I saw hibernate there, maybe ibatis or cayenne would be fine, although they are not that hard to figure out. I will try the wicket-guice myself. Good luck, Marek On 01/15/2010 05:34 AM, Jeremy Thomerson wrote: This looks really great guys! I just created a project with it and looked through it and it will be a great leg up for anyone needing to start a project and needing help wiring all the pieces together. Thanks!! -- Jeremy Thomerson http://www.wickettraining.com On Thu, Jan 14, 2010 at 11:03 AM, Richard Wilkinson richardjohnwilkin...@googlemail.com wrote: We have updated LegUp [1] so you can now create projects using the latest (compatible) versions of Wicket, Spring, Guice, JPA (1.0), Warp, Hibernate... LegUp is a collection of Maven archetypes to help you get quickly and easily started with your enterprise projects. Wicket 1.4.5, Guice 2.0 Wicket 1.4.5, Spring 3.0.0, JPA 1.0 Wicket 1.4.5, Guice 1.0, WarpPersist 1.0, Hibernate 3.2 Wicket 1.4.5, Guice 1.0, WarpPersist 1.0, JPA 1.0 Spring 3.0.0, JPA 1.0 Spring 3.0.0, JDBC The source is available on the LegUp Google code project [2]. Drop us a line at [3] if you have any ideas for or would like to contribute new archetypes. -- Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com [1] http://www.jweekend.com/dev/LegUp [2] http://code.google.com/p/legup/ [3] http://www.jweekend.com/dev/ContactUs - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.
Disabled Navigation if Action.ENABLE is restricted for page
Hi all, i have a litte problem. I have implemented an own AuthorizationStrategy where I check I a user is allowed to render/enable a component/page. Each page has a navigation. If I restrict enable for a page, then the navigation gets also disabled. I tried overwriting isEnabled() for the whole navigation and its childs, but doesn't work. So the main question is how to have a component on a page always be enabled even if the page is disabled? Greets chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Disabled Navigation if Action.ENABLE is restricted for page
Why you're disabling whole page in first place? 2010/1/15 Giambalvo, Christian christian.giamba...@excelsisnet.com: Hi all, i have a litte problem. I have implemented an own AuthorizationStrategy where I check I a user is allowed to render/enable a component/page. Each page has a navigation. If I restrict enable for a page, then the navigation gets also disabled. I tried overwriting isEnabled() for the whole navigation and its childs, but doesn't work. So the main question is how to have a component on a page always be enabled even if the page is disabled? Greets chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Disabled Navigation if Action.ENABLE is restricted for page
Well, i have implemented a different authorization model and don't use the annotation based. All restrictions are written in one onfig file to have them all in place. I there is a viewonly user I don't want to disable each panel/textfield ... one by one, so that’s why I disable the whole page. -Ursprüngliche Nachricht- Von: Marat Radchenko [mailto:slonopotamusor...@gmail.com] Gesendet: Freitag, 15. Januar 2010 15:20 An: users@wicket.apache.org Betreff: Re: Disabled Navigation if Action.ENABLE is restricted for page Why you're disabling whole page in first place? 2010/1/15 Giambalvo, Christian christian.giamba...@excelsisnet.com: Hi all, i have a litte problem. I have implemented an own AuthorizationStrategy where I check I a user is allowed to render/enable a component/page. Each page has a navigation. If I restrict enable for a page, then the navigation gets also disabled. I tried overwriting isEnabled() for the whole navigation and its childs, but doesn't work. So the main question is how to have a component on a page always be enabled even if the page is disabled? Greets chris - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Templates in Wicket
Hi everyone, I would like to know if someone can share their experience with graphical templates under wicket. It's easy to provide markup code for designers, they just need to preserve hierarchy of wicket elements, right? But how do you cope with things like attribute modifier inside application and dynamic loading of other css files? Or what is the most common approach to this kind of thing? Regards, Marek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Templates in Wicket
so you are giving designers markup from a wicket app? why not just let them run the app, that way they can go in and do things themselves? in my company out developers checkout the code and run mvn jetty to get the app up and running with markup reloading, then they go in with textmate or coda and tweak the markup. -igor On Fri, Jan 15, 2010 at 8:00 AM, Marek Šabo ms...@buk.cvut.cz wrote: Hi everyone, I would like to know if someone can share their experience with graphical templates under wicket. It's easy to provide markup code for designers, they just need to preserve hierarchy of wicket elements, right? But how do you cope with things like attribute modifier inside application and dynamic loading of other css files? Or what is the most common approach to this kind of thing? Regards, Marek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Templates in Wicket
That's what we are doing as well. The big gotcha is when you end up doing something in code, it throws them off. I.E. SimpleAttributeModifier, D/ On Jan 15, 2010, at 10:14 AM, Jonathan Locke wrote: we did almost exactly the same thing at thoof. although occasionally you'll get a designer stuck on a build problem or something, it works really well. definitely the best approach in my mind. igor.vaynberg wrote: so you are giving designers markup from a wicket app? why not just let them run the app, that way they can go in and do things themselves? in my company out developers checkout the code and run mvn jetty to get the app up and running with markup reloading, then they go in with textmate or coda and tweak the markup. -igor On Fri, Jan 15, 2010 at 8:00 AM, Marek Šabo ms...@buk.cvut.cz wrote: Hi everyone, I would like to know if someone can share their experience with graphical templates under wicket. It's easy to provide markup code for designers, they just need to preserve hierarchy of wicket elements, right? But how do you cope with things like attribute modifier inside application and dynamic loading of other css files? Or what is the most common approach to this kind of thing? Regards, Marek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Templates-in-Wicket-tp27179274p27179469.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Templates in Wicket
thats what html comments are for. -igor On Fri, Jan 15, 2010 at 9:55 AM, Douglas Ferguson doug...@douglasferguson.us wrote: That's what we are doing as well. The big gotcha is when you end up doing something in code, it throws them off. I.E. SimpleAttributeModifier, D/ On Jan 15, 2010, at 10:14 AM, Jonathan Locke wrote: we did almost exactly the same thing at thoof. although occasionally you'll get a designer stuck on a build problem or something, it works really well. definitely the best approach in my mind. igor.vaynberg wrote: so you are giving designers markup from a wicket app? why not just let them run the app, that way they can go in and do things themselves? in my company out developers checkout the code and run mvn jetty to get the app up and running with markup reloading, then they go in with textmate or coda and tweak the markup. -igor On Fri, Jan 15, 2010 at 8:00 AM, Marek Šabo ms...@buk.cvut.cz wrote: Hi everyone, I would like to know if someone can share their experience with graphical templates under wicket. It's easy to provide markup code for designers, they just need to preserve hierarchy of wicket elements, right? But how do you cope with things like attribute modifier inside application and dynamic loading of other css files? Or what is the most common approach to this kind of thing? Regards, Marek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Templates-in-Wicket-tp27179274p27179469.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Templates in Wicket
Yep, thank you all for sharing your insights, anyway, most of the time I work with single ui projects. I was just curious how you guys do it so I would have PreparedStatement for pointy haired bosses :) On 01/15/2010 06:55 PM, Douglas Ferguson wrote: That's what we are doing as well. The big gotcha is when you end up doing something in code, it throws them off. I.E. SimpleAttributeModifier, D/ On Jan 15, 2010, at 10:14 AM, Jonathan Locke wrote: we did almost exactly the same thing at thoof. although occasionally you'll get a designer stuck on a build problem or something, it works really well. definitely the best approach in my mind. igor.vaynberg wrote: so you are giving designers markup from a wicket app? why not just let them run the app, that way they can go in and do things themselves? in my company out developers checkout the code and run mvn jetty to get the app up and running with markup reloading, then they go in with textmate or coda and tweak the markup. -igor On Fri, Jan 15, 2010 at 8:00 AM, Marek Šabo ms...@buk.cvut.cz wrote: Hi everyone, I would like to know if someone can share their experience with graphical templates under wicket. It's easy to provide markup code for designers, they just need to preserve hierarchy of wicket elements, right? But how do you cope with things like attribute modifier inside application and dynamic loading of other css files? Or what is the most common approach to this kind of thing? Regards, Marek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Templates-in-Wicket-tp27179274p27179469.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Marek Šabo Server Manager Club SU CVUT Buben Bubenečská Kolej (421) XMPP: zeratul...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Strange Error - Forms inside Fragments inside Nested Repeaters
looks like a bug. open a ticket in jira. attach a quickstart if you can. -igor On Fri, Jan 15, 2010 at 10:29 AM, Tony Wu e90t...@gmail.com wrote: Not sure if this is a bug or something I overlooked, but I get a strange cast exception (org.apache.wicket.markup.RawMarkup cannot be cast to org.apache.wicket.markup.ComponentTag) when I have create a Form in a Fragment, which is inside a ListView, inside another ListView. Here's the exception: http://pastebin.com/d235de7b4 Here's the fragment markup, fragment Java code, and exception name: http://pastebin.com/d3ba85ea0 Very simple.. if I move the Form outside of the fragment into the ListView, then all is well. Thoughts? Thanks, Tony - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Finding output from WicketTester
A while back I added basic WicketTester rendering tests for each of my pages. They have been great for discovering problems, but not so great for telling me what those problems are. My tests are of the most basic kind: tester.startPage(MyPage.*class*); tester.assertRenderedPage(MyPage.*class*); When a test fails, though, the only feedback I get is: junit.framework.AssertionFailedError: expected:MyPage but was:ErrorPage [stack trace follows] I understand that MyPage threw an exception, resulting in ErrorPage at the assert step. What I don't know is how I can get the error that was thrown. I tried removing my RequestCycle's onRuntimeException(), but then I just get an equally useless stack trace that tells me: ...at edu.chemeketa.foodhandler.webapp.TestMyPage.testRenderMyPage(TestMyPage.java:58) I know that WicketTester is great, so I'm assuming that the problem is on my end. Is there a simple way of printing out the exceptions that occur during a WicketTester test run? thanks, Dane
Re: Finding output from WicketTester
the exception is spit out into the log -igor On Fri, Jan 15, 2010 at 2:17 PM, Dane Laverty danelave...@gmail.com wrote: A while back I added basic WicketTester rendering tests for each of my pages. They have been great for discovering problems, but not so great for telling me what those problems are. My tests are of the most basic kind: tester.startPage(MyPage.*class*); tester.assertRenderedPage(MyPage.*class*); When a test fails, though, the only feedback I get is: junit.framework.AssertionFailedError: expected:MyPage but was:ErrorPage [stack trace follows] I understand that MyPage threw an exception, resulting in ErrorPage at the assert step. What I don't know is how I can get the error that was thrown. I tried removing my RequestCycle's onRuntimeException(), but then I just get an equally useless stack trace that tells me: ...at edu.chemeketa.foodhandler.webapp.TestMyPage.testRenderMyPage(TestMyPage.java:58) I know that WicketTester is great, so I'm assuming that the problem is on my end. Is there a simple way of printing out the exceptions that occur during a WicketTester test run? thanks, Dane - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Newbie Questions
Dear fellow wicketers! I am now new to wicket and would like to say: wow + thanks for this great framework! I never see such a good separation of view and code. and making a small solr+wicket example working was really fun (like in good old desktop eras). Now I have the following questions: 1. Is there a scheduling or calendar component like the one from the tomahawk project [1] ? I especially look for a week-view. 2. Which setup (e.g. IDE) do you use to reduce the time from code change to site view? I am using netbeans 6.8 and 7 seconds out of the box seems to be okay, but is it possible to get it even faster with wicket? (preferable without commercial solutions aka JRebel) 3. For the persistence layer I need a rather simple solution (odb?) e.g. for CRUD. I found a databinder project [2] and wicketrad [3], but they seems to be out of date!? Then I found Wicket-Iolite [4] and wicket-phonebook [5]. Can this be used as a starting point or which *simple* persistent solutions do you use? 4. Is there a way to create a component without any html? 5. Is there a way to bind several components to *one* html file? I am thinking of a template which I'll receive from the designer. After this I only need to specify the wicket:ids within this html file and my components will hook into it. Or is there another solution? 6. The usage of the Link class is a bit counter intuitive: Link link = new Link(hrefId) { public void onClick() {..} }; link.add(new Label(titleId, new Model(myTitle) {...})); why is there no such constructor for the easiest case like it is the case in ExternalLink ala new Link(hrefid, hrefModel, titleModel) ? Regards, Peter. [1] http://myfaces.apache.org/tomahawk-project/tomahawk/tagdoc/t_schedule.html [2] http://databinder.net/wicket/show/overview/ [3] http://sites.google.com/site/wicketrad/ [4] http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite [5] http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook -- Free your timetabling! http://timefinder.sourceforge.net/
Re: PageLink deprecated
Gone because creating the page(s) during the rendering of another page is a bad idea. It should be done in the onClick handler. See the comment in the deprecation note (of the method, not just the class). http://fisheye6.atlassian.com/browse/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PageLink.java?r=814819#l122 -- Jeremy Thomerson http://www.wickettraining.com On Fri, Jan 15, 2010 at 2:04 AM, Jeroen Steenbeeke j.steenbeeke.ml@ gmail.com wrote: The obvious answer is to rewrite SecurePageLink to extend Link and take an IPageLink as parameter. IPageLink is not deprecated so I would hope that no trigger happy Wicket devs will be removing it. A quick look at the SVN trunk shows it is still available whereas PageLink is already gone. Then again, I am also curious as to why PageLink was deprecated in the first place. -- Jeroen Steenbeeke www.fortuityframework.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Newbie Questions
See inline answers. Hope this helps. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Jan 15, 2010 at 4:49 PM, Peter Karich peat...@yahoo.de wrote: Dear fellow wicketers! I am now new to wicket and would like to say: wow + thanks for this great framework! I never see such a good separation of view and code. and making a small solr+wicket example working was really fun (like in good old desktop eras). Now I have the following questions: 1. Is there a scheduling or calendar component like the one from the tomahawk project [1] ? I especially look for a week-view. Not that I know of, although I created a monthly calendar view, available in WicketStuff - see http://www.texashuntfish.com/app/calendar to see an example. The WS code also has an example app. 2. Which setup (e.g. IDE) do you use to reduce the time from code change to site view? I am using netbeans 6.8 and 7 seconds out of the box seems to be okay, but is it possible to get it even faster with wicket? (preferable without commercial solutions aka JRebel) I use the Wicket quickstart (or you can now use jWeekend's LegUp archetypes) and run the Start.java class to run an embedded Jetty container. Run this in debug mode in your IDE and you can debug your app easily, and changes to classes and HTML files are picked up generally within a second (typically by the time you can alt-tab to the browser and hit f5). 3. For the persistence layer I need a rather simple solution (odb?) e.g. for CRUD. I found a databinder project [2] and wicketrad [3], but they seems to be out of date!? Then I found Wicket-Iolite [4] and wicket-phonebook [5]. Can this be used as a starting point or which *simple* persistent solutions do you use? Simple quick start with a couple different configurations: http://www.jweekend.com/dev/LegUp 4. Is there a way to create a component without any html? Sure. See TextField or many others for examples of how to do so. 5. Is there a way to bind several components to *one* html file? I am thinking of a template which I'll receive from the designer. After this I only need to specify the wicket:ids within this html file and my components will hook into it. Or is there another solution? Create a panel. It can be placed in a page or other panels, etc, and can contain multiple components and has its own HTML. 6. The usage of the Link class is a bit counter intuitive: Link link = new Link(hrefId) { public void onClick() {..} }; link.add(new Label(titleId, new Model(myTitle) {...})); why is there no such constructor for the easiest case like it is the case in ExternalLink ala new Link(hrefid, hrefModel, titleModel) ? There are a bunch of examples on the list of how you can create a custom link that outputs a model or plain string within its open and close tags. Or look at ExternalLink as an example. But links don't always have just a string in them - many times they are around other components. Regards, Peter. [1] http://myfaces.apache.org/tomahawk-project/tomahawk/tagdoc/t_schedule.html [2] http://databinder.net/wicket/show/overview/ [3] http://sites.google.com/site/wicketrad/ [4] http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite [5] http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook -- Free your timetabling! http://timefinder.sourceforge.net/