Re: how to display a BookmarkableLink so it can't be clicked
use .setEnabled(false) cheers gabriel Jason Novotny wrote: Hi, I have a case where if some condition is met I don't want a link to be clickable... but I want it to display the link text (so overriding isVisible() is not an option). Any ideas on the most elegant approach? Thanks, Jason - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org !DSPAM:49d1654f323021219918801! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Page instantiated twice
Hello, I have a form that performs a search and shows a page with results. The result page also has the same form to do a repeat search. I noticed that the SearchPage is instantiated twice when I do a search from the form on the result page. Is there a way to make sure that does not happen? The search page ends up doing the search twice. Thanks, Vinayak - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page instantiated twice
Run it in debug mode, put a breakpoint in your constructor and see what's instantiating each. A lot of times it is your own code (a bad link, etc). -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 31, 2009 at 1:30 AM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, I have a form that performs a search and shows a page with results. The result page also has the same form to do a repeat search. I noticed that the SearchPage is instantiated twice when I do a search from the form on the result page. Is there a way to make sure that does not happen? The search page ends up doing the search twice. Thanks, Vinayak - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page instantiated twice
Jeremy, I did that. The first time it is at org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:127) and the second time it is at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:223) Does that help? Thanks, Vinayak Jeremy Thomerson wrote: Run it in debug mode, put a breakpoint in your constructor and see what's instantiating each. A lot of times it is your own code (a bad link, etc). -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 31, 2009 at 1:30 AM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, I have a form that performs a search and shows a page with results. The result page also has the same form to do a repeat search. I noticed that the SearchPage is instantiated twice when I do a search from the form on the result page. Is there a way to make sure that does not happen? The search page ends up doing the search twice. Thanks, Vinayak - 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: Page instantiated twice
Your page is stateless, which is a holy grail for most to attend. Be happy :) Since it is stateless, Wicket has to construct the page with each request, until it is no longer stateless. If you have a form, override its getstatelesshint method and return false. Martijn On Tue, Mar 31, 2009 at 8:36 AM, Vinayak Borkar vbo...@yahoo.com wrote: Jeremy, I did that. The first time it is at org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:127) and the second time it is at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:223) Does that help? Thanks, Vinayak Jeremy Thomerson wrote: Run it in debug mode, put a breakpoint in your constructor and see what's instantiating each. A lot of times it is your own code (a bad link, etc). -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 31, 2009 at 1:30 AM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, I have a form that performs a search and shows a page with results. The result page also has the same form to do a repeat search. I noticed that the SearchPage is instantiated twice when I do a search from the form on the result page. Is there a way to make sure that does not happen? The search page ends up doing the search twice. Thanks, Vinayak - 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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page instantiated twice
Martijn, Does setting the statelessHint to false indicate that the form is stateful? In that case, would Wicket try to serialize the form? Thanks, Vinayak Martijn Dashorst wrote: Your page is stateless, which is a holy grail for most to attend. Be happy :) Since it is stateless, Wicket has to construct the page with each request, until it is no longer stateless. If you have a form, override its getstatelesshint method and return false. Martijn On Tue, Mar 31, 2009 at 8:36 AM, Vinayak Borkar vbo...@yahoo.com wrote: Jeremy, I did that. The first time it is at org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:127) and the second time it is at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:223) Does that help? Thanks, Vinayak Jeremy Thomerson wrote: Run it in debug mode, put a breakpoint in your constructor and see what's instantiating each. A lot of times it is your own code (a bad link, etc). -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 31, 2009 at 1:30 AM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, I have a form that performs a search and shows a page with results. The result page also has the same form to do a repeat search. I noticed that the SearchPage is instantiated twice when I do a search from the form on the result page. Is there a way to make sure that does not happen? The search page ends up doing the search twice. Thanks, Vinayak - 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: [OT] Book/pointers on caching
Lucky I picked that one :) But seriously it was really simple implementing the cache stuff (with spring), it's only a few annotations.. 2009/3/30 Scott Swank scott.sw...@gmail.com: This author compared several caching libraries and recommends ehcache. http://javalandscape.blogspot.com/2009/03/intro-to-cachingcaching-algorithms-and.html - Scott On Mon, Mar 30, 2009 at 4:33 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: I wrote something about it here: http://ninomartinez.wordpress.com/2008/08/25/pump-your-java-with-caching/ It's very easy if your already using spring or guice or any other IOC framework. One thing though I would'nt cache too much with wicket, the benefit are very small and the code cost are high. 2009/3/29 Kaspar Fischer fisch...@inf.ethz.ch: I again and again run into the following problem: My Wicket app displays a complex page, and in order to compile the information needed for this page, I need to do many database/repository queries and/or computations -- so many that it simply takes to long and the user has two wait. Take for instance a page with many news blocks for different topics, a recently added content block, polls, the list of all active users, etc. Fetching all this data requires tons of queries to the backend. I understand that I need some caching mechanism. And as many have pointed out on this list, it is preferable to not do this in the presentation layer (caching Wicket components) but to move the caching to the business logic or persistence layer. So my Wicket models still make the same calls, like service.find(blabla), but behind the scenes, a cache speeds up the access. The question is just: what are good caching strategies? When to update the cache? Should the cache itself know when to invalidate entries? Etc. Is there any sample code, articles, or books on this that you can recommend? I liked to read Multitiered architectures in Wicket in Action and would enjoy something in this direction: Spring, Hibernate (or db4o), services, ... Thanks a lot, Kaspar - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Form Validations
I am using Wicket-1.3.0 Version. Following are the code Snippet //Code Snippet for RadioChoice// RadioGroup sexField = new RadioGroup(sex, new Model()); sexField.add(new Radio(male, new Model(Male))); sexField.add(new Radio(female, new Model(Female))); sexField.setOutputMarkupId(true); sexField.setRequired(true); add(sexField); final FeedbackLabel sexFeedbackLabel = new FeedbackLabel(sexFeedback, sexField); sexFeedbackLabel.setOutputMarkupId(true); add(sexFeedbackLabel); //Code Snippet for AutoCompleteTextField// AutoCompleteTextField cityField = new AutoCompleteTextField(city, new Model()) { @Override protected Iterator getChoices(String input) { if (Strings.isEmpty(input)) { return Collections.EMPTY_LIST.iterator(); } List choices = new ArrayList(); List name = reader.loadFile(cities.txt);//cities.txt contains cities name... Iterator itr = name.iterator(); while (itr.hasNext()) { String nameIs = (String) itr.next(); if (nameIs.toUpperCase().startsWith(input.toUpperCase())) { choices.add(nameIs); if (choices.size() == 10) { break; } } } return choices.iterator(); } }; cityField.setOutputMarkupId(true); cityField.setRequired(true); cityField.add(new StringValidator.MaximumLengthValidator(25)); final FeedbackLabel cityLabel = new FeedbackLabel(cityFeedback, cityField); cityLabel.setOutputMarkupId(true); add(cityLabel); cityField.add(new ComponentVisualErrorBehavior(onblur, cityLabel)); add(cityField); Label citLabel = new Label(city.label, City); add(citLabel); Thank you -- View this message in context: http://www.nabble.com/Form-Validations-tp22777684p22799307.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: Page instantiated twice
Martijn, Ok. I set the getStatelessHint() to return false. Now I get java.lang.IllegalStateException: No SessionHandler or SessionManager What is the reason that wicket needs to instantiate the page twice? I can understand the second instantiation, but my guess is that the first instantiation is not to render the HTML. If I am correct about my analysis above, is there some way I can know that the instantiation does not need to populate all the components? Thanks, Vinayak Martijn Dashorst wrote: Your page is stateless, which is a holy grail for most to attend. Be happy :) Since it is stateless, Wicket has to construct the page with each request, until it is no longer stateless. If you have a form, override its getstatelesshint method and return false. Martijn On Tue, Mar 31, 2009 at 8:36 AM, Vinayak Borkar vbo...@yahoo.com wrote: Jeremy, I did that. The first time it is at org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:127) and the second time it is at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:223) Does that help? Thanks, Vinayak Jeremy Thomerson wrote: Run it in debug mode, put a breakpoint in your constructor and see what's instantiating each. A lot of times it is your own code (a bad link, etc). -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 31, 2009 at 1:30 AM, Vinayak Borkar vbo...@yahoo.com wrote: Hello, I have a form that performs a search and shows a page with results. The result page also has the same form to do a repeat search. I noticed that the SearchPage is instantiated twice when I do a search from the form on the result page. Is there a way to make sure that does not happen? The search page ends up doing the search twice. Thanks, Vinayak - 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
Custom rendering of components for different devices
Hi, When we develop new custom components or customize existing components in Wicket, how do we change the rendering for the components for different devices like the way we configure a render kit for components in JSF? Thanks, Subbu.
Re: how to display a BookmarkableLink so it can't be clicked
As suggested, you need .setEnabled(false) to disable your link. This will add em tags around the link though, so if you don't want this, or want a different tag, do this in your Application.class /* a component that is disabled by Wicket will normally have em surrounding it. This makes it null */ getMarkupSettings().setDefaultBeforeDisabledLink(null); getMarkupSettings().setDefaultAfterDisabledLink(null); cheers, Steve On 31/03/2009, at 1:39 AM, Gabriel Bucher wrote: use .setEnabled(false) cheers gabriel Jason Novotny wrote: Hi, I have a case where if some condition is met I don't want a link to be clickable... but I want it to display the link text (so overriding isVisible() is not an option). Any ideas on the most elegant approach? Thanks, Jason - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org !DSPAM:49d1654f323021219918801! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Extend layout of a page
Serkan Camurcuoglu-3 wrote: search for the words wicket markup inheritance on google.. Hi, isn't there another way besides using inheritance? If e.g. I extend my page two times: add a menu bar to it (pageMenu) and add a clock to it (pageClock). Now I need a page which has both, clock and menu (pageMenuAndClock). I can just extend pageMenu or pageClock. So the functionality of one of them has to be rewritten in pageMenuAndClock. -- View this message in context: http://www.nabble.com/Extend-layout-of-a-page-tp22784265p22799536.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: Extend layout of a page
Just use regular OO design. Maybe you could add them both in your parent class, based on a boolean condition that is an abstract method. Then your child classes only have to override includePageClock() method, for example. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Mar 31, 2009 at 2:10 AM, ptrash ptr...@web.de wrote: Serkan Camurcuoglu-3 wrote: search for the words wicket markup inheritance on google.. Hi, isn't there another way besides using inheritance? If e.g. I extend my page two times: add a menu bar to it (pageMenu) and add a clock to it (pageClock). Now I need a page which has both, clock and menu (pageMenuAndClock). I can just extend pageMenu or pageClock. So the functionality of one of them has to be rewritten in pageMenuAndClock. -- View this message in context: http://www.nabble.com/Extend-layout-of-a-page-tp22784265p22799536.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: Extend layout of a page
At the moment, the requirements are not certained. That's why it should be possible to extend the page without modifying it. I'd like to use something like composition. -- View this message in context: http://www.nabble.com/Extend-layout-of-a-page-tp22784265p22800066.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
Fwd: NewBie question :Implementation of Collapsible Link
-- Forwarded message -- From: Ajayi Yinka iamstyaj...@googlemail.com Date: Tue, Mar 31, 2009 at 9:01 AM Subject: Re: NewBie question :Implementation of Collapsible Link To: users@wicket.apache.org Thanks so much. I want a tree view (What I really want to implement is a collapsible list, whereby a click on a link will display sublinks.) I am afraid if you understand what I am trying to do now. I guess the following html will give better insight. ul liItem 1/li liItem 2/li liItem 3 ul liItem 3.1/li liItem 3.2 ul liItem 3.2.1/li liItem 3.2.2/li liItem 3.2.3/li /ul /li liItem 3.3/li /ul /li liItem 4 ul liItem 4.1/li liItem 4.2 ul liItem 4.2.1/li liItem 4.2.2/li /ul /li /ul /li liItem 5/li /ul I will appreate your good indulgence concerning my request. Thanks Reagard, Yinka On Tue, Mar 31, 2009 at 3:30 AM, Jeremy Thomerson jer...@wickettraining.com wrote: More details necessary. An accordion panel or tree view? Etc... -- Jeremy Thomerson http://www.wickettraining.com On Mon, Mar 30, 2009 at 3:19 AM, Ajayi Yinka iamstyaj...@googlemail.com wrote: I am trying to see if i can implement collapsible link in my page. i had tried to use Link Tree, but I was getting error which I could not even trace or decipher the cause. Please, can anyone give me insight on the best way to implement the collapsible link Thanks. Yinka
Re: Custom rendering of components for different devices
Hi For a component (panel page etc) you can specify a variant, you can search the list for further information 2009/3/31 Subramanian Murali subramanian.mur...@gmail.com: Hi,. When we develop new custom components or customize existing components in Wicket, how do we change the rendering for the components for different devices like the way we configure a render kit for components in JSF? Thanks, Subbu. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Tree navigation panel
Thank you, Igor. Do you mean http://www.wicket-library.com/wicket-examples/ajax/tree/simple.2 ? It doesn't work without JavaScript. Is there another easy to use tree component? Regards, Christian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom rendering of components for different devices
As long as it is markup. Having a telnet component is not in scope of wicket (but was in 2005/2006/2007 very much for JSF). Martijn On Tue, Mar 31, 2009 at 11:35 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi For a component (panel page etc) you can specify a variant, you can search the list for further information 2009/3/31 Subramanian Murali subramanian.mur...@gmail.com: Hi,. When we develop new custom components or customize existing components in Wicket, how do we change the rendering for the components for different devices like the way we configure a render kit for components in JSF? Thanks, Subbu. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Custom rendering of components for different devices
Hehe.. Wasnt exactly thinking in those lines.. 2009/3/31 Martijn Dashorst martijn.dasho...@gmail.com: As long as it is markup. Having a telnet component is not in scope of wicket (but was in 2005/2006/2007 very much for JSF). Martijn On Tue, Mar 31, 2009 at 11:35 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi For a component (panel page etc) you can specify a variant, you can search the list for further information 2009/3/31 Subramanian Murali subramanian.mur...@gmail.com: Hi,. When we develop new custom components or customize existing components in Wicket, how do we change the rendering for the components for different devices like the way we configure a render kit for components in JSF? Thanks, Subbu. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - 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
session management
Hi, does wicket always create a session when a new user enters a page? Or is it possible to turn the session creation off? tia ___ DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Should a form submit when sub-form has error's?
Hi, Should a Form submit when a subform has error's? I have a main-form where I add a panel that contains another form. This sub-form contains a formvalidator that gives the error. However the main-form is submitted, but the feedbackpanel does show the error message set in the sub-form's validator. Is this expected behavior using 1.4-snapshot? Because in wicket 1.3.x this does work and the mainform is not submitted. (I can provide a testcase if needed) Thijs - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: session management
Yes, but the session is only permanent when you call bind(), or a stateful page is requested and the state needs to be stored for links, forms, ajax etc. As long as you use bookmarkable pages (and links to them), and stateless forms, and no ajax, your site will be stateless, and wicket will not automatically bind the session to HTTP Session. Martijn On Tue, Mar 31, 2009 at 1:28 PM, Pi Trash ptr...@web.de wrote: Hi, does wicket always create a session when a new user enters a page? Or is it possible to turn the session creation off? tia ___ DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: session management
That means if the user visites 3 bookmarkable pages, then three sessions will be created? Martijn Dashorst wrote: Yes, but the session is only permanent when you call bind(), or a stateful page is requested and the state needs to be stored for links, forms, ajax etc. As long as you use bookmarkable pages (and links to them), and stateless forms, and no ajax, your site will be stateless, and wicket will not automatically bind the session to HTTP Session. Martijn On Tue, Mar 31, 2009 at 1:28 PM, Pi Trash ptr...@web.de wrote: Hi, does wicket always create a session when a new user enters a page? Or is it possible to turn the session creation off? tia ___ DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - 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://www.nabble.com/session-management-tp22803196p22803539.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: Extend layout of a page
you could do something like composition by doing inheritance and repeaters... 2009/3/31 ptrash ptr...@web.de: At the moment, the requirements are not certained. That's why it should be possible to extend the page without modifying it. I'd like to use something like composition. -- View this message in context: http://www.nabble.com/Extend-layout-of-a-page-tp22784265p22800066.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
AW: Tree navigation panel
I was confused by the example with the tree and nested panels and thought that the code for the nested panels would be necessary for the tree. It would be better to focus the examples on exactly one problem. org.apache.wicket..extensions.markup.html.tree.Tree is what I was looking for. Clicking a link in the tree should change the content of a panel near to the tree (like Tabbed Panels). My idea is to make a tree of Panels. But how can create links to these panels in the tree labeld with the panel names? Regards Christian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: session management
On Tue, Mar 31, 2009 at 1:52 PM, ptrash ptr...@web.de wrote: That means if the user visites 3 bookmarkable pages, then three sessions will be created? Yes, but TEMPORARY sessions that are not bound to a HTTP session. These will be available to the garbage collector after each request. This has nothing to do with your container sessions. Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
urlFor ResourceStreamRequestTarget returning null
hi all, i can't seem to find the way to get an url for a given RequestTarget. i'm using wicket 1.4-rc1. basically i have an SWFComponent : http://paste.pocoo.org/show/110435/ my problem is in line 35, when i call urlFor(target) to the renderHead method. the target is of type ResourceStreamRequestTarget and when i dig into the sources for the urlFor call, i end up in WebRequestCodingStrategy#encode: // fall through for non-default request targets url = doEncode(requestCycle, requestTarget); doEncode javadoc reads: * In case you are using custom targets that are not part of the default target hierarchy, you * need to override this method, which will be called after the defaults have been tried. When * this doesn't provide a url either (returns null), an exception will be thrown by the encode * method saying that encoding could not be done. where am i supposed to override this method? additionally, wicket doesn't seem to throw an exception as stated - it silently returns the null value. any ideas on how to get the url, or improvements to the code i pasted to make it work? thank you, francisco ps: note that the ResourceStreamRequestTarget works fine. for instance if i call getRequestCycle().setRequestTarget(target); on renderHead, the http response streams the swf file. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
need Help on [AutoCompleteTextField]
Is there any way to display User Defined values in AutoCompleteTextField (ajax behavior) by using array of values. Please refer me some examples and links to demonstrate such type of behaviour. Thanks, FaRHaN
How To Download Excel File?
Hi All, I would like to know how can I put a link into a page so when the user clicks I fetch some data from database , export it to Excel so the user directly downloads an xls file with the content. Any help is appreciated, Thanks in advance, Wadi
Re: How To Download Excel File?
Not related to Wicket, but this might be a start: http://api.openoffice.org/ Regards, Linda Wadi Jalil Maluf wrote: Hi All, I would like to know how can I put a link into a page so when the user clicks I fetch some data from database , export it to Excel so the user directly downloads an xls file with the content. Any help is appreciated, Thanks in advance, Wadi No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.285 / Virus Database: 270.11.34/2032 - Release Date: 03/31/09 06:02:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Start Wicket project with Spring and Hibernate
Hey, Our new Wicket application is to be build with Spring and Hibernate, so I included these: dependency groupIdorg.springframework/groupId artifactIdspring/artifactId version2.5.6/version /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate/artifactId version3.2.6.ga/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-spring/artifactId version1.3.5/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-spring-annot/artifactId version1.3.5/version /dependency Anything is missing? I noticed there are dependencies like spring-context, spring-context-support, spring-aop, hibernate-annotations and the list goes on. Should I include them too? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Start Wicket project with Spring and Hibernate
Should be good. http://code.google.com/p/wicket-flex-blazeds/source/browse/trunk/myproject-core/pom.xml Ryan Gravener http://ryangravener.com/flex | http://twitter.com/ryangravener On Tue, Mar 31, 2009 at 10:45 AM, HHB hubaghd...@yahoo.ca wrote: Hey, Our new Wicket application is to be build with Spring and Hibernate, so I included these: dependency groupIdorg.springframework/groupId artifactIdspring/artifactId version2.5.6/version /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate/artifactId version3.2.6.ga/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-spring/artifactId version1.3.5/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-spring-annot/artifactId version1.3.5/version /dependency Anything is missing? I noticed there are dependencies like spring-context, spring-context-support, spring-aop, hibernate-annotations and the list goes on. Should I include them too? Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
java.lang.IllegalArgumentException: bundle context should be set before refreshing the application context
Hi, When I start my Apache Wicket bundle using Apache Service Mix (based on Felix and Spring DM), I receive the following error : Quote: 16:35:58,415 | DEBUG | localShell | jetty | .service.internal.util.JCLLogger 85 | started org.ops4j.pax.web.service.internal.model.ServletMo del-66 16:35:58,415 | INFO | localShell | HttpServiceProxy | ervice.internal.HttpServiceProxy 129 | Registering event listener [org.springframework.web.context.ContextLoaderListe n...@196dc61] 16:35:58,415 | DEBUG | localShell | HttpServiceStarted | vice.internal.HttpServiceStarted 324 | Using context [ContextModel{id=org.ops4j.pax.web.service.internal .model.ContextModel-64,name=reportincident,httpContext=org.ops4j.pax.w eb.extender.war.internal.webapphttpcont...@fe404a, contextParams={webapp.context=reportincident, contextClass=org.springframework.osgi.web.context. support.OsgiBundleXmlWebApplicationContext}}] 16:35:58,415 | INFO | localShell | /reportincident | .service.internal.util.JCLLogger 102 | Initializing Spring root WebApplicationContext 16:35:58,415 | INFO | localShell | ContextLoader | mework.web.context.ContextLoader 189 | Root WebApplicationContext: initialization started 16:35:58,415 | ERROR | localShell | ContextLoader | mework.web.context.ContextLoader 215 | Context initialization failed java.lang.IllegalArgumentException: bundle context should be set before refreshing the application context at org.springframework.util.Assert.notNull(Assert.jav a:112) at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.normalRefresh( AbstractDelegatedExecutionApplicationContext.java: 179) at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext$NoDependencies WaitRefreshExecutor.refresh(AbstractDelegatedExecu tionApplicationContext.java:89) at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.refresh(Abstra ctDelegatedExecutionApplicationContext.java:175) at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 45) Here is the config of my web.xml file : Quote: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-namereportincident.web/display-name context-param param-namecontextClass/param-name param-valueorg.springframework.osgi.web.context.support .OsgiBundleXmlWebApplicationContext/param-value /context-param listener listener-classorg.springframework.web.context.ContextLoade rListener/listener-class /listener filter filter-namewicket.reportincident.web/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter /filter-class init-param param-nameapplicationClassName/param-name param-valueorg.apache.camel.example.WicketApplication/param-value /init-param /filter filter-mapping filter-namewicket.reportincident.web/filter-name url-pattern/*/url-pattern /filter-mapping /web-app Any idea to solve this problem is welcome ? Regards, Charles __ SOA Architect
Re: How To Download Excel File?
I could be wrong - but maybe the question is about how best to structure this in Wicket .. Should it be a bookmarkable link? Should it be an action link? If I do the work in my Action style link, how does one directly return content from an action link as opposed to setting page response, etc. -Luther On Tue, Mar 31, 2009 at 9:30 AM, Linda van der Pal lvd...@heritageagenturen.nl wrote: Not related to Wicket, but this might be a start: http://api.openoffice.org/ Regards, Linda Wadi Jalil Maluf wrote: Hi All, I would like to know how can I put a link into a page so when the user clicks I fetch some data from database , export it to Excel so the user directly downloads an xls file with the content. Any help is appreciated, Thanks in advance, Wadi No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.285 / Virus Database: 270.11.34/2032 - Release Date: 03/31/09 06:02:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How To Download Excel File?
Hi, I could be wrong - but maybe the question is about how best to structure this in Wicket .. it's just that easy (this is Scala, not Java): add( new Link( ImageLink.ID_LINK ) { def onClick = { val resourceStream = new ByteArrayResourceStream( xlsExporter.createExcel, application/vnd.ms-excel ); getRequestCycle.setRequestTarget( new ResourceStreamRequestTarget( resourceStream ) { override def getFileName = export.xls } ) } }) ByteArrayResourceStream is a simple implementation of IResourceStream. Creating the Excel bytearray is another issue (I suggest using Apache POI). Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How To Download Excel File?
Hi Wadi, The easy way is to have the conversion to xls occur within the link action (extracting from db and storing to a temporary file in XLS format). then you can use a DownloadLink with the model set to the File (generatedXLSFileName). If it is not tied to some other process you will have to create a resource that knows how to do the conversion. Have a look at extending DynamicWebResource. Regards, Mike Hi All, I would like to know how can I put a link into a page so when the user clicks I fetch some data from database , export it to Excel so the user directly downloads an xls file with the content. Any help is appreciated, Thanks in advance, Wadi - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Page Maps order
Hi, are the pages in Page Maps ordered (e.g. chronological)? tia Pt! Schon vom neuen WEB.DE MultiMessenger gehört? Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How To Download Excel File?
I could be wrong - but maybe the question is about how best to structure this in Wicket .. it's just that easy (this is Scala, not Java): add( new Link( ImageLink.ID_LINK ) { def onClick = { val resourceStream = new ByteArrayResourceStream( xlsExporter.createExcel, application/vnd.ms-excel ); getRequestCycle.setRequestTarget( new ResourceStreamRequestTarget( resourceStream ) { override def getFileName = export.xls } ) } }) ByteArrayResourceStream is a simple implementation of IResourceStream. Creating the Excel bytearray is another issue (I suggest using Apache POI). or extend DynamicWebResource and return your own ResourceState with the excel file as a byte array returned by getData and use application/x-ms-excel as the content type. To link to the excel, mount the resource in your WebApplication, check the javadoc of ResourceReference on how to do so. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How To Download Excel File?
hola wadi to generate the excel file, have a look at the poi apache project: http://poi.apache.org/spreadsheet/index.html then you will need to create a resource for that file / byte array. you might find some inspiration from this pastie: http://paste.pocoo.org/show/110449/ finally, use new ResourceLinkVoid(downloadAsExcel, new PdfResource() { (...) } declare the link on your html and you're done! francisco 2009/3/31 Wadi Jalil Maluf wad...@yahoo.com.ar: Hi All, I would like to know how can I put a link into a page so when the user clicks I fetch some data from database , export it to Excel so the user directly downloads an xls file with the content. Any help is appreciated, Thanks in advance, Wadi - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Start Wicket project with Spring and Hibernate
On Tue, Mar 31, 2009 at 10:45 AM, HHB hubaghd...@yahoo.ca wrote: Hey, Our new Wicket application is to be build with Spring and Hibernate, so I included these: dependency groupIdorg.springframework/groupId artifactIdspring/artifactId version2.5.6/version /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate/artifactId version3.2.6.ga/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-spring/artifactId version1.3.5/version /dependency dependency groupIdorg.apache.wicket/groupId artifactIdwicket-spring-annot/artifactId version1.3.5/version /dependency Anything is missing? I noticed there are dependencies like spring-context, spring-context-support, spring-aop, hibernate-annotations and the list goes on. Should I include them too? You're welcome to start from my Advanced Wicket presentation example application if you want: http://svn.carmanconsulting.com/public/wicket-advanced/trunk Thanks. - 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: NewBie question :Implementation of Collapsible Link
Are you looking for a menu system? On Tue, Mar 31, 2009 at 4:04 AM, Ajayi Yinka iamstyaj...@googlemail.com wrote: -- Forwarded message -- From: Ajayi Yinka iamstyaj...@googlemail.com Date: Tue, Mar 31, 2009 at 9:01 AM Subject: Re: NewBie question :Implementation of Collapsible Link To: users@wicket.apache.org Thanks so much. I want a tree view (What I really want to implement is a collapsible list, whereby a click on a link will display sublinks.) I am afraid if you understand what I am trying to do now. I guess the following html will give better insight. ul liItem 1/li liItem 2/li liItem 3 ul liItem 3.1/li liItem 3.2 ul liItem 3.2.1/li liItem 3.2.2/li liItem 3.2.3/li /ul /li liItem 3.3/li /ul /li liItem 4 ul liItem 4.1/li liItem 4.2 ul liItem 4.2.1/li liItem 4.2.2/li /ul /li /ul /li liItem 5/li /ul I will appreate your good indulgence concerning my request. Thanks Reagard, Yinka On Tue, Mar 31, 2009 at 3:30 AM, Jeremy Thomerson jer...@wickettraining.com wrote: More details necessary. An accordion panel or tree view? Etc... -- Jeremy Thomerson http://www.wickettraining.com On Mon, Mar 30, 2009 at 3:19 AM, Ajayi Yinka iamstyaj...@googlemail.com wrote: I am trying to see if i can implement collapsible link in my page. i had tried to use Link Tree, but I was getting error which I could not even trace or decipher the cause. Please, can anyone give me insight on the best way to implement the collapsible link Thanks. Yinka - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How To Download Excel File?
These responses were great! I learned something from almost each variant of the answer. For what its worth, depending on how the app will be used - one might need to be careful about writing files to the filesystem ... but again, thanks for all the great examples listed here. -Luther On Tue, Mar 31, 2009 at 10:11 AM, francisco treacy francisco.tre...@gmail.com wrote: hola wadi to generate the excel file, have a look at the poi apache project: http://poi.apache.org/spreadsheet/index.html then you will need to create a resource for that file / byte array. you might find some inspiration from this pastie: http://paste.pocoo.org/show/110449/ finally, use new ResourceLinkVoid(downloadAsExcel, new PdfResource() { (...) } declare the link on your html and you're done! francisco 2009/3/31 Wadi Jalil Maluf wad...@yahoo.com.ar: Hi All, I would like to know how can I put a link into a page so when the user clicks I fetch some data from database , export it to Excel so the user directly downloads an xls file with the content. Any help is appreciated, Thanks in advance, Wadi - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Should a form submit when sub-form has error's?
not it shouldnt. there should already be unit tests that check for this, can you please check those and provide a patch if possible. -igor On Tue, Mar 31, 2009 at 4:34 AM, Thijs vonk.th...@gmail.com wrote: Hi, Should a Form submit when a subform has error's? I have a main-form where I add a panel that contains another form. This sub-form contains a formvalidator that gives the error. However the main-form is submitted, but the feedbackpanel does show the error message set in the sub-form's validator. Is this expected behavior using 1.4-snapshot? Because in wicket 1.3.x this does work and the mainform is not submitted. (I can provide a testcase if needed) Thijs - 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: NewBie question :Implementation of Collapsible Link
I think what I want to do is on this page http://www.wicket-library.com/wicket-examples/ajax/tree/table/editable.1 Thanks for your indulgence. On Tue, Mar 31, 2009 at 5:44 PM, James Carman jcar...@carmanconsulting.comwrote: Are you looking for a menu system? On Tue, Mar 31, 2009 at 4:04 AM, Ajayi Yinka iamstyaj...@googlemail.com wrote: -- Forwarded message -- From: Ajayi Yinka iamstyaj...@googlemail.com Date: Tue, Mar 31, 2009 at 9:01 AM Subject: Re: NewBie question :Implementation of Collapsible Link To: users@wicket.apache.org Thanks so much. I want a tree view (What I really want to implement is a collapsible list, whereby a click on a link will display sublinks.) I am afraid if you understand what I am trying to do now. I guess the following html will give better insight. ul liItem 1/li liItem 2/li liItem 3 ul liItem 3.1/li liItem 3.2 ul liItem 3.2.1/li liItem 3.2.2/li liItem 3.2.3/li /ul /li liItem 3.3/li /ul /li liItem 4 ul liItem 4.1/li liItem 4.2 ul liItem 4.2.1/li liItem 4.2.2/li /ul /li /ul /li liItem 5/li /ul I will appreate your good indulgence concerning my request. Thanks Reagard, Yinka On Tue, Mar 31, 2009 at 3:30 AM, Jeremy Thomerson jer...@wickettraining.com wrote: More details necessary. An accordion panel or tree view? Etc... -- Jeremy Thomerson http://www.wickettraining.com On Mon, Mar 30, 2009 at 3:19 AM, Ajayi Yinka iamstyaj...@googlemail.com wrote: I am trying to see if i can implement collapsible link in my page. i had tried to use Link Tree, but I was getting error which I could not even trace or decipher the cause. Please, can anyone give me insight on the best way to implement the collapsible link Thanks. Yinka - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: session management
3 wicket session objects will be created. when a stateful page is visited this wicket session object is stored in an http session. -igor On Tue, Mar 31, 2009 at 4:52 AM, ptrash ptr...@web.de wrote: That means if the user visites 3 bookmarkable pages, then three sessions will be created? Martijn Dashorst wrote: Yes, but the session is only permanent when you call bind(), or a stateful page is requested and the state needs to be stored for links, forms, ajax etc. As long as you use bookmarkable pages (and links to them), and stateless forms, and no ajax, your site will be stateless, and wicket will not automatically bind the session to HTTP Session. Martijn On Tue, Mar 31, 2009 at 1:28 PM, Pi Trash ptr...@web.de wrote: Hi, does wicket always create a session when a new user enters a page? Or is it possible to turn the session creation off? tia ___ DSL zum Nulltarif + 20 Euro Extraprämie bei Online-Bestellung über die DSL Freundschaftswerbung! http://dsl.web.de/?ac=OM.AD.AD008K15279B7069a - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - 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://www.nabble.com/session-management-tp22803196p22803539.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: Tree navigation panel
wicket-library is old ver of wicket. not sure why that site is up. see here http://wicketstuff.org/wicket13/nested/?wicket:bookmarkablePage=:org.apache.wicket.examples.ajax.builtin.tree.SimpleTreePage the tree has a setter that changes what kinds of links are generated, you can call that with fallback mode to make the tree work without js. -igor On Tue, Mar 31, 2009 at 6:12 AM, Christian Helmbold christian.helmb...@yahoo.de wrote: I was confused by the example with the tree and nested panels and thought that the code for the nested panels would be necessary for the tree. It would be better to focus the examples on exactly one problem. org.apache.wicket..extensions.markup.html.tree.Tree is what I was looking for. Clicking a link in the tree should change the content of a panel near to the tree (like Tabbed Panels). My idea is to make a tree of Panels. But how can create links to these panels in the tree labeld with the panel names? Regards Christian - 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: Form Validations
Hi Ashish, Do you use AJAX? Have you added the components to the AjaxRequestTarget with target.addComponent() ? If you do use AJAX, you have to override both onError and onSubmit on the AjaxButton you use for submit. In both these methods you have to add the relevant components to the AjaxRequestTarget, or else they won't get updated. Something like: form.add(new AjaxButton(saveButton){ protected void onSubmit(AjaxRequestTarget target, Form form) { target.addComponent(sexFeedbackLabel); target.addComponent(cityLabel); // If you change other components, add them to the target as well. } @Override protected void onError(AjaxRequestTarget target, Form form) { target.addComponent(sexFeedbackLabel); target.addComponent(cityLabel); } }); It is possible that I guessed completely wrong about your problem :-) If you like, I can update the demo project with a working AJAX sample. By the way, the blog post and demo project is all based on Wicket 1.3.4, so it is possible that this will not work for previous versions. Regards, Daan Op 31 mrt 2009, om 08:46 heeft Ashis het volgende geschreven: I am using Wicket-1.3.0 Version. Following are the code Snippet //Code Snippet for RadioChoice// RadioGroup sexField = new RadioGroup(sex, new Model()); sexField.add(new Radio(male, new Model(Male))); sexField.add(new Radio(female, new Model(Female))); sexField.setOutputMarkupId(true); sexField.setRequired(true); add(sexField); final FeedbackLabel sexFeedbackLabel = new FeedbackLabel(sexFeedback, sexField); sexFeedbackLabel.setOutputMarkupId(true); add(sexFeedbackLabel); //Code Snippet for AutoCompleteTextField// AutoCompleteTextField cityField = new AutoCompleteTextField(city, new Model()) { @Override protected Iterator getChoices(String input) { if (Strings.isEmpty(input)) { return Collections.EMPTY_LIST.iterator(); } List choices = new ArrayList(); List name = reader.loadFile(cities.txt);// cities.txt contains cities name... Iterator itr = name.iterator(); while (itr.hasNext()) { String nameIs = (String) itr.next(); if (nameIs.toUpperCase().startsWith(input.toUpperCase())) { choices.add(nameIs); if (choices.size() == 10) { break; } } } return choices.iterator(); } }; cityField.setOutputMarkupId(true); cityField.setRequired(true); cityField.add(new StringValidator.MaximumLengthValidator(25)); final FeedbackLabel cityLabel = new FeedbackLabel(cityFeedback, cityField); cityLabel.setOutputMarkupId(true); add(cityLabel); cityField.add(new ComponentVisualErrorBehavior(onblur, cityLabel)); add(cityField); Label citLabel = new Label(city.label, City); add(citLabel); Thank you -- View this message in context: http://www.nabble.com/Form-Validations-tp22777684p22799307.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: How To Download Excel File?
Another way I'm using is like this (it works best if your clients have excel installed of course) Markup: http://pastebin.com/m41ee5cbe Java: http://pastebin.com/m488291d4 With the most important bits being: @Override protected void configureResponse() { super.configureResponse(); getRequestCycle().getResponse().setContentType(application/x-msexcel); } and then a simple DataView with something like this: ... head titleExcel Download/title meta http-equiv=Content-Type content=application/x-msexcel meta http-equiv=Content-disposition: attachment; filename=whatever_default_filename.xls /head body table tr thName/th ... more ... /tr tr wicket:id=rows td wicket:id=namenbsp;/td That makes most browsers open a dialog box where the user can open (usually in excel) or save the html - no binary conversion to excel's file format is really needed - excel can read HTML just fine. So if you are just doing a simple tabular report like I'm doing here, this could be a good option for you. -- Jim Pinkham On Tue, Mar 31, 2009 at 12:58 PM, Luther Baker lutherba...@gmail.comwrote: These responses were great! I learned something from almost each variant of the answer. For what its worth, depending on how the app will be used - one might need to be careful about writing files to the filesystem ... but again, thanks for all the great examples listed here. -Luther On Tue, Mar 31, 2009 at 10:11 AM, francisco treacy francisco.tre...@gmail.com wrote: hola wadi to generate the excel file, have a look at the poi apache project: http://poi.apache.org/spreadsheet/index.html then you will need to create a resource for that file / byte array. you might find some inspiration from this pastie: http://paste.pocoo.org/show/110449/ finally, use new ResourceLinkVoid(downloadAsExcel, new PdfResource() { (...) } declare the link on your html and you're done! francisco 2009/3/31 Wadi Jalil Maluf wad...@yahoo.com.ar: Hi All, I would like to know how can I put a link into a page so when the user clicks I fetch some data from database , export it to Excel so the user directly downloads an xls file with the content. Any help is appreciated, Thanks in advance, Wadi - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: urlFor ResourceStreamRequestTarget returning null
Have you seen this page [1], it also features an SWFObject. http://cwiki.apache.org/WICKET/open-flash-chart-and-wicket.html regards, Maarten On Tue, Mar 31, 2009 at 3:36 PM, francisco treacy francisco.tre...@gmail.com wrote: hi all, i can't seem to find the way to get an url for a given RequestTarget. i'm using wicket 1.4-rc1. basically i have an SWFComponent : http://paste.pocoo.org/show/110435/ my problem is in line 35, when i call urlFor(target) to the renderHead method. the target is of type ResourceStreamRequestTarget and when i dig into the sources for the urlFor call, i end up in WebRequestCodingStrategy#encode: // fall through for non-default request targets url = doEncode(requestCycle, requestTarget); doEncode javadoc reads: * In case you are using custom targets that are not part of the default target hierarchy, you * need to override this method, which will be called after the defaults have been tried. When * this doesn't provide a url either (returns null), an exception will be thrown by the encode * method saying that encoding could not be done. where am i supposed to override this method? additionally, wicket doesn't seem to throw an exception as stated - it silently returns the null value. any ideas on how to get the url, or improvements to the code i pasted to make it work? thank you, francisco ps: note that the ResourceStreamRequestTarget works fine. for instance if i call getRequestCycle().setRequestTarget(target); on renderHead, the http response streams the swf file. - 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: How To Download Excel File?
Check out my responses in this discussion... http://www.nabble.com/Opening-DynamicWebResource-from-Button-AjaxButton--td15459841.html#a21462901 I had some trouble getting generated files to download right at first. They either caused Wicket to become non-responsive or I couldn't provide a file name or MIME type. The solution I eventually came up with works very well. -Brandon wadi wrote: Hi All, I would like to know how can I put a link into a page so when the user clicks I fetch some data from database , export it to Excel so the user directly downloads an xls file with the content. Any help is appreciated, Thanks in advance, Wadi -- View this message in context: http://www.nabble.com/How-To-Download-Excel-File--tp22806518p22808994.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
WicketTester assertPageLink and BookmarkablePageLink
Hi ! I have a very quick question. Is there a way to test a BookmarkablePageLink ? Something similar to the assertPageLink method? Thanks, Alan
Re: FeedbackPanel.isVisible override
That was perfect. Thanks, -Luther On Sun, Mar 29, 2009 at 1:58 AM, Anton Veretennikov anton.veretenni...@gmail.com wrote: anyMessage(); On Sun, Mar 29, 2009 at 1:56 PM, Luther Baker lutherba...@gmail.com wrote: I am using the built-in functionality of the FeedbackPanel and I'd like to tweak it just a bit. I have some default padding/margin setup for that div ... and so even empty, it takes up some space on my page. I'd like to hide it altogether if no errors are present. Is there a well-known function I can call from my override of FeedbackPanel.isVisible() to tell me if Validation failed? Or - is there a more appropriate answer here to effectually do the same thing? -Luther - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Best practice in security
Hi! I'm searching for best solution for creating security in wicket application. Now for buissness logic I use EJB3. Some simple scenario: 1. Client go to page Login and enter login/password 2. Than client go to private area and create comments(or page and etc.) 3. Client log out. Questions: How protect methods in ejb? How protect methods in wicket? Where keep user credentianls while user work with application(in session? ) ? Maybe exists some frameworks for that? -- Григорий Ткачук Разработчик веб-решений Телефон: +7 902 516-25-09
Picket Web Framework -- PHP's answer to Java's Wicket
Are you a fan of Wicket but you can't use it because your company or client is tied with PHP? Have you ever wished that Wicket was available in the PHP land? Picket to the rescue! Picket is a project that aims to bring Wicket's awesome features and philosophy to the PHP community. The project was started by YouSoft Consulting (Nasdaq: YSFT) and being used internally since 2006. Now that Picket 1.1 has been released, and is stable enough for prime time, YouSoft opened the source code for public consumption with multi-licenses, namely, GPL v2, GPL v3, BSD, Apache, MPL and CDDL. For more information, visit its official website at http://4thmonth.yousoft.com/1stday/picket Have a happy day!