wicket vs Tibco general interface
Hi, Anyone compare wicket with Tibco General Interface? Tibco's stuff seems very impressive. Also I found it's very difficult to have a more advanced example for each wicket components.API doc and examples only list the very basic one.(ie: I want a single click behavior inside Palette which I still don't find any example ) Any suggestion? Thanks ying - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Spring integration problem
Instead of using a test stub, i'd use jmock or some similar mock framework and get a little more control :) 2009/4/6 Olivier Michallat omichal...@gmail.com: The problem is that your unit tests run out of the web container, you can't rely on a servlet context listener to load the Spring context in this situation. You need a hook to inject a mock context when testing. This post describes a solution: http://blog.ehour.nl/index.php/archives/21 2009/4/6 HHB hubaghd...@yahoo.ca: Hey, I'm trying to integrate Spring 2.5 into our Wicket application, I did the following: web.xml: context-param param-namecontextConfigLocation/param-name param-valueclasspath:applicationContext.xml/param-value /context-param listener listener-classorg.springframework.web. context.ContextLoaderListener/listener-class /listener filter filter-nameOpenSessionInViewFilter/filter-name filter-classorg.springframework.orm.hibernate3. support.OpenSessionInViewFilter/filter-class /filter filter filter-nameWicketFilter/filter-name filter-classorg.apache.wicket. protocol.http.WicketFilter/filter-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring. SpringWebApplicationFactory/param-value /init-param /filter filter filter-nameWicketFilter/filter-name filter-classorg.apache.wicket. protocol.http.WicketFilter/filter-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring. SpringWebApplicationFactory/param-value /init-param /filter applicationContext.xml: bean id=wicketApplication class=domain.WicketApplication/ pom.xml: dependency groupIdorg.springframework/groupId artifactIdspring/artifactId version2.5.6/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 WicketApplication: @Override protected void init() { super.init(); addComponentInstantiationListener (new SpringComponentInjector(this)); } But when trying: mvn test I got the following exception: --- Test set: TestSuite --- Tests run: 2, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 0.498 sec FAILURE! init(domain.TestHomePage) Time elapsed: 0 sec FAILURE! java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? at org.springframework.web.context.support. WebApplicationContextUtils. getRequiredWebApplicationContext(WebApplicationContextUtils.java:70) at org.apache.wicket.spring. injection.annot.SpringComponentInjector. init(SpringComponentInjector.java:74) Any ideas? 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Spring integration problem
code will then look like this: mockery.checking(new Expectations() { { oneOf(eventRepository).update(with(any(Event.class))); } }); tester.clickLink(content:events:0:delete); mockery.assertIsSatisfied(); pretty simple yet powerfull :) 2009/4/7 nino martinez wael nino.martinez.w...@gmail.com: Instead of using a test stub, i'd use jmock or some similar mock framework and get a little more control :) 2009/4/6 Olivier Michallat omichal...@gmail.com: The problem is that your unit tests run out of the web container, you can't rely on a servlet context listener to load the Spring context in this situation. You need a hook to inject a mock context when testing. This post describes a solution: http://blog.ehour.nl/index.php/archives/21 2009/4/6 HHB hubaghd...@yahoo.ca: Hey, I'm trying to integrate Spring 2.5 into our Wicket application, I did the following: web.xml: context-param param-namecontextConfigLocation/param-name param-valueclasspath:applicationContext.xml/param-value /context-param listener listener-classorg.springframework.web. context.ContextLoaderListener/listener-class /listener filter filter-nameOpenSessionInViewFilter/filter-name filter-classorg.springframework.orm.hibernate3. support.OpenSessionInViewFilter/filter-class /filter filter filter-nameWicketFilter/filter-name filter-classorg.apache.wicket. protocol.http.WicketFilter/filter-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring. SpringWebApplicationFactory/param-value /init-param /filter filter filter-nameWicketFilter/filter-name filter-classorg.apache.wicket. protocol.http.WicketFilter/filter-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring. SpringWebApplicationFactory/param-value /init-param /filter applicationContext.xml: bean id=wicketApplication class=domain.WicketApplication/ pom.xml: dependency groupIdorg.springframework/groupId artifactIdspring/artifactId version2.5.6/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 WicketApplication: @Override protected void init() { super.init(); addComponentInstantiationListener (new SpringComponentInjector(this)); } But when trying: mvn test I got the following exception: --- Test set: TestSuite --- Tests run: 2, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 0.498 sec FAILURE! init(domain.TestHomePage) Time elapsed: 0 sec FAILURE! java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? at org.springframework.web.context.support. WebApplicationContextUtils. getRequiredWebApplicationContext(WebApplicationContextUtils.java:70) at org.apache.wicket.spring. injection.annot.SpringComponentInjector. init(SpringComponentInjector.java:74) Any ideas? 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
authorizing a tab
I'm trying to disable a tab in a TabbedPanel based on authorization. I'm using wicket-auth-roles, and it works in other places, for example for buttons. Could anybody tell me what I'm doing wrong? The tab just keeps on showing, and if you click on it you go to a page that states that you don't have authorization for that page. (As I have added an annotation to that page as well.) public class BookDetailsPanel extends Panel { ... public BookDetailsPanel(String id, final String isbn, boolean showEditPanel) { ... List tabs = new ArrayList(); ... tabs.add(new OwnerEditTab(new Model(edit), isbn)); ... } @AuthorizeAction(action = Action.RENDER, roles = { OWNER }) private class OwnerEditTab extends AbstractTab { private static final long serialVersionUID = 1L; private String isbn; public OwnerEditTab(IModel model, String isbn) { super(model); this.isbn = isbn; } @Override public Panel getPanel(String panelId) { return new BookDetailsEditPanel(panelId, isbn); } } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
retrieve value at mouse click in palette
Hi, I try to retrieve the value of highlighted choice in palette by single click. Is there any sample code to do that anywhere? I cannot find anything from google or wicket book. Ying - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
override isEnabed of FinishButton
Hello, I have a Wizard with a FinishButton. I want the button always be enabled. Because the method isEnabled is final I cant override it. I think coping the button and change the isEnabled method to always return true is a bit ugly. What is de best way to do it? Regards, Martin -- Martin Tilma Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
setting TreeState in Wicket session?
I have a based web page which contains a wicket Tree, and need to keep the treestate for each extend webpages. So I override the newTreeState( ) as below: Tree cMenuTree = new Tree(menuTree, createTreeModel()) { @Override protected ITreeState newTreeState() { ITreeState treeState = null; WicketSession session = (WicketSession) MenuPanel.this .getSession(); System.out.println(session.size: + session.getSizeInBytes()); treeState = session.getTreeState(); if (treeState == null) { treeState = new DefaultTreeState(); session.setTreeState(treeState); } return treeState; } But I find the size of WicketSession is increasing quickly while each webpage created. I need to keep the treestate because of the template webpage. Please teach me how to eliminate the session size to avoid StackOverflowError Exception. Thanks. Roland.
Is localizing parts of the service layer (which is using Spring 2.5) a good idea?
Hi, This is more of a general design question and I would really appreciate some input. Do you localize the service layer as well as the Wicket presentation layer? I have a specific use case. When a user register a new account the service layer sends an e-mail message with an activation link. This message should be written in a language which the users understands and must thus be localized. I see two options: 1: Localize it using Spring only and don't involve Wicket. That way it will work in case of a user registering an account through a web service (bypassing the Wicket presentation layer). 2: Use localization as you normally would from Wicket and send the message string from the presentation layer to the relevant service layer method (where it is used in the e-mail). Currently no user is supposed to register through a web service invocation. It might change though, but not for quite a while. How would you solve this problem? Best regards, Kent - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: authorizing a tab
I think I had the same problem a while ago. Look at the solution in discussion underneath: http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-td13949910.html#a13965618 Linda van der Pal wrote: I'm trying to disable a tab in a TabbedPanel based on authorization. I'm using wicket-auth-roles, and it works in other places, for example for buttons. Could anybody tell me what I'm doing wrong? The tab just keeps on showing, and if you click on it you go to a page that states that you don't have authorization for that page. (As I have added an annotation to that page as well.) public class BookDetailsPanel extends Panel { ... public BookDetailsPanel(String id, final String isbn, boolean showEditPanel) { ... List tabs = new ArrayList(); ... tabs.add(new OwnerEditTab(new Model(edit), isbn)); ... } @AuthorizeAction(action = Action.RENDER, roles = { OWNER }) private class OwnerEditTab extends AbstractTab { private static final long serialVersionUID = 1L; private String isbn; public OwnerEditTab(IModel model, String isbn) { super(model); this.isbn = isbn; } @Override public Panel getPanel(String panelId) { return new BookDetailsEditPanel(panelId, isbn); } } } - 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/authorizing-a-tab-tp22925752p22926397.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
stateless AjaxFallbackLink
Hi, Is it correct that there is no stateless AjaxFallbackLink alternative? Which can pass through parameters? If so I would probably implement one if it's not very hard. Could you give good advises on this? Directions, approaches and so on. Right now I think first I have to study AjaxFallbackLink code and study how to get rid of stateful stuff. The second way is to reasearch how to compose StatelessLink and wicket ajax related functionality into a dedicated component. Regards, Sergey. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Integrating Wicket + Google Guice + Warp-persistence
Hi there, After a long period of reading, now I'm starting to code my application using these frameworks: Wicket, Google Guice and Warp-persistence. I facet a conceptual problem (IMHO) about how initialize google guice. I read a lot of source codes on the internet and most of them, if not all, initialize Google Guice and Warp-persistence inside the WicketApplication class (extends WebApplication). I think it isn't a good thing, because in the conceptual point of view google guice doesn't have direct relation to wicket. So, I started to find a good solution for this problem. My solution consists in use Google Guice servlet extension. I think that sometimes a source code says more than a thousand words ehehe, below are the pastbin links for all envolved files. What I want from you is a feedback, suggestions, improvements, critics, etc... Files: - web.xml http://pastebin.com/f576189de - GuiceServletContextListener http://pastebin.com/f6a42d811 - WebModule http://pastebin.com/f24a797b - ServiceModule http://pastebin.com/f6e9db66f - PersistenceServiceInitializer http://pastebin.com/f6e4425fd Maybe, and probably, some parts of the pasted source code are based on another projects, blogs posts, etc. Thanks, Eduardo S. Nunes - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Radio onBeforeRender funny business?
Hi! Radio.onBeforeRender: @Override protected void onBeforeRender() { // prefix markup id of this radio with its group's id // this will make it easier to identify all radios that belong to a specific group setMarkupId(getGroup().getMarkupId() + - + getMarkupId()); super.onBeforeRender(); } The markup id will go wild if the page is rendered multiple times? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to use Wicket in cluster to avoid memory problem?
Hi I am new to Wicket , in using wicket , the system often tells me the memory is not enough. Is there any one kindly tell me how to use wicket in cluster to avoid it or any document/example for it? Thanks your time so much! Best Regards Ji
Re: AppleTV!
Very cool! I am an AppleTV hobbyist myself. Do you have a blog post or something regarding the steps you took to do this? I'd be curious to check it out! -Matt. On Mon, Apr 6, 2009 at 23:55, Igor Vaynberg igor.vaynb...@gmail.com wrote: thats pretty freaking cool :) -igor On Mon, Apr 6, 2009 at 8:52 PM, John Armstrong siber...@gmail.com wrote: I think this may be a first but I am now running wicket on my AppleTV under Jetty. This is for a home automation project where wicket will be the glue between serial port communications and a USB-UIRT infrared input device. Hooray for Wicket, new frontiers.. Well, it wasn't that hard but I think its cool. John- - 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 -- Matthew Rollins Hanlon http://squareoftwo.com _ Hanlon's Razor: Never attribute to malice that which can be adequately explained by stupidity. http://wikipedia.org/wiki/Hanlon's_razor
EmptyAjaxRequestTarget invokes failurescript when link is pressed on page
Hi, We just noticed that if user is on a page and ajax request is executing, pressing a link can cause AbstractDefaultAjaxBehavior's failurescript to be executed on the browser. We noticed that this happens at least in cases where pressing a link forwards user to other page by setting a different response page. Content of ajax debug is same as in the jira issue I have posted before (JIRA 1971): INFO: Initiating Ajax POST request on ? wicket:interface=:1:inputForm:back::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=truerandom=0.6741350924814413 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (31 characters) INFO: ajax-response/ajax-response ERROR: Error while parsing response: Could not find root ajax-response element INFO: Invoking post-call handler(s)... Content of the ajax response is problem at least on ie6,ie7,ff2 and ff3. It seems to fail, because xml reply does not contain doctype. This is annoying, because the invoker of the ajax request is in our case inherited from the AbstractAjaxTimerBehavior and we would like to do a page reload in the failurescript in case that request fails so that page would still be updated even if there are some network problems. Now pressing any link that forwards to other pages can force a reload to the page, if some request is already executing. In this particular application this is wery common, partly because of bad network connection from the client's site (request can take some time) and partly because of very frequent ajax requests. We tried to modify org.apache.wicket.request.target.basic.EmptyAjaxRequestTarget's respond method so that it puts doctype to the respond as does the normal ajax target we replaced this: public void respond(RequestCycle requestCycle) { requestCycle.getResponse().write(ajax-response/ajax-response); } with this: public void respond(RequestCycle requestCycle) { final WebResponse response = (WebResponse)requestCycle.getResponse(); final Application app = Application.get(); final String encoding = app.getRequestCycleSettings().getResponseRequestEncoding(); // Set content type based on markup type for page response.setCharacterEncoding(encoding); response.setContentType(text/xml; charset= + encoding); // Make sure it is not cached by a client response.setHeader(Expires, Mon, 26 Jul 1997 05:00:00 GMT); response.setHeader(Cache-Control, no-cache, must-revalidate); response.setHeader(Pragma, no-cache); response.write(?xml version=\1.0\ encoding=\); response.write(encoding); response.write(\?); response.write(ajax-response/ajax-response); } And it works now. Should I open a jira issue for this? Regards, Mikko -- Mikko Pukki Syncron Tech Oy Laserkatu 6 53850 Lappeenranta +358 400 757 178 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to use Wicket in cluster to avoid memory problem?
the system which is that? On Tue, Apr 7, 2009 at 15:54, Wenke Ji jiwe...@gmail.com wrote: Hi I am new to Wicket , in using wicket , the system often tells me the memory is not enough. Is there any one kindly tell me how to use wicket in cluster to avoid it or any document/example for it? Thanks your time so much! Best Regards Ji
Re: How to use Wicket in cluster to avoid memory problem?
without telling us what you currently use for your settings, we won't be able to help you. how much memory did you allocate for your server. Does it only run your wicket app, did you use loadabledetachablemodels, did you profile your application to see if there's a leak or if you keep too much memory in your session? Martijn On Tue, Apr 7, 2009 at 3:54 PM, Wenke Ji jiwe...@gmail.com wrote: Hi I am new to Wicket , in using wicket , the system often tells me the memory is not enough. Is there any one kindly tell me how to use wicket in cluster to avoid it or any document/example for it? Thanks your time so much! Best Regards Ji -- 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: override isEnabed of FinishButton
I guess, you can try to override protected void onBeforeRender() and make something like: protected void onBeforeRender(){ this.setEnabled(true); super.onBeforeRender(); } Martin Tilma wrote: Hello, I have a Wizard with a FinishButton. I want the button always be enabled. Because the method isEnabled is final I cant override it. I think coping the button and change the isEnabled method to always return true is a bit ugly. What is de best way to do it? Regards, Martin -- Martin Tilma Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - 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/override-isEnabed-of-FinishButton-tp22927709p22930094.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: DatePicker, TextField and AjaxEventBehavior
Hi I am having the same problem as you had. I've changed DateField to DateTextField but I have still the original value. Please help. Caisi Michal Hybler wrote: If someone have same problem I have solved that by using DateTextField instead of DateField from wicket extension. M. Michal Hybler wrote: Hi, i have problem with using datepicker in wicket. I have TextField and DatePicker attached to it. final TextField dateFieldfrom = new TextField(validityFrom, new Model(userClassification.getValidity().getValidFrom())); dateFieldfrom.add(new DatePicker()); dateFieldfrom.add(new DateFieldBehaviour(DateFieldBehaviour.FROM, userClassification)); If value of textField is changed it invokes onEvent method. Its good. Now I need to get value from textField with selected date. I have tried getValue(), getModelObject() etc. Everything returns original value. New value is displayed correctly but i cant get it from textField. Any ideas? Thx for your help. With regards Michal -- View this message in context: http://www.nabble.com/DatePicker%2C-TextField-and-AjaxEventBehavior-tp22738598p22930480.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: AppleTV!
I just added my first post on this a few nights ago and I will be filling in the blanks soon. There is a prototype roadmap I am moving through that will ensure I have all the pieces to justify spending time designing the actual app. http://www.siberian.org/ John- On Tue, Apr 7, 2009 at 6:30 AM, Matthew Hanlon mrhan...@gmail.com wrote: Very cool! I am an AppleTV hobbyist myself. Do you have a blog post or something regarding the steps you took to do this? I'd be curious to check it out! -Matt. On Mon, Apr 6, 2009 at 23:55, Igor Vaynberg igor.vaynb...@gmail.com wrote: thats pretty freaking cool :) -igor On Mon, Apr 6, 2009 at 8:52 PM, John Armstrong siber...@gmail.com wrote: I think this may be a first but I am now running wicket on my AppleTV under Jetty. This is for a home automation project where wicket will be the glue between serial port communications and a USB-UIRT infrared input device. Hooray for Wicket, new frontiers.. Well, it wasn't that hard but I think its cool. John- - 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 -- Matthew Rollins Hanlon http://squareoftwo.com _ Hanlon's Razor: Never attribute to malice that which can be adequately explained by stupidity. http://wikipedia.org/wiki/Hanlon's_razor - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Validating DropDownChoice
I have a DropDownChoice defined as follows. // Model for populating Condition Dropdown IModel conditions = new LoadableDetachableModel() { public Object load() { ListConditions c = new ArrayList(); try { c = dao.getConditions(); } catch (DaoException e) { } return c; } }; // Condition Dropdown DropDownChoice condition = new DropDownChoice(conditions, conditions); ChoiceRenderer choiceRenderer = new ChoiceRenderer(condition, condition); add(new DropDownChoice(name, conditions, choiceRenderer)); Trying to write a custom AbstractFormValidator which makes the DropDownChoice or a TextField required. The problem is in my validate() method the DropDownChoice is always null. public void validate(Form form) { FormComponent f1 = components[0]; String f1Value = Objects.stringValue(f1.getConvertedInput(), true); I also tried f1.getInput(), f1.getModelObject() and just about every other FormComponent method. What is the proper way to grab the DropDownChoice selected value? Im using wicket-1.4-SNAPSHOT if that matters. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Validating DropDownChoice
Is it a normal form without AjaxSubmitButton? -Ursprüngliche Nachricht- Von: Chris [mailto:ch...@carlsoncentral.com] Gesendet: Dienstag, 7. April 2009 16:53 An: users@wicket.apache.org Betreff: Validating DropDownChoice I have a DropDownChoice defined as follows. // Model for populating Condition Dropdown IModel conditions = new LoadableDetachableModel() { public Object load() { ListConditions c = new ArrayList(); try { c = dao.getConditions(); } catch (DaoException e) { } return c; } }; // Condition Dropdown DropDownChoice condition = new DropDownChoice(conditions, conditions); ChoiceRenderer choiceRenderer = new ChoiceRenderer(condition, condition); add(new DropDownChoice(name, conditions, choiceRenderer)); Trying to write a custom AbstractFormValidator which makes the DropDownChoice or a TextField required. The problem is in my validate() method the DropDownChoice is always null. public void validate(Form form) { FormComponent f1 = components[0]; String f1Value = Objects.stringValue(f1.getConvertedInput(), true); I also tried f1.getInput(), f1.getModelObject() and just about every other FormComponent method. What is the proper way to grab the DropDownChoice selected value? Im using wicket-1.4-SNAPSHOT if that matters. - 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
YUI Menu2 Examples Broken?
I tried launching the YUI Menu2 stuff today and it looks like the latest changes have broken the YUI menu support. The menus show up as a normal ul/li list. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: authorizing a tab
You could also use one of the two PageTabPanel components we wrote at wicketskunkworks.org which would allow you to secure the content of a tab using normal page authorization. There is not much in the way of docs at the moment but you can check out both components from: http://wicket-skunkworks.googlecode.com/svn/trunk/wicket-pagetabs/ and you can include it in your project using the maven repo. See: http://code.google.com/p/wicket-skunkworks/wiki/MavenRepository - Brill Pappin On 7-Apr-09, at 6:36 AM, Marieke Vandamme wrote: I think I had the same problem a while ago. Look at the solution in discussion underneath: http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-td13949910.html#a13965618 Linda van der Pal wrote: I'm trying to disable a tab in a TabbedPanel based on authorization. I'm using wicket-auth-roles, and it works in other places, for example for buttons. Could anybody tell me what I'm doing wrong? The tab just keeps on showing, and if you click on it you go to a page that states that you don't have authorization for that page. (As I have added an annotation to that page as well.) public class BookDetailsPanel extends Panel { ... public BookDetailsPanel(String id, final String isbn, boolean showEditPanel) { ... List tabs = new ArrayList(); ... tabs.add(new OwnerEditTab(new Model(edit), isbn)); ... } @AuthorizeAction(action = Action.RENDER, roles = { OWNER }) private class OwnerEditTab extends AbstractTab { private static final long serialVersionUID = 1L; private String isbn; public OwnerEditTab(IModel model, String isbn) { super(model); this.isbn = isbn; } @Override public Panel getPanel(String panelId) { return new BookDetailsEditPanel(panelId, isbn); } } } - 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/authorizing-a-tab-tp22925752p22926397.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: Found this in logs: Unable to redirect to: ?wicket:interface=:2:1:::,
most of the time if those things happen you have send something yourself into the buffer somehow/somewhere johan On Sun, Apr 5, 2009 at 20:15, Daniel Toffetti dto...@yahoo.com.ar wrote: Hi all, I've found this exception in the catalina logs: 05/04/2009 14:51:17 org.apache.wicket.protocol.http.WebResponse redirect GRAVE: Unable to redirect to: ?wicket:interface=:2:1:::, HTTP Response has already been committed. 05/04/2009 14:51:17 org.apache.wicket.protocol.http.WicketFilter doGet GRAVE: closing the buffer error java.lang.IllegalStateException at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java :435) at org.apache.wicket.protocol.http.WebResponse.redirect(WebResponse.java:232) at org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse .java:66) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:371) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationF ilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCha in.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.jav a:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.jav a:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http1 1Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) I don't know what caused it, how bad can it be and how to prevent it, any help is appreciated. Thanks, Daniel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket vs Tibco general interface
what do you mean by single click behavior inside the palette? -igor On Mon, Apr 6, 2009 at 9:49 PM, Ying dongy...@gmail.com wrote: Hi, Anyone compare wicket with Tibco General Interface? Tibco's stuff seems very impressive. Also I found it's very difficult to have a more advanced example for each wicket components.API doc and examples only list the very basic one.(ie: I want a single click behavior inside Palette which I still don't find any example ) Any suggestion? Thanks ying - 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: Employ JQuery Accordion in Wicket
Try out wickext ... http://code.google.com/p/wickext/ On Wed, Apr 1, 2009 at 8:30 AM, HHB hubaghd...@yahoo.ca wrote: Hey, My team lead is insisting on employing JQuery Accordion in our Wicket application. As you know that the Accordion consists of pairs of headers and contents panels. The requirement is to hide/show some pairs depending on the user's permission. Is is possible to do so? if yes, would you please give me some clues how to implement it? Thanks for help, this is my first Wicket project and my team lead is putting the heavy weight on my shoulders. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Rodolfo Hansen CEO, KindleIT Software Development Email: rhan...@kindleit.net Office: 1 (809) 732-5200 Mobile: 1 (809) 299-7332
Re: Is localizing parts of the service layer (which is using Spring 2.5) a good idea?
both wicket and spring allow you to customize how text bundles are loaded. you can create a spring bundle loader that uses your webapplication.properties file or a wicket bundle loader that uses your spring bundle. either way you can then have business tier and web share certain text bundles for localization. once that is done, it hardly matters which layer performs localization since they are backed by the same dictionary. -igor On Tue, Apr 7, 2009 at 3:01 AM, Kent Larsson kent.lars...@gmail.com wrote: Hi, This is more of a general design question and I would really appreciate some input. Do you localize the service layer as well as the Wicket presentation layer? I have a specific use case. When a user register a new account the service layer sends an e-mail message with an activation link. This message should be written in a language which the users understands and must thus be localized. I see two options: 1: Localize it using Spring only and don't involve Wicket. That way it will work in case of a user registering an account through a web service (bypassing the Wicket presentation layer). 2: Use localization as you normally would from Wicket and send the message string from the presentation layer to the relevant service layer method (where it is used in the e-mail). Currently no user is supposed to register through a web service invocation. It might change though, but not for quite a while. How would you solve this problem? Best regards, Kent - 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: Radio onBeforeRender funny business?
that is expected since onbeforerender is called before every render. if (!getmarkupid().startswith(getgroup().getmarkupid()) { setmarkupid(getgroup().getmarkupid()+-+getmarkupid()); } -igor On Tue, Apr 7, 2009 at 6:41 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Radio.onBeforeRender: �...@override protected void onBeforeRender() { // prefix markup id of this radio with its group's id // this will make it easier to identify all radios that belong to a specific group setMarkupId(getGroup().getMarkupId() + - + getMarkupId()); super.onBeforeRender(); } The markup id will go wild if the page is rendered multiple times? ** Martin - 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: retrieve value at mouse click in palette
why do you think its such a good idea to post the same question more then once? -igor On Tue, Apr 7, 2009 at 4:51 AM, Ying dongy...@gmail.com wrote: Hi, I try to retrieve the value of highlighted choice in palette by single click. Is there any sample code to do that anywhere? I cannot find anything from google or wicket book. Ying - 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: EmptyAjaxRequestTarget invokes failurescript when link is pressed on page
Please open jira issue - or assign the code you posted to existing one. I'll apply it. -Matej On Tue, Apr 7, 2009 at 3:30 PM, Mikko Pukki mikko.pu...@syncrontech.com wrote: Hi, We just noticed that if user is on a page and ajax request is executing, pressing a link can cause AbstractDefaultAjaxBehavior's failurescript to be executed on the browser. We noticed that this happens at least in cases where pressing a link forwards user to other page by setting a different response page. Content of ajax debug is same as in the jira issue I have posted before (JIRA 1971): INFO: Initiating Ajax POST request on ? wicket:interface=:1:inputForm:back::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=truerandom=0.6741350924814413 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (31 characters) INFO: ajax-response/ajax-response ERROR: Error while parsing response: Could not find root ajax-response element INFO: Invoking post-call handler(s)... Content of the ajax response is problem at least on ie6,ie7,ff2 and ff3. It seems to fail, because xml reply does not contain doctype. This is annoying, because the invoker of the ajax request is in our case inherited from the AbstractAjaxTimerBehavior and we would like to do a page reload in the failurescript in case that request fails so that page would still be updated even if there are some network problems. Now pressing any link that forwards to other pages can force a reload to the page, if some request is already executing. In this particular application this is wery common, partly because of bad network connection from the client's site (request can take some time) and partly because of very frequent ajax requests. We tried to modify org.apache.wicket.request.target.basic.EmptyAjaxRequestTarget's respond method so that it puts doctype to the respond as does the normal ajax target we replaced this: public void respond(RequestCycle requestCycle) { requestCycle.getResponse().write(ajax-response/ajax-response); } with this: public void respond(RequestCycle requestCycle) { final WebResponse response = (WebResponse)requestCycle.getResponse(); final Application app = Application.get(); final String encoding = app.getRequestCycleSettings().getResponseRequestEncoding(); // Set content type based on markup type for page response.setCharacterEncoding(encoding); response.setContentType(text/xml; charset= + encoding); // Make sure it is not cached by a client response.setHeader(Expires, Mon, 26 Jul 1997 05:00:00 GMT); response.setHeader(Cache-Control, no-cache, must-revalidate); response.setHeader(Pragma, no-cache); response.write(?xml version=\1.0\ encoding=\); response.write(encoding); response.write(\?); response.write(ajax-response/ajax-response); } And it works now. Should I open a jira issue for this? Regards, Mikko -- Mikko Pukki Syncron Tech Oy Laserkatu 6 53850 Lappeenranta +358 400 757 178 - 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: Radio onBeforeRender funny business?
ah, thought you posted a snippet from your code. fixed. -igor On Tue, Apr 7, 2009 at 10:09 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: that is expected since onbeforerender is called before every render. if (!getmarkupid().startswith(getgroup().getmarkupid()) { setmarkupid(getgroup().getmarkupid()+-+getmarkupid()); } -igor On Tue, Apr 7, 2009 at 6:41 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Radio.onBeforeRender: �...@override protected void onBeforeRender() { // prefix markup id of this radio with its group's id // this will make it easier to identify all radios that belong to a specific group setMarkupId(getGroup().getMarkupId() + - + getMarkupId()); super.onBeforeRender(); } The markup id will go wild if the page is rendered multiple times? ** Martin - 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: Radio onBeforeRender funny business?
ah, thought you posted a snippet from your code. No, wazn'tme. fixed. It looks like a hack. Wouldn't it be better fixed by overriding public String getMarkupId() ? ** Martin On Tue, Apr 7, 2009 at 10:09 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: that is expected since onbeforerender is called before every render. if (!getmarkupid().startswith(getgroup().getmarkupid()) { setmarkupid(getgroup().getmarkupid()+-+getmarkupid()); } -igor On Tue, Apr 7, 2009 at 6:41 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Radio.onBeforeRender: @Override protected void onBeforeRender() { // prefix markup id of this radio with its group's id // this will make it easier to identify all radios that belong to a specific group setMarkupId(getGroup().getMarkupId() + - + getMarkupId()); super.onBeforeRender(); } The markup id will go wild if the page is rendered multiple times? ** Martin - 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: retrieve value at mouse click in palette
Ying, is an HTML color picker perhaps what you are looking for? Try http://cpicker.com/, I found it to be a good one. Ying-9 wrote: Hi, I try to retrieve the value of highlighted choice in palette by single click. Is there any sample code to do that anywhere? I cannot find anything from google or wicket book. Ying - 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/retrieve-value-at-mouse-click-in-palette-tp22927443p22934528.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: Integrating Wicket + Google Guice + Warp-persistence
No comments? On Tue, Apr 7, 2009 at 10:05 AM, Eduardo Nunes esnu...@gmail.com wrote: Hi there, After a long period of reading, now I'm starting to code my application using these frameworks: Wicket, Google Guice and Warp-persistence. I facet a conceptual problem (IMHO) about how initialize google guice. I read a lot of source codes on the internet and most of them, if not all, initialize Google Guice and Warp-persistence inside the WicketApplication class (extends WebApplication). I think it isn't a good thing, because in the conceptual point of view google guice doesn't have direct relation to wicket. So, I started to find a good solution for this problem. My solution consists in use Google Guice servlet extension. I think that sometimes a source code says more than a thousand words ehehe, below are the pastbin links for all envolved files. What I want from you is a feedback, suggestions, improvements, critics, etc... Files: - web.xml http://pastebin.com/f576189de - GuiceServletContextListener http://pastebin.com/f6a42d811 - WebModule http://pastebin.com/f24a797b - ServiceModule http://pastebin.com/f6e9db66f - PersistenceServiceInitializer http://pastebin.com/f6e4425fd Maybe, and probably, some parts of the pasted source code are based on another projects, blogs posts, etc. Thanks, Eduardo S. Nunes - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket vs Tibco general interface
I think the thread subject indicated my question. The palette question is just an example I encountered when trying to do something with wicket. I have a separate question just for palette. Appreciate any input regarding comparison with Tibco General interface. igor.vaynberg wrote: what do you mean by single click behavior inside the palette? -igor On Mon, Apr 6, 2009 at 9:49 PM, Ying dongy...@gmail.com wrote: Hi, Anyone compare wicket with Tibco General Interface? Tibco's stuff seems very impressive. Also I found it's very difficult to have a more advanced example for each wicket components.API doc and examples only list the very basic one.(ie: I want a single click behavior inside Palette which I still don't find any example ) Any suggestion? Thanks ying - 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://www.nabble.com/wicket-vs-Tibco-general-interface-tp22922988p22935367.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: retrieve value at mouse click in palette
add(new palette(.) { protected component newchoicescomponent() { component choices=super.newchoicescomponent(); choices.add(new ajaxeventbehavior(click) { protected void onevent(ajaxrequettarget t) { // do whatever you need }});}}); -igor On Tue, Apr 7, 2009 at 11:58 AM, yxd0018 ying_d...@ml.com wrote: Don't know whether my previous email was successful or not. Apology if this is duplicate. I want to do same thing as http://www.nabble.com/How-can-I-get-hold-of-a-palette's-selected-item--td2001571 4.html Basically want to use palette and capture value user clicks in the choice list, which hasn't been transferred to selected list yet. I can use the value to query db and pull details over and display details in a form so that user can see what underlying he is choosing. Appreciate if there is any code sample to do that. Sean W wrote: Ying, is an HTML color picker perhaps what you are looking for? Try http://cpicker.com/, I found it to be a good one. Ying-9 wrote: Hi, I try to retrieve the value of highlighted choice in palette by single click. Is there any sample code to do that anywhere? I cannot find anything from google or wicket book. Ying - 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/retrieve-value-at-mouse-click-in-palette-tp22927443p22935377.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: AjaxFallbackDefaultDataTable: redirect to specific page
new link(edit) { onclick() { setresponsepage(new editpage(getpage().getpagereference(), getmodel())); } } class editpage { public editpage(pagereference ref, imodel model) { setresponsepage(ref.getpage()); } } -igor On Tue, Apr 7, 2009 at 12:12 PM, Roman Zechner roman.zech...@liland.at wrote: how can i make sure to get back to the same page of a AjaxFallbackDefaultDataTable that i came from after a redirect? e.g.: 1. i am on page 3 of a table of persons (listpage). 2. i click on a row to edit a person (detailpage). 3. after submitting changes, i redirect to the listpage again, but i land on page 0 instead of page 3 what would be the best approach? roman - 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: AjaxFallbackDefaultDataTable: redirect to specific page
thanks!! Igor Vaynberg wrote: new link(edit) { onclick() { setresponsepage(new editpage(getpage().getpagereference(), getmodel())); } } class editpage { public editpage(pagereference ref, imodel model) { setresponsepage(ref.getpage()); } } -igor On Tue, Apr 7, 2009 at 12:12 PM, Roman Zechner roman.zech...@liland.at wrote: how can i make sure to get back to the same page of a AjaxFallbackDefaultDataTable that i came from after a redirect? e.g.: 1. i am on page 3 of a table of persons (listpage). 2. i click on a row to edit a person (detailpage). 3. after submitting changes, i redirect to the listpage again, but i land on page 0 instead of page 3 what would be the best approach? roman - 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 -- Liland ...does IT better Liland IT GmbH Creative Master email: roman.zech...@liland.at office: +43 (0)463 220-111 | fax: +43 (0)463 220-288 http://www.Liland.at - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Integrating Wicket + Google Guice + Warp-persistence
first! -igor On Tue, Apr 7, 2009 at 10:46 AM, Eduardo Nunes esnu...@gmail.com wrote: No comments? On Tue, Apr 7, 2009 at 10:05 AM, Eduardo Nunes esnu...@gmail.com wrote: Hi there, After a long period of reading, now I'm starting to code my application using these frameworks: Wicket, Google Guice and Warp-persistence. I facet a conceptual problem (IMHO) about how initialize google guice. I read a lot of source codes on the internet and most of them, if not all, initialize Google Guice and Warp-persistence inside the WicketApplication class (extends WebApplication). I think it isn't a good thing, because in the conceptual point of view google guice doesn't have direct relation to wicket. So, I started to find a good solution for this problem. My solution consists in use Google Guice servlet extension. I think that sometimes a source code says more than a thousand words ehehe, below are the pastbin links for all envolved files. What I want from you is a feedback, suggestions, improvements, critics, etc... Files: - web.xml http://pastebin.com/f576189de - GuiceServletContextListener http://pastebin.com/f6a42d811 - WebModule http://pastebin.com/f24a797b - ServiceModule http://pastebin.com/f6e9db66f - PersistenceServiceInitializer http://pastebin.com/f6e4425fd Maybe, and probably, some parts of the pasted source code are based on another projects, blogs posts, etc. Thanks, Eduardo S. Nunes - 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
AjaxFallbackDefaultDataTable: redirect to specific page
how can i make sure to get back to the same page of a AjaxFallbackDefaultDataTable that i came from after a redirect? e.g.: 1. i am on page 3 of a table of persons (listpage). 2. i click on a row to edit a person (detailpage). 3. after submitting changes, i redirect to the listpage again, but i land on page 0 instead of page 3 what would be the best approach? roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Expand/collaspe panel component?
I know that I can write one, but I was looking for a panel that can can expand/collapse if a plus/minus sign is clicked. I will appreciate it if you could point out one. Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: retrieve value at mouse click in palette
Don't know whether my previous email was successful or not. Apology if this is duplicate. I want to do same thing as http://www.nabble.com/How-can-I-get-hold-of-a-palette's-selected-item--td2001571 4.html Basically want to use palette and capture value user clicks in the choice list, which hasn't been transferred to selected list yet. I can use the value to query db and pull details over and display details in a form so that user can see what underlying he is choosing. Appreciate if there is any code sample to do that. Sean W wrote: Ying, is an HTML color picker perhaps what you are looking for? Try http://cpicker.com/, I found it to be a good one. Ying-9 wrote: Hi, I try to retrieve the value of highlighted choice in palette by single click. Is there any sample code to do that anywhere? I cannot find anything from google or wicket book. Ying - 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/retrieve-value-at-mouse-click-in-palette-tp22927443p22935377.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
ModalWindow: What's With the Delay?
Does anyone know what a ModalWindow does after it shows itself? I've got a ModalWindow that shows just fine, but then it takes forever to become responsive (on a page that takes a while to render due to a large-ish table on it). The way I know when it's going to become responsive is when I'm hovering over the little X in the upper right-hand corner, it turns red. When the window first shows, this doesn't happen. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket and (or) restlet
Jonathan, can you elaborate? Why do you think jersey is better? Have you any experience of integrating it with wicket? We use Jersey for REST here, mostly because it is Sun's reference implementation of JAX-RS (and thus will most likely be updated fastest). As for the options: * Restlet: Implemented the REST ideas in a custom way before JAX-RS was specced, spec support seems crowbared in * RestEasy: Is a JBoss project, and there is as always a certain danger of the fish hook that leads you into the rest of the JBoss stack. Now, we are probably going to use JBoss ESB for some service orchestration, but their ESB will not support REST-based services (I think only Mule and ServiceMix do at the moment) until the 5.0 release which is a way off. * CXF: Axis and Xfire had a child, but it might be that it ends up as a bloated mess since they are trying to implement all sorts of services in one library. We do use it for SOAP services though. What you need to be aware of is that the JAX-RS spec is purely server oriented, and each implementation adds its own extension (like client libraries and proxying, content type support, JAXB/JSON magic etc.) so you do run the risk of vendor lock-in whichever you pick. But can you really have vendor lock-in over free stuff? :) Wicket could conceivably be morphed into a top layer to REST services (human-oriented interaction using forms and resource links), but to work seamlessly you probably end up with some very hairy URL coding strategies, resource models etc. that could make wicket-rest break Wicket for ordinary MVC purposes if running in the same webapp... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
WICKET 2178
Hi, I submitted this bug back in March and have not seen any indication that it has been noticed. I was wondering if there is something else I need to do. This issue is preventing us from migrating to 1.3.5 which we would like to do to get the fix for WICKET-1679. Thanks, Steve Katz
Re: retrieve value at mouse click in palette
Also, how could I disable default double click action in palette? Thanks for your code. Appreciate a little more help. How do I get the highlighted object from palette? I have this ListScenarioDefinition choiceList = getAllScenarios(); ListScenarioDefinition selectedChoice = scenarioService.getScenarioByReportId( ); this.palette = new PaletteSerializable( palette, new Model( (Serializable)selectedChoice ) , new Model( (Serializable)choiceList ), renderer, 10, false ) ; In Method onEvent(), however getParent().getDefaultModelObject() throw exception. igor.vaynberg wrote: add(new palette(.) { protected component newchoicescomponent() { component choices=super.newchoicescomponent(); choices.add(new ajaxeventbehavior(click) { protected void onevent(ajaxrequettarget t) { // do whatever you need }});}}); -igor -- View this message in context: http://www.nabble.com/retrieve-value-at-mouse-click-in-palette-tp22927443p22939330.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
Wicket Noob: Long cannot be cast to java.lang.String
Hello Wicket dev, gurus and mortals, I was successfully using Wicket to build the UI for my new web-app gig. I have studied the javadoc: org.apache.wicket.markup.html.form, org.apache.wicket.MarkupContainer and others until bleary-eyed. The web-page I am using will display correctly the values for Long and Integer in a HTML text input dialog but when I try to Save (write the value back to the DB) I get the following error condition. I can only work with String data and nothing else using the wicket ids. Please advise, David. ** org.apache.wicket.WicketRuntimeException: Exception 'java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String' occurred during validation org.apache.wicket.validation.validator.StringValidator$MaximumLengthValidator on component 1:editform:weight at org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510) There are 10 kinds of people in this world: those who understand binary and those who don’t (Valid only for 2's complement). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: retrieve value at mouse click in palette
with a bit of javascript: this.options[this.selectedIndex] which you then append to the generated url. -igor On Tue, Apr 7, 2009 at 2:55 PM, yxd0018 ying_d...@ml.com wrote: Thanks for your code. Appreciate a little more help. How do I get the highlighted object from palette? I have this ListScenarioDefinition choiceList = getAllScenarios(); ListScenarioDefinition selectedChoice = scenarioService.getScenarioByReportId( ); this.palette = new PaletteSerializable( palette, new Model( (Serializable)selectedChoice ) , new Model( (Serializable)choiceList ), renderer, 10, false ) ; In Method onEvent(), however getParent().getDefaultModelObject() throw exception. add(new palette(.) { protected component newchoicescomponent() { component choices=super.newchoicescomponent(); choices.add(new ajaxeventbehavior(click) { protected void onevent(ajaxrequettarget t) { // do whatever you need }});}}); -igor -- View this message in context: http://www.nabble.com/retrieve-value-at-mouse-click-in-palette-tp22927443p22939123.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: retrieve value at mouse click in palette
component choices=super.newchoicescomponent() { oncomponenttag(tag) { super.oncomponenttag(tag); tag.getattributes().remove(ondblclick); } } -igor On Tue, Apr 7, 2009 at 3:10 PM, yxd0018 ying_d...@ml.com wrote: Also, how could I disable default double click action in palette? Thanks for your code. Appreciate a little more help. How do I get the highlighted object from palette? I have this ListScenarioDefinition choiceList = getAllScenarios(); ListScenarioDefinition selectedChoice = scenarioService.getScenarioByReportId( ); this.palette = new PaletteSerializable( palette, new Model( (Serializable)selectedChoice ) , new Model( (Serializable)choiceList ), renderer, 10, false ) ; In Method onEvent(), however getParent().getDefaultModelObject() throw exception. igor.vaynberg wrote: add(new palette(.) { protected component newchoicescomponent() { component choices=super.newchoicescomponent(); choices.add(new ajaxeventbehavior(click) { protected void onevent(ajaxrequettarget t) { // do whatever you need }});}}); -igor -- View this message in context: http://www.nabble.com/retrieve-value-at-mouse-click-in-palette-tp22927443p22939330.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: Wicket Noob: Long cannot be cast to java.lang.String
textfield.settype(Long.class) -igor On Tue, Apr 7, 2009 at 4:15 PM, David Brown dbr...@sexingtechnologies.com wrote: Hello Wicket dev, gurus and mortals, I was successfully using Wicket to build the UI for my new web-app gig. I have studied the javadoc: org.apache.wicket.markup.html.form, org.apache.wicket.MarkupContainer and others until bleary-eyed. The web-page I am using will display correctly the values for Long and Integer in a HTML text input dialog but when I try to Save (write the value back to the DB) I get the following error condition. I can only work with String data and nothing else using the wicket ids. Please advise, David. ** org.apache.wicket.WicketRuntimeException: Exception 'java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String' occurred during validation org.apache.wicket.validation.validator.StringValidator$MaximumLengthValidator on component 1:editform:weight at org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510) There are 10 kinds of people in this world: those who understand binary and those who don’t (Valid only for 2's complement). - 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: Wicket Noob: Long cannot be cast to java.lang.String
You seem to have a String validator on a number field. What do you want to test a range? Or max value of that long? Use a different validor On 08/04/2009, David Brown dbr...@sexingtechnologies.com wrote: Hello Wicket dev, gurus and mortals, I was successfully using Wicket to build the UI for my new web-app gig. I have studied the javadoc: org.apache.wicket.markup.html.form, org.apache.wicket.MarkupContainer and others until bleary-eyed. The web-page I am using will display correctly the values for Long and Integer in a HTML text input dialog but when I try to Save (write the value back to the DB) I get the following error condition. I can only work with String data and nothing else using the wicket ids. Please advise, David. ** org.apache.wicket.WicketRuntimeException: Exception 'java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String' occurred during validation org.apache.wicket.validation.validator.StringValidator$MaximumLengthValidator on component 1:editform:weight at org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510) There are 10 kinds of people in this world: those who understand binary and those who don’t (Valid only for 2's complement). - 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
id attribute of Component Tag in renderHead?
Within a component's renderHead method is it possible to get the value of the id attribute for the component tag? For instance, I have: div wicket:id=multi id=boo/div And within renderHead if I use getMarkupId() I get multi1 back, if I use getMarkupId(false) I get null. The JavaDoc for renderHead indicates: either the id attribute set explicitly via a call to setMarkupId(String), id attribute defined in the markup, or an automatically generated id - in that order It doesn't seem to be behaving as described. Is this a bug? Or am I misinterpreting things? Thanks, Craig. -- Craig Tataryn site: http://www.basementcoders.com/ podcast:http://feeds.feedburner.com/TheBasementCoders irc: ThaDon on freenode #basementcoders, ##wicket twitter: craiger - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: retrieve value at mouse click in palette
I have no idea about JS, where is the generated url? Could U post some sample code pls? Appreciate very much. igor.vaynberg wrote: with a bit of javascript: this.options[this.selectedIndex] which you then append to the generated url. -igor On Tue, Apr 7, 2009 at 2:55 PM, yxd0018 ying_d...@ml.com wrote: Thanks for your code. Appreciate a little more help. How do I get the highlighted object from palette? I have this ListScenarioDefinition choiceList = getAllScenarios(); ListScenarioDefinition selectedChoice = scenarioService.getScenarioByReportId( ); this.palette = new PaletteSerializable( palette, new Model( (Serializable)selectedChoice ) , new Model( (Serializable)choiceList ), renderer, 10, false ) ; In Method onEvent(), however getParent().getDefaultModelObject() throw exception. add(new palette(.) { protected component newchoicescomponent() { component choices=super.newchoicescomponent(); choices.add(new ajaxeventbehavior(click) { protected void onevent(ajaxrequettarget t) { // do whatever you need }});}}); -igor -- View this message in context: http://www.nabble.com/retrieve-value-at-mouse-click-in-palette-tp22927443p22939123.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 -- View this message in context: http://www.nabble.com/retrieve-value-at-mouse-click-in-palette-tp22927443p22941590.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: id attribute of Component Tag in renderHead?
FYI, the only way I can seem to get the id value within renderHead is to use Component's getMarkupAttributes(), but the JavaDoc tells me not to use this method as it's supposed to be used by Wicket internally only. And they use capital letters too when telling me this. What to do, what to do... On 7-Apr-09, at 7:34 PM, Craig Tataryn wrote: Within a component's renderHead method is it possible to get the value of the id attribute for the component tag? For instance, I have: div wicket:id=multi id=boo/div And within renderHead if I use getMarkupId() I get multi1 back, if I use getMarkupId(false) I get null. The JavaDoc for renderHead indicates: either the id attribute set explicitly via a call to setMarkupId(String), id attribute defined in the markup, or an automatically generated id - in that order It doesn't seem to be behaving as described. Is this a bug? Or am I misinterpreting things? Thanks, Craig. -- Craig Tataryn site: http://www.basementcoders.com/ podcast:http://feeds.feedburner.com/TheBasementCoders irc: ThaDon on freenode #basementcoders, ##wicket twitter: craiger - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org