Re: Example of wicketstuff-minis' Veil
should be fixed, noticed i fixed the version, it is now 1.3-snap instead of 1.3.0-snap -igor On Wed, Jun 11, 2008 at 11:53 AM, nitinkc [EMAIL PROTECTED] wrote: Igor, Any updates on this?? thanks! nitinkc wrote: Here is the stack trace: Root cause:java.lang.IllegalStateException: This behavior is already bound to component. An instance of this behavior cannot be reused between components. Bound component: [MarkupContainer [Component id = test, page = No Page, path = test.Button]] at org.wicketstuff.minis.veil.Veil.bind(Veil.java:64) at org.apache.wicket.Component.add(Component.java:922) at com.uprr.app.hrw.wicket.page.scheduling.EventDetailsPage.init(EventDetailsPage.java:235) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:262) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at weblogic.work.ExecuteThread.run(ExecuteThread.java:172) I am using: wicketstuff-minis-1.3.0-SNAPSHOT.jar igor.vaynberg wrote: can you paste the stack trace please? are you using latest trunk? -igor On Tue, Jun 3, 2008 at 6:38 AM, nitinkc [EMAIL PROTECTED] wrote: I need an example of wicketstuff-minis' veil behavior. I added this to one of my components but keep getting the error that the behavior is already bound to another component and cannot be reused. All I am doing is: Button button = new Button(test); button.add(new Veil()); form.add(button); This is the only Veil I am using on my page. Thanks. -- View this message in context: http://www.nabble.com/Example-of-wicketstuff-minis%27-Veil-tp17623741p17623741.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Example-of-wicketstuff-minis%27-Veil-tp17623741p17784653.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Example of wicketstuff-minis' Veil
great! :) Igor Vaynberg wrote: should be fixed, noticed i fixed the version, it is now 1.3-snap instead of 1.3.0-snap -igor On Wed, Jun 11, 2008 at 11:53 AM, nitinkc [EMAIL PROTECTED] wrote: Igor, Any updates on this?? thanks! nitinkc wrote: Here is the stack trace: Root cause:java.lang.IllegalStateException: This behavior is already bound to component. An instance of this behavior cannot be reused between components. Bound component: [MarkupContainer [Component id = test, page = No Page, path = test.Button]] at org.wicketstuff.minis.veil.Veil.bind(Veil.java:64) at org.apache.wicket.Component.add(Component.java:922) at com.uprr.app.hrw.wicket.page.scheduling.EventDetailsPage.init(EventDetailsPage.java:235) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:262) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at weblogic.work.ExecuteThread.run(ExecuteThread.java:172) I am using: wicketstuff-minis-1.3.0-SNAPSHOT.jar igor.vaynberg wrote: can you paste the stack trace please? are you using latest trunk? -igor On Tue, Jun 3, 2008 at 6:38 AM, nitinkc [EMAIL PROTECTED] wrote: I need an example of wicketstuff-minis' veil behavior. I added this to one of my components but keep getting the error that the behavior is already bound to another component and cannot be reused. All I am doing is: Button button = new Button(test); button.add(new Veil()); form.add(button); This is the only Veil I am using on my page. Thanks. -- View this message in context: http://www.nabble.com/Example-of-wicketstuff-minis%27-Veil-tp17623741p17623741.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Example-of-wicketstuff-minis%27-Veil-tp17623741p17784653.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
modal window with iframe - ajax refresh on parent page
I have a webpage with a div element. In the div element is a table, so I can refresh the table via ajax. Also there is a modal window, on which a iFrame is inside. After closing the modal window, I like to refresh the table in the div element in the parent page. Therefore I use the callback functions and the addComponent method , but there is a message: org.apache.wicket.RequestListenerInterface - component not enabled or visible; ignoring call. Component: [MarkupContainer [Component id = upload, page = controller.dms.DmsMainPage, path = 5:modalWindow:content:upload.InlineFrame, isVisible = true, isVersioned = false]]. It seems that wicket has his focus still in the iFrame Site, not in parent site. Any suggestions how to solve the problem. -- View this message in context: http://www.nabble.com/modal-window-with-iframe---ajax-refresh-on-parent-page-tp17816849p17816849.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Panels in a panel
Hi, I have designed a panel of form text fields which I would like to repeat in a panel of form. Here is the code: EmptyForm.java public class EmptyForm extends Form { private final ValueMap properties = new ValueMap(); public EmptyForm(final String id) { super(id); } public void addFormComponent( FormComponent formComponent) { add(formComponent); } public ValueMap getValueMap() { return properties; } public final void onSubmit() { // some stuff } } EmptyFormPanel.java public class EmptyFormPanel extends Panel { private EmptyForm emptyForm; private ValueMap valueMap; /** * @see org.apache.wicket.Component#Component(String) */ public EmptyFormPanel(final String id) { super(id); emptyForm = new EmptyForm(emptyForm); valueMap = emptyForm.getValueMap(); add(emptyForm); ListTextFieldBean textFields = new ArrayListTextFieldBean(); textFields.add(new TextFieldBean(User Name, userName)); textFields.add(new TextFieldBean(Password, password)); ListView formTextFieldPanels = new ListView( formTextFieldPanels , textFields) { protected void populateItem(ListItem item) { TextFieldBean textFieldBean = (TextFieldBean) item.getModelObject(); FormTextFieldPanel formTextFieldPanel = new FormTextFieldPanel(formTextFieldPanels); //item.add(formTextFieldPanel); formTextFieldPanel.addItem(emptyForm, item, textFieldBean, valueMap); //emptyForm.add(formTextFieldPanel); } }; add(formTextFieldPanels); } public EmptyForm getEmptyForm() { return emptyForm; } public ValueMap getValueMap() { return valueMap; } } EmptyFormPanel.html html xmlns:wicket body wicket:panel wicket:id=emptyFormPanels form wicket:id=emptyForm table div wicket:id=formTextFieldPanels/div tr td/td td input type=submit name=submit value=Sign In/ input type=reset value=Reset/ /td /tr /table /form /wicket:panel /body /html FormTextFieldPanel.java public class FormTextFieldPanel extends Panel { public FormTextFieldPanel(String id) { super(id); } public void addItem( EmptyForm emptyForm, ListItem item, TextFieldBean textFieldBean, ValueMap valueMap) { item.add(new Label(fieldNameLabel, textFieldBean.getFieldName())); item.add(new TextField(fieldId, new PropertyModel(valueMap, textFieldBean.getFieldId(; //emptyForm.add(item); } } FormTextFieldPanel.html html xmlns:wicket body wicket:panel id=formTextFieldPanels tr td align=right wicket:id=fieldNameLabelfieldName/td td input wicket:id=fieldId type=text value=[EMAIL PROTECTED] size=30/ /td /tr /wicket:panel /body /html I would like FormTextFieldPanel to repeat inside EmptyFormPanel My problem is with formTextFieldPanels component. If I use emptyForm.add(formTextFieldPanel); then I get the error message that formTextFieldPanels is being repeated ( a component by this name already exists) If I don't use it then I get the error message that this component is missing. Can some one please tell me what will be the right way to handle this. I tried to do search for this and it seems that there is a way of doing this by using RepeaterView. If so then please let me know how. Thank you
Re: Panels in a panel
use a listview,propertylistview or repeater... Differences are: listview: iterates over a list propertylistviw:-||- and bound the item.model via a compound model, very usefull if you use compound models a lot. repeater: repeats for int times, as I remember it.. m_salman wrote: Hi, I have designed a panel of form text fields which I would like to repeat in a panel of form. Here is the code: EmptyForm.java public class EmptyForm extends Form { private final ValueMap properties = new ValueMap(); public EmptyForm(final String id) { super(id); } public void addFormComponent( FormComponent formComponent) { add(formComponent); } public ValueMap getValueMap() { return properties; } public final void onSubmit() { // some stuff } } EmptyFormPanel.java public class EmptyFormPanel extends Panel { private EmptyForm emptyForm; private ValueMap valueMap; /** * @see org.apache.wicket.Component#Component(String) */ public EmptyFormPanel(final String id) { super(id); emptyForm = new EmptyForm(emptyForm); valueMap = emptyForm.getValueMap(); add(emptyForm); ListTextFieldBean textFields = new ArrayListTextFieldBean(); textFields.add(new TextFieldBean(User Name, userName)); textFields.add(new TextFieldBean(Password, password)); ListView formTextFieldPanels = new ListView( formTextFieldPanels , textFields) { protected void populateItem(ListItem item) { TextFieldBean textFieldBean = (TextFieldBean) item.getModelObject(); FormTextFieldPanel formTextFieldPanel = new FormTextFieldPanel(formTextFieldPanels); //item.add(formTextFieldPanel); formTextFieldPanel.addItem(emptyForm, item, textFieldBean, valueMap); //emptyForm.add(formTextFieldPanel); } }; add(formTextFieldPanels); } public EmptyForm getEmptyForm() { return emptyForm; } public ValueMap getValueMap() { return valueMap; } } EmptyFormPanel.html html xmlns:wicket body wicket:panel wicket:id=emptyFormPanels form wicket:id=emptyForm table div wicket:id=formTextFieldPanels/div tr td/td td input type=submit name=submit value=Sign In/ input type=reset value=Reset/ /td /tr /table /form /wicket:panel /body /html FormTextFieldPanel.java public class FormTextFieldPanel extends Panel { public FormTextFieldPanel(String id) { super(id); } public void addItem( EmptyForm emptyForm, ListItem item, TextFieldBean textFieldBean, ValueMap valueMap) { item.add(new Label(fieldNameLabel, textFieldBean.getFieldName())); item.add(new TextField(fieldId, new PropertyModel(valueMap, textFieldBean.getFieldId(; //emptyForm.add(item); } } FormTextFieldPanel.html html xmlns:wicket body wicket:panel id=formTextFieldPanels tr td align=right wicket:id=fieldNameLabelfieldName/td td input wicket:id=fieldId type=text value=[EMAIL PROTECTED] size=30/ /td /tr /wicket:panel /body /html I would like FormTextFieldPanel to repeat inside EmptyFormPanel My problem is with formTextFieldPanels component. If I use emptyForm.add(formTextFieldPanel); then I get the error message that formTextFieldPanels is being repeated ( a component by this name already exists) If I don't use it then I get
any terracotta users here?
Hi Is there anyone using terracotta for session clustering with about 2000 active sessions at any one time? If so are you experiencing any problems on your terracotta server as described here: http://forums.terracotta.org/forums/posts/list/1144.page Basically there is loads of garbage being created and the terracotta garbage collector cannot keep up, I'm curious to see if any other wicket users are using terracotta with the same sort of load and experiencing similar problems, or if everything is working fine. Thanks, Richard -- View this message in context: http://www.nabble.com/any-terracotta-users-here--tp17819194p17819194.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot get rid of these error and warnings
[1] I get these kind of errors quite often: there was an error cleaning up target [EMAIL PROTECTED] markupIdToComponent any idea what causes them? [i'm guessing it's a panel that gets updated to often for my server - 10s, lots of clients, but that's just a guess]. [2] And this keeps on bothering me (but not as much): Couldn't resolve model type of Model:classname=[org.apache.wicket.model.PropertyModel]:nestedModel=[]:expression=[user] for [MarkupContainer [Component id = User, page = com.foreverpizza.core.HomePage, path = 0:signInForm:User.RequiredTextField, isVisible = true, isVersioned = false]], please set the type yourself. How can I set this myself? I never got this warning before 1.3.3. Thanks, Cristi Manole
Re: The component(s) below failed to render
No, i've added the dropdownchoice to the markup and did not forgot. My problem is a little bit more complex. with wicket web beans you can't display a bean, that has a relation to an another bean. This relationed bean is showed with all attributes. But i Only wan't one or two, like 'name'. So What i've tried was to remove first the relationed attribut from the bean, then create a BeanForm, and then add my special DropDownChoice to this created BeanForm. But because using the wicket templates, adding an own Componte doesn't realy work. Did you understand the problem? chears Michael greeklinux wrote: Do you add the DropDownChoice to the markup and forgott the wicket id? Michael_Bo wrote: Hi, i have a problem with some Components. I'm using Wicket Web beans. If tried to add an additional form to a beanFrom. Then I get The following Error: WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = beanRForm, page = metaWicket.EditPage, path = 2:beanForm:beanRForm.TkDataBeanEditPanel$TkbeanForm, isVisible = true, isVersioned = true]] 2. [MarkupContainer [Component id = beanDropDown, page = metaWicket.EditPage, path = 2:beanForm:beanRForm:beanDropDown.DropDownChoice, isVisible = true, isVersioned = false]] Root cause: org.apache.wicket.WicketRuntimeException: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = beanRForm, page = metaWicket.EditPage, path = 2:beanForm:beanRForm.TkDataBeanEditPanel$TkbeanForm, isVisible = true, isVersioned = true]] 2. [MarkupContainer [Component id = beanDropDown, page = metaWicket.EditPage, path = 2:beanForm:beanRForm:beanDropDown.DropDownChoice, isVisible = true, isVersioned = false]] at org.apache.wicket.Page.checkRendering(Page.java:1116) at org.apache.wicket.Page.renderPage(Page.java:914) at org.apache.wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:163) at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:58) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:295) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) What I want is an Additional Dropdownchoice in my beanFrom because the beanFrom gets its field from a Bean. I don't really know in what .html file I have to put this additional Bean chears Michael -- View this message in context: http://www.nabble.com/The-component%28s%29-below-failed-to-render-tp17803377p17821002.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validation message
I try to validate component by using setRequired(). and I would like to define the feedback messages in application level properties file. For example, the application structure is like myApplication -basePage -myPage extends basePage -myForm -myTextField I tried to overwrite the default message in myApplication.properties like: myPage.myForm.myTextField.Required = something is missing But it is not succeful. I don't know whether I do something wrong or I have to set up something in myApplication? Thanks. -- View this message in context: http://www.nabble.com/validation-message-tp17821088p17821088.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PasswordTextField model?
Actually the example does set a model for the password field. As shown in this snippet. //Set compound model on the form, inputfields will use that model too. super(id, new CompoundPropertyModel(new ValueMap())); // only remember username, not passwords add(new TextField(username).setPersistent(rememberMe).setOutputMarkupId(false)); add(new PasswordTextField(password).setOutputMarkupId(false)); add(new CheckBox(rememberMe, new PropertyModel(this, rememberMe))); I added an extra comment to show this more clearly :). As for the message you are receiving when running from glasshfish, i don't know why you are getting that, i don't remember seeing it when running from tomcat. but as stated you could try add(new PasswordTextField(password).setType(String.class).setOutputMarkupId(false)); Maurice On Fri, Jun 13, 2008 at 2:07 AM, Igor Vaynberg [EMAIL PROTECTED] wrote: no, you dont typically initialize the field. but you do want to retrieve the result right? so you need to give the field a model. wicket might not call model.getobject() on it, but it will call model.setobject() when the form is submitted. models do not contain data for markup, but for components. -igor On Thu, Jun 12, 2008 at 3:04 PM, David Nedrow [EMAIL PROTECTED] wrote: Given the following from the wicket security quickstart (1.3-SNAPSHOT)... add(new PasswordTextField(password).setOutputMarkupId(false)); glassfish generates the following message Couldn't resolve model type of Model:classname=[org.apache.wicket.model.CompoundPropertyModel$AttachedCompoundPropertyModel]:nestedModel=[Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[username = regular]] for [MarkupContainer [Component id = password, page = com.vzbi.ncs.argfrp.webapp.FilterRequest.app.LoginPage, path = 0:signInPanel:signInForm:password.PasswordTextField, isVisible = true, isVersioned = false]], please set the type yourself. Not setting the model does not seem to create a problem, but it would seem that the system would prefer that models be set where applicable. Is that the case? I have to admit, I'm a little anal about clearing all warnings in my apps. What would an appropriate model be for the above PasswordTextField()? Models seem to be the most poorly exampled Wicket feature, in that examples of Models rarely tell one why they are needed and what role they perform. It's generally, here's an example to make your code work. Clearly, in most cases the model contains the data for the markup. But what would that data be for a PasswordTextField()? One isn't normally going to pre-fill a password field, correct? Thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem on resolving images path
My webapplication is mapped under /myApplication context. If I inserted in the html a normal image with the source img/myimg.gif (for example img/myimg.gif ) wicket change the source in ../img/myimg.gif and so the image doesn't appair. I have the same problem for all elements: images, css and so on... I found a little workaround using: mountBookmarkablePage(/home, getHomePage()); but I do that for all pages... I think the problem is that wicket doesn't understood the correct application name and, when try to resolve path add ... There is a way to solve this problem? There is a way to FORCE the application name or overriding this resolution system? Thank you very much Daniele -- View this message in context: http://www.nabble.com/Problem-on-resolving-images-path-tp17821781p17821781.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The component(s) below failed to render
In WWB, if you want the related bean to only show certain attributes, you can put something like: YourBean { ... props: name, -someOtherAttribute, ...; ... } in your beanprops file. This will remove someOtherAttribute from your view. Does that help? -Dan On Fri, Jun 13, 2008 at 6:02 AM, Michael_Bo [EMAIL PROTECTED] wrote: No, i've added the dropdownchoice to the markup and did not forgot. My problem is a little bit more complex. with wicket web beans you can't display a bean, that has a relation to an another bean. This relationed bean is showed with all attributes. But i Only wan't one or two, like 'name'. So What i've tried was to remove first the relationed attribut from the bean, then create a BeanForm, and then add my special DropDownChoice to this created BeanForm. But because using the wicket templates, adding an own Componte doesn't realy work. Did you understand the problem? chears Michael greeklinux wrote: Do you add the DropDownChoice to the markup and forgott the wicket id? Michael_Bo wrote: Hi, i have a problem with some Components. I'm using Wicket Web beans. If tried to add an additional form to a beanFrom. Then I get The following Error: WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = beanRForm, page = metaWicket.EditPage, path = 2:beanForm:beanRForm.TkDataBeanEditPanel$TkbeanForm, isVisible = true, isVersioned = true]] 2. [MarkupContainer [Component id = beanDropDown, page = metaWicket.EditPage, path = 2:beanForm:beanRForm:beanDropDown.DropDownChoice, isVisible = true, isVersioned = false]] Root cause: org.apache.wicket.WicketRuntimeException: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = beanRForm, page = metaWicket.EditPage, path = 2:beanForm:beanRForm.TkDataBeanEditPanel$TkbeanForm, isVisible = true, isVersioned = true]] 2. [MarkupContainer [Component id = beanDropDown, page = metaWicket.EditPage, path = 2:beanForm:beanRForm:beanDropDown.DropDownChoice, isVisible = true, isVersioned = false]] at org.apache.wicket.Page.checkRendering(Page.java:1116) at org.apache.wicket.Page.renderPage(Page.java:914) at org.apache.wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:163) at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:58) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:295) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) What I want is an Additional Dropdownchoice in my beanFrom because the beanFrom gets its field from a Bean. I don't really know in what .html file I have to put this additional Bean chears Michael -- View this message in context: http://www.nabble.com/The-component%28s%29-below-failed-to-render-tp17803377p17821002.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL
Plural and singular messages
I frequently need to deal with singular and plural versions of wicket:message's. I would like to do something like: add(new Label(links, new PluralStringResourceModel(link, this) { @Override public boolean isPlural() { return /* some code like: */ model.getObject().getChildren().size() 1; } })); and this will use link.plural if isPlural() returns true and link otherwise. Has anybody found an elegant solution for such situations? P.S. Here is a working implementation (neither efficient nor elegant) for the above approach: add(new Label(link, new StringResourceModel(link${plural}, this, new ModelSerializable() { @Override public Serializable getObject() { return new Serializable() { public String getPlural() { return model.getObject().getChildren().size() 1 ? .plural : ; } }; } }))); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Plural and singular messages
The StringResourceModel uses MessageFormat patterns, so you could try using a ChoiceFormat-based pattern. Try this out in a main method somewhere to get an idea of what happens: final String pattern = {0,choice,0#none|1#one|2#couple|2many}; System.out.println(MessageFormat.format(pattern, 0)); System.out.println(MessageFormat.format(pattern, 1)); System.out.println(MessageFormat.format(pattern, 2)); System.out.println(MessageFormat.format(pattern, 100)); On Fri, Jun 13, 2008 at 9:22 AM, Kaspar Fischer [EMAIL PROTECTED] wrote: I frequently need to deal with singular and plural versions of wicket:message's. I would like to do something like: add(new Label(links, new PluralStringResourceModel(link, this) { @Override public boolean isPlural() { return /* some code like: */ model.getObject().getChildren().size() 1; } })); and this will use link.plural if isPlural() returns true and link otherwise. Has anybody found an elegant solution for such situations? P.S. Here is a working implementation (neither efficient nor elegant) for the above approach: add(new Label(link, new StringResourceModel(link${plural}, this, new ModelSerializable() { @Override public Serializable getObject() { return new Serializable() { public String getPlural() { return model.getObject().getChildren().size() 1 ? .plural : ; } }; } }))); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket portles in Sun Portal
To dig up this old thread: I now use Ate Douma's patch for JSR-286 support from https://issues.apache.org/jira/browse/WICKET-1620 which has removed the need for the portal to implement the Apache portlet bridge's two interfaces. A small step for man etc. :) There now is an issue - the same I had in JBoss - that it seems the bridge has a bug where the WicketFilterPortletContext call to ServletPortletSessionProxy.createProxy(filterRequestContext.getRequest() ) places a Double into the window-id propery that later will be cast to String... Are there plans to completely disconnect the Wicket portlet impl. from the bridge (i.e. including this dependency to ServletPortletSessionProxy)? - Tor Iver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Modifying QuickStart to serve static content in embedded Jetty (was: RE: Tomcat 5.5.9 isn't running Quickstart)
OK, I did some experiments starting with a clean quicksort project. The images did appear. However, when I modified the web.xml to change from: filter-mapping filter-namewicket.myproject/filter-name url-pattern/*/url-pattern /filter-mapping to this: filter-mapping filter-namewicket.myproject/filter-name url-pattern/test/*/url-pattern /filter-mapping then the image no longer appeared. In Wicket 1.2 I could define to Wicket applications in the same .war file, giving them different URLs. I assumed that in Wicket 1.3 I could simply define two filters in my web.xml, using different filter mappings to distinguish the URLs, but changing the URL like this is clearly not appropriate. What, then, is the proper way in Wicket 1.3 to define multiple Wicket applications -- i.e., different home-pages? Or was my original plan sound, provided I add something (what?) to my web.xml for the default URL that is used when linking static resources? -Original Message- From: Martijn Dashorst [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2008 9:11 AM To: users@wicket.apache.org Subject: Re: Modifying QuickStart to serve static content in embedded Jetty (was: RE: Tomcat 5.5.9 isn't running Quickstart) No, because the JSP servlet is needed to compile JSPs into servlet code. An unmodified configuration generated by the Wicket quickstart on our website serves static images perfectly well. You really are doing something funky. Martijn On Thu, Jun 12, 2008 at 4:07 PM, Frank Silbermann [EMAIL PROTECTED] wrote: Yes, the QuickStart itself works. As for your ability to serve images, it might depend whether these are images stored with the .html and .java files for Wicket to pick up, versus images that are stored as static objects. I googled the INFO - log warning - NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet and found http://code.google.com/p/run-jetty-run/wiki/GettingStarted about running Wicket projects with Jetty in Eclipse. It contains the following comments: Comment by angelo.mariano, Jan 02, 2008 When I try to launch it, I get the following error: 2008-01-02 10:11:55.191::INFO: Logging to STDERR via org.mortbay.log.StdErrLog? 2008-01-02 10:11:55.300::INFO: jetty-6.1.6 2008-01-02 10:11:55.441::INFO: NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet? 2008-01-02 10:11:55.659:/:INFO: default: init 2008-01-02 10:11:55.659:/:INFO: jsp: init 2008-01-02 10:11:55.691::INFO: Started [EMAIL PROTECTED]:8080 and then I am not able to compile jsp. Do you know how to solve this problem? Thank you Comment by eelco.hillenius, Jan 02, 2008 Ah, I probably have to include the appropriate libs to turn JSP support on. Could you please file a ticket? I'll get to it shortly. Eelco, could that discussion have anything to do with my problem? -Original Message- From: Martijn Dashorst [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2008 1:23 AM To: users@wicket.apache.org Subject: Re: Tomcat 5.5.9 isn't running Quickstart The quickstart works for me without modifications. It serves images, etc. out of the box, every time. Martijn On Thu, Jun 12, 2008 at 12:54 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Searching for some clue as to why my modification of the QuickStart application is serving images when run in Tomcat but not when running in embedded Jetty via Eclipse, I found: http://osdir.com/ml/java.jetty.support/2003-03/msg00045.html -- titled Re: Re: jetty can't find images: msg#00045 It says, You need the webdefaults file because it sets up the Default servlet which is what serves static resources like images. You can also manually add the Default servlet if you want to avoid a webdefaults.xml file. I think this is a clue. Looking at the console log when running Jetty in Eclipse I see: INFO - log- NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet So what do I need to do to make it set up the Default servlet? Is there a line I need to insert into Start.java to make it read the webdefaults.xml file? I don't even have a webdefaults.xml file -- unless it's buried somewhere inside one of the Jetty jars. Here's the complete console log when debugging Start.java to bring up Jetty (as demonstrated in http://herebebeasties.com/2007-10-07/wicket-quickstart/). INFO - log- Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP INFO - log- jetty-6.1.4 INFO - log- NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet INFO - log- No Transaction manager found - if your webapp requires one, please configure one. INFO - Application- [TestApplication] init:
Re: Plural and singular messages
Thanks a lot, James. I attach a simple class that makes it a little easier to work with such messages. On 13.06.2008, at 15:38, James Carman wrote: The StringResourceModel uses MessageFormat patterns, so you could try using a ChoiceFormat-based pattern. Try this out in a main method somewhere to get an idea of what happens: final String pattern = {0,choice,0#none|1#one|2#couple|2many}; System.out.println(MessageFormat.format(pattern, 0)); System.out.println(MessageFormat.format(pattern, 1)); System.out.println(MessageFormat.format(pattern, 2)); System.out.println(MessageFormat.format(pattern, 100)); On Fri, Jun 13, 2008 at 9:22 AM, Kaspar Fischer [EMAIL PROTECTED] wrote: I frequently need to deal with singular and plural versions of wicket:message's. I would like to do something like: add(new Label(links, new PluralStringResourceModel(link, this) { @Override public boolean isPlural() { return /* some code like: */ model.getObject().getChildren().size() 1; } })); and this will use link.plural if isPlural() returns true and link otherwise. Has anybody found an elegant solution for such situations? P.S. Here is a working implementation (neither efficient nor elegant) for the above approach: add(new Label(link, new StringResourceModel(link${plural}, this, new ModelSerializable() { @Override public Serializable getObject() { return new Serializable() { public String getPlural() { return model.getObject().getChildren().size() 1 ? .plural : ; } }; } }))); /** * A simple wrapper around StringResourceModel to facilitate working with singular, plural, and * similar messages. * p * In the simplest case, you have a property ttwebsite=Website{0,choice,0#|1lt;s}/tt and * create a label like this: * codenew LabelString(website, new StringResourceModelWithCount(website, this) { public int getCount() { return size; } })/code. * * @author hbf * */ public abstract class StringResourceModelWithCount extends StringResourceModel { /** * See [EMAIL PROTECTED] StringResourceModel#StringResourceModel()}. * * @param resourceKey * @param component * @param model */ public StringResourceModelWithCount(String resourceKey, Component? component, IModel? model) { // Construct super(resourceKey, component, model, new Object[] { new CountExecuter() }); // Initialize ((CountExecuter) getParameters()[0]).target = this; } /** * Shorthand for codeStringResourceModelWithCount(resourceKey, component, null)/code. * * @param resourceKey * @param component * @param model */ public StringResourceModelWithCount(String resourceKey, Component? component) { this(resourceKey, component, null); } /** * Subclasses should override this to return the number of items. * * @return */ public abstract int getCount(); /** * Helper class needed to make the actual call to [EMAIL PROTECTED] StringResourceModelWithCount#getCount()}. * (It is needed because in StringResourceModelWithCount's call codesuper(...)/code as we * cannot reference the non-static method getCount() during construction.) */ private static class CountExecuter extends ModelInteger { private StringResourceModelWithCount target; @Override public Integer getObject() { return target.getCount(); } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Plural and singular messages
I think you're doing a bit too much work here. StringResourceModel allows you to pass in IModel objects as its parameters (check the javadocs), so you could pass in an IModel that returns your size parameter that is calculated at runtime. On Fri, Jun 13, 2008 at 10:39 AM, Kaspar Fischer [EMAIL PROTECTED] wrote: Thanks a lot, James. I attach a simple class that makes it a little easier to work with such messages. On 13.06.2008, at 15:38, James Carman wrote: The StringResourceModel uses MessageFormat patterns, so you could try using a ChoiceFormat-based pattern. Try this out in a main method somewhere to get an idea of what happens: final String pattern = {0,choice,0#none|1#one|2#couple|2many}; System.out.println(MessageFormat.format(pattern, 0)); System.out.println(MessageFormat.format(pattern, 1)); System.out.println(MessageFormat.format(pattern, 2)); System.out.println(MessageFormat.format(pattern, 100)); On Fri, Jun 13, 2008 at 9:22 AM, Kaspar Fischer [EMAIL PROTECTED] wrote: I frequently need to deal with singular and plural versions of wicket:message's. I would like to do something like: add(new Label(links, new PluralStringResourceModel(link, this) { @Override public boolean isPlural() { return /* some code like: */ model.getObject().getChildren().size() 1; } })); and this will use link.plural if isPlural() returns true and link otherwise. Has anybody found an elegant solution for such situations? P.S. Here is a working implementation (neither efficient nor elegant) for the above approach: add(new Label(link, new StringResourceModel(link${plural}, this, new ModelSerializable() { @Override public Serializable getObject() { return new Serializable() { public String getPlural() { return model.getObject().getChildren().size() 1 ? .plural : ; } }; } }))); /** * A simple wrapper around StringResourceModel to facilitate working with singular, plural, and * similar messages. * p * In the simplest case, you have a property ttwebsite=Website{0,choice,0#|1lt;s}/tt and * create a label like this: * codenew LabelString(website, new StringResourceModelWithCount(website, this) { public int getCount() { return size; } })/code. * * @author hbf * */ public abstract class StringResourceModelWithCount extends StringResourceModel { /** * See [EMAIL PROTECTED] StringResourceModel#StringResourceModel()}. * * @param resourceKey * @param component * @param model */ public StringResourceModelWithCount(String resourceKey, Component? component, IModel? model) { // Construct super(resourceKey, component, model, new Object[] { new CountExecuter() }); // Initialize ((CountExecuter) getParameters()[0]).target = this; } /** * Shorthand for codeStringResourceModelWithCount(resourceKey, component, null)/code. * * @param resourceKey * @param component * @param model */ public StringResourceModelWithCount(String resourceKey, Component? component) { this(resourceKey, component, null); } /** * Subclasses should override this to return the number of items. * * @return */ public abstract int getCount(); /** * Helper class needed to make the actual call to [EMAIL PROTECTED] StringResourceModelWithCount#getCount()}. * (It is needed because in StringResourceModelWithCount's call codesuper(...)/code as we * cannot reference the non-static method getCount() during construction.) */ private static class CountExecuter extends ModelInteger { private StringResourceModelWithCount target; @Override public Integer getObject() { return target.getCount(); } } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Plural and singular messages
On 13.06.2008, at 16:47, James Carman wrote: I think you're doing a bit too much work here. StringResourceModel allows you to pass in IModel objects as its parameters (check the javadocs), so you could pass in an IModel that returns your size parameter that is calculated at runtime. If you mean that StringResourceModelWithCount is a little overkill, then: yes, you are of course right; my class is nothing but syntactic sugar. It makes the class's client code look a little more readable, I feel. Or did you mean the code in StringResourceModelWithCount itself? public StringResourceModelWithCount(String resourceKey, Component? component, IModel? model) { // Construct super(resourceKey, component, model, new Object[] { new ModelInteger() { @Override public Integer getObject() { return getCount(); } }}); } obviously does not work (method referenced at construction time). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation message
If yo have a Required validator on a TextField with wicket:id=mytextfield in a form with wicket:id=myform in a Page called MyPage.java in a package called com.mypackage then create a file called MyPage.properties in the package com.mypackage in this properties file is where you override the validation messages for anything in the page, so in this example you would add the line myform.mytextfield.Required=My required message see how the hierarchies match and the Required is the same name as your validator class (so if you used an EmailAddressValidator you would put myform.mytextfield.EmailAddressValidator) If your form was in its own java file called MyForm.java then you would put the properties file in the same package as MyForm.java and you would call your properties file MyForm.properties and it would look like this mytextfield.Required=My required message note how you dont need the myform. bit. Also see this page: http://cwiki.apache.org/WICKET/form-validation-messages.html Hope that explains it Richard wenm wrote: I try to validate component by using setRequired(). and I would like to define the feedback messages in application level properties file. For example, the application structure is like myApplication -basePage -myPage extends basePage -myForm -myTextField I tried to overwrite the default message in myApplication.properties like: myPage.myForm.myTextField.Required = something is missing But it is not succeful. I don't know whether I do something wrong or I have to set up something in myApplication? Thanks. -- View this message in context: http://www.nabble.com/validation-message-tp17821088p17825892.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
https error with flash
I have read thie wiki about implementing https on certain page but failed to do so when a Link is pressed to an https page. I have tried the https on every page but now the flash movies is not displayed. Only in IE. Works in firefox and safari. This is my setting in web.xml security-constraint display-namessl-test/display-name web-resource-collection web-resource-nameHairless/web-resource-name description/ url-pattern/*/url-pattern http-methodPOST/http-method http-methodGET/http-method http-methodHEAD/http-method http-methodPUT/http-method http-methodOPTIONS/http-method http-methodTRACE/http-method http-methodDELETE/http-method /web-resource-collection user-data-constraint descriptionssl mode/description transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint Has anyone experienced this? Error message from tomcat Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(Unknown Source) at java.net.SocketOutputStream.write(Unknown Source) at com.sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(Unknown Source) at com.sun.net.ssl.internal.ssl.OutputRecord.write(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source) at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:737) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434) at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:299) at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:963) at org.apache.coyote.Response.action(Response.java:183) at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:314) ... 25 more -- View this message in context: http://www.nabble.com/https-error-with-flash-tp17825920p17825920.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Panels in a panel
Nino.Martinez wrote: use a listview,propertylistview or repeater... Differences are: listview: iterates over a list propertylistviw:-||- and bound the item.model via a compound model, very usefull if you use compound models a lot. repeater: repeats for int times, as I remember it.. Thanks for your reply. Unfortunately I need more information than that. Something like exactly what and how to use, with code. I have been trying to get this thing working for some days now and I really need help with this. My whole decision about moving my project to Wicket depends on this and I really do wan tto use Wicket. Thanks so much again. -Mohammad -- View this message in context: http://www.nabble.com/Panels-in-a-panel-tp17817534p17826539.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket portles in Sun Portal
Wilhelmsen Tor Iver wrote: To dig up this old thread: I now use Ate Douma's patch for JSR-286 support from https://issues.apache.org/jira/browse/WICKET-1620 which has removed the need for the portal to implement the Apache portlet bridge's two interfaces. A small step for man etc. :) Well, credits for those patches go to Thijs Vonk, I'm just the assignee of that issue :) Note though: those patches *as such* still need quite some refactoring (as already discussed on this list before) and the final JSR-286 support very likely will turn out a little bit different... For those who haven't discovered this yet, I might have a nice news update: JSR-286 has finally landed! See: http://jcp.org/aboutJava/communityprocess/final/jsr286/index.html There now is an issue - the same I had in JBoss - that it seems the bridge has a bug where the WicketFilterPortletContext call to ServletPortletSessionProxy.createProxy(filterRequestContext.getRequest() ) places a Double into the window-id propery that later will be cast to String... No. This is *not* a bug in the bridge, but one in their portlet container implementation. The method concerning this issue is o.a.p.bridges.util.PortletWindowUtils.getPortletWindowId(PortletSession) That method (which I wrote) is 100% following the JSR-168 specification, its just too bad JBoss Portal (and now it seems also Sun Portal) fail to follow those rules concerning this functionality. ... makes me wonder if they (now) share some common codebase ? ... Anyway, I know this is annoying and I could maybe fix this through a workaround (not sure yet though: this exception might indicate something more/worse is wrong, but I haven't debugged *their* engines yet). But... such a fix or workaround will take some time to formally land in a new release of bridges anyway, and maybe by that time this is moot if we have (basic) JSR-286 support in place for Wicket by then ... Are there plans to completely disconnect the Wicket portlet impl. from the bridge (i.e. including this dependency to ServletPortletSessionProxy)? Yes/no. JSR-286 support will no longer need/depend on the two ServletContextProvider and PortletResourceURLFactory implementations. Additionally, the ServletPortletSessionProxy functionality *might* be replaced by a native JSR-286 feature but... that is an optional feature of the spec, so it depends if the underlying portlet container does support it or not. If not, the ServletPortletSessionProxy (which provides exactly the same functionality as this optional feature... wonder how come?) will still be needed. But in that case, the part you encountered the exception in comes from determining the Portlet WindowId, and *that* is now also formally provided by JSR-286 and thus can be resolved in a JSR-286 native way too. HTH, Ate - Tor Iver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket 1.2 - 1.3 upgrade question
Wicket 1.3 is configured as a filter rather than as a servlet. The Quickstart shows a filter whose URL-PATTERN is /*. The project that I wish to upgrade contains two Wicket 1.2 application servlets (two different home-pages accessed via different URLs), and one plain-vanilla non-Wicket servlet. They are deployed together because they share the same code-base. This is my Wicket 1.2 project's web.xml file. How do I do this sort of thing in Wicket 1.3? ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd version=2.4 display-nameMEMSpssWebModule/display-name context-param param-nameconfiguration/param-name param-valuedevelopment/param-value /context-param servlet servlet-nameMEM_Application/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.MEM_Application/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEM_Application/servlet-name url-pattern/mem/*/url-pattern /servlet-mapping servlet servlet-nameMEMTestApplication/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.TestApplication/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEMTestApplication/servlet-name url-pattern/MEMTest/*/url-pattern /servlet-mapping servlet servlet-nametrackingnumbers/servlet-name servlet-classmem.TrackingNumbers/servlet-class /servlet servlet-mapping servlet-nametrackingnumbers/servlet-name url-pattern/trackingnumbers/url-pattern /servlet-mapping resource-ref descriptionResource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file./description res-ref-namejdbc/database/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app
SSL and wicket
Has anyone successfully got ssl to work on certain pages http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html If I implement this the none of my links work even if I create a SSLLink class and annotate it with the suggested interface in the wiki page. All, any help would be very appriciated. -- View this message in context: http://www.nabble.com/SSL-and-wicket-tp17828596p17828596.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket 1.2 - 1.3 upgrade question
you have to give the mapping as a config param to the filter also, i forget the exact name right now... -igor On Fri, Jun 13, 2008 at 10:00 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Wicket 1.3 is configured as a filter rather than as a servlet. The Quickstart shows a filter whose URL-PATTERN is /*. The project that I wish to upgrade contains two Wicket 1.2 application servlets (two different home-pages accessed via different URLs), and one plain-vanilla non-Wicket servlet. They are deployed together because they share the same code-base. This is my Wicket 1.2 project's web.xml file. How do I do this sort of thing in Wicket 1.3? ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd version=2.4 display-nameMEMSpssWebModule/display-name context-param param-nameconfiguration/param-name param-valuedevelopment/param-value /context-param servlet servlet-nameMEM_Application/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.MEM_Application/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEM_Application/servlet-name url-pattern/mem/*/url-pattern /servlet-mapping servlet servlet-nameMEMTestApplication/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.TestApplication/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEMTestApplication/servlet-name url-pattern/MEMTest/*/url-pattern /servlet-mapping servlet servlet-nametrackingnumbers/servlet-name servlet-classmem.TrackingNumbers/servlet-class /servlet servlet-mapping servlet-nametrackingnumbers/servlet-name url-pattern/trackingnumbers/url-pattern /servlet-mapping resource-ref descriptionResource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file./description res-ref-namejdbc/database/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Wicket 1.2 - 1.3 upgrade question
Yes, there is a filter-mapping element that maps filter-name to url-pattern. However, as I mentioned in http://www.nabble.com/Re%3A-%28Class%3C--extends-Page%3C-%3E%3E%29-casti ng-troubles-td17640954i40.html#a17824049, when I changed the url-pattern from /* to /something/* -- my static images (referenced by the HTML such as img wicket:id=picture src=image1.png alt=Picture/ where image1.png was set via AttributeModifyer) no longer appeared. That suggested to me that perhaps I wasn't supposed to change the url-pattern of the filter. Should I submit this as a JIRA issue? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 12:53 PM To: users@wicket.apache.org Subject: Re: Wicket 1.2 - 1.3 upgrade question you have to give the mapping as a config param to the filter also, i forget the exact name right now... -igor On Fri, Jun 13, 2008 at 10:00 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Wicket 1.3 is configured as a filter rather than as a servlet. The Quickstart shows a filter whose URL-PATTERN is /*. The project that I wish to upgrade contains two Wicket 1.2 application servlets (two different home-pages accessed via different URLs), and one plain-vanilla non-Wicket servlet. They are deployed together because they share the same code-base. This is my Wicket 1.2 project's web.xml file. How do I do this sort of thing in Wicket 1.3? ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd version=2.4 display-nameMEMSpssWebModule/display-name context-param param-nameconfiguration/param-name param-valuedevelopment/param-value /context-param servlet servlet-nameMEM_Application/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.MEM_Application/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEM_Application/servlet-name url-pattern/mem/*/url-pattern /servlet-mapping servlet servlet-nameMEMTestApplication/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.TestApplication/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEMTestApplication/servlet-name url-pattern/MEMTest/*/url-pattern /servlet-mapping servlet servlet-nametrackingnumbers/servlet-name servlet-classmem.TrackingNumbers/servlet-class /servlet servlet-mapping servlet-nametrackingnumbers/servlet-name url-pattern/trackingnumbers/url-pattern /servlet-mapping resource-ref descriptionResource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file./description res-ref-namejdbc/database/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket portles in Sun Portal
Ate Douma wrote: Wilhelmsen Tor Iver wrote: To dig up this old thread: I now use Ate Douma's patch for JSR-286 support from https://issues.apache.org/jira/browse/WICKET-1620 which has removed the need for the portal to implement the Apache portlet bridge's two interfaces. A small step for man etc. :) Well, credits for those patches go to Thijs Vonk, I'm just the assignee of that issue :) Note though: those patches *as such* still need quite some refactoring (as already discussed on this list before) and the final JSR-286 support very likely will turn out a little bit different... For those who haven't discovered this yet, I might have a nice news update: JSR-286 has finally landed! See: http://jcp.org/aboutJava/communityprocess/final/jsr286/index.html Finally :) There now is an issue - the same I had in JBoss - that it seems the bridge has a bug where the WicketFilterPortletContext call to ServletPortletSessionProxy.createProxy(filterRequestContext.getRequest() ) places a Double into the window-id propery that later will be cast to String... No. This is *not* a bug in the bridge, but one in their portlet container implementation. The method concerning this issue is o.a.p.bridges.util.PortletWindowUtils.getPortletWindowId(PortletSession) That method (which I wrote) is 100% following the JSR-168 specification, its just too bad JBoss Portal (and now it seems also Sun Portal) fail to follow those rules concerning this functionality. ... makes me wonder if they (now) share some common codebase ? ... Anyway, I know this is annoying and I could maybe fix this through a workaround (not sure yet though: this exception might indicate something more/worse is wrong, but I haven't debugged *their* engines yet). But... such a fix or workaround will take some time to formally land in a new release of bridges anyway, and maybe by that time this is moot if we have (basic) JSR-286 support in place for Wicket by then ... I tested on Sun Portlet container and ran into this problem as well. The 'QuickFix' I used was to alter the Bridges code and check if it was a String or not and depending I cast to String or to Double and then to String. I know it's dirty (as I didn't check if it actually is a worse problem as Ate indicated), but after I fixed that I haven't run into any other problems with it yet. Note though that you have to build a svn copy of the portlet-container. RC2 contains a bug I found which prevents Ajax to work correctly. Are there plans to completely disconnect the Wicket portlet impl. from the bridge (i.e. including this dependency to ServletPortletSessionProxy)? Yes/no. JSR-286 support will no longer need/depend on the two ServletContextProvider and PortletResourceURLFactory implementations. Additionally, the ServletPortletSessionProxy functionality *might* be replaced by a native JSR-286 feature but... that is an optional feature of the spec, so it depends if the underlying portlet container does support it or not. If not, the ServletPortletSessionProxy (which provides exactly the same functionality as this optional feature... wonder how come?) will still be needed. But in that case, the part you encountered the exception in comes from determining the Portlet WindowId, and *that* is now also formally provided by JSR-286 and thus can be resolved in a JSR-286 native way too. HTH, Ate - Tor Iver - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting Wicket Session from outside Wicket context
I have several Servlets and ServletFilters that run inside the same web application as my Wicket app. They've happily co-existed with Wicket until now, but now there is a requirement that several of them, which can show sensitive data, must be protected with the same login security as the Wicket application. What is to me the simplest approach would be to grab hold of the instance of my WebSession subclass and use it to check the user's login status. But I'm not quite sure how this is stored in Wicket. Is there a simple invocation to get my WebSession out of the HttpSession? Thanks, -- Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting Wicket Session from outside Wicket context
I had the same issue recently and Igor posted a good solution. See: http://www.nabble.com/Wicket-play-nicely-with-GWT-to1736.html#a17222908 - Brill Pappin On 13-Jun-08, at 3:35 PM, Scott Sauyet wrote: I have several Servlets and ServletFilters that run inside the same web application as my Wicket app. They've happily co-existed with Wicket until now, but now there is a requirement that several of them, which can show sensitive data, must be protected with the same login security as the Wicket application. What is to me the simplest approach would be to grab hold of the instance of my WebSession subclass and use it to check the user's login status. But I'm not quite sure how this is stored in Wicket. Is there a simple invocation to get my WebSession out of the HttpSession? Thanks, -- Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket 1.2 - 1.3 upgrade question
the filter itself takes a configuration param where you have to repeat the mapping... class WicketFilter { /** * The name of the root path parameter that specifies the root dir of the app. */ public static final String FILTER_MAPPING_PARAM = filterMappingUrlPattern; String filterMapping = filterConfig.getInitParameter(WicketFilter.FILTER_MAPPING_PARAM); } -igor On Fri, Jun 13, 2008 at 11:09 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Yes, there is a filter-mapping element that maps filter-name to url-pattern. However, as I mentioned in http://www.nabble.com/Re%3A-%28Class%3C--extends-Page%3C-%3E%3E%29-casti ng-troubles-td17640954i40.html#a17824049, when I changed the url-pattern from /* to /something/* -- my static images (referenced by the HTML such as img wicket:id=picture src=image1.png alt=Picture/ where image1.png was set via AttributeModifyer) no longer appeared. That suggested to me that perhaps I wasn't supposed to change the url-pattern of the filter. Should I submit this as a JIRA issue? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 12:53 PM To: users@wicket.apache.org Subject: Re: Wicket 1.2 - 1.3 upgrade question you have to give the mapping as a config param to the filter also, i forget the exact name right now... -igor On Fri, Jun 13, 2008 at 10:00 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Wicket 1.3 is configured as a filter rather than as a servlet. The Quickstart shows a filter whose URL-PATTERN is /*. The project that I wish to upgrade contains two Wicket 1.2 application servlets (two different home-pages accessed via different URLs), and one plain-vanilla non-Wicket servlet. They are deployed together because they share the same code-base. This is my Wicket 1.2 project's web.xml file. How do I do this sort of thing in Wicket 1.3? ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd version=2.4 display-nameMEMSpssWebModule/display-name context-param param-nameconfiguration/param-name param-valuedevelopment/param-value /context-param servlet servlet-nameMEM_Application/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.MEM_Application/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEM_Application/servlet-name url-pattern/mem/*/url-pattern /servlet-mapping servlet servlet-nameMEMTestApplication/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.TestApplication/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEMTestApplication/servlet-name url-pattern/MEMTest/*/url-pattern /servlet-mapping servlet servlet-nametrackingnumbers/servlet-name servlet-classmem.TrackingNumbers/servlet-class /servlet servlet-mapping servlet-nametrackingnumbers/servlet-name url-pattern/trackingnumbers/url-pattern /servlet-mapping resource-ref descriptionResource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file./description res-ref-namejdbc/database/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting Wicket Session from outside Wicket context
Cool, is that new? - Brill On 13-Jun-08, at 3:43 PM, Igor Vaynberg wrote: see WicketSessionFilter -igor On Fri, Jun 13, 2008 at 12:35 PM, Scott Sauyet [EMAIL PROTECTED] wrote: I have several Servlets and ServletFilters that run inside the same web application as my Wicket app. They've happily co-existed with Wicket until now, but now there is a requirement that several of them, which can show sensitive data, must be protected with the same login security as the Wicket application. What is to me the simplest approach would be to grab hold of the instance of my WebSession subclass and use it to check the user's login status. But I'm not quite sure how this is stored in Wicket. Is there a simple invocation to get my WebSession out of the HttpSession? Thanks, -- Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
BookMarkable Home Page?
Hi All, In my application the Home Page of the class has the url that looks like this http://localhost:8080/app/?id=ABCXYZ This form has a textfield that I am pre-filling with value of id from query param (in this case ABCYXZ). It also has JCaptcha component and a text field component to validate that captcha. And there is Submit button. Now, The problem is: When I Submit the form and if any of the required fields is not filled up then it shows validation errors which is all good. But, the page refreshes and url of the page changes to http://localhost:8080/app/?wicket:interface=:0 . - How can I prevent query param from disappearing? - How can I prevent from ?wicket:interface=:0 from appearing so that it does not expire after server re-boot (Note: this is the home page of the application) Thanks for the help, RG -- View this message in context: http://www.nabble.com/BookMarkable-Home-Page--tp17830736p17830736.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting Wicket Session from outside Wicket context
you wanted access to raw http session from your wicket app, he wants to access wicket session object from outside servlets. different usecase. -igor On Fri, Jun 13, 2008 at 12:46 PM, Brill Pappin [EMAIL PROTECTED] wrote: Cool, is that new? - Brill On 13-Jun-08, at 3:43 PM, Igor Vaynberg wrote: see WicketSessionFilter -igor On Fri, Jun 13, 2008 at 12:35 PM, Scott Sauyet [EMAIL PROTECTED] wrote: I have several Servlets and ServletFilters that run inside the same web application as my Wicket app. They've happily co-existed with Wicket until now, but now there is a requirement that several of them, which can show sensitive data, must be protected with the same login security as the Wicket application. What is to me the simplest approach would be to grab hold of the instance of my WebSession subclass and use it to check the user's login status. But I'm not quite sure how this is stored in Wicket. Is there a simple invocation to get my WebSession out of the HttpSession? Thanks, -- Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BookMarkable Home Page?
use statelessform -igor On Fri, Jun 13, 2008 at 12:46 PM, nanotech [EMAIL PROTECTED] wrote: Hi All, In my application the Home Page of the class has the url that looks like this http://localhost:8080/app/?id=ABCXYZ This form has a textfield that I am pre-filling with value of id from query param (in this case ABCYXZ). It also has JCaptcha component and a text field component to validate that captcha. And there is Submit button. Now, The problem is: When I Submit the form and if any of the required fields is not filled up then it shows validation errors which is all good. But, the page refreshes and url of the page changes to http://localhost:8080/app/?wicket:interface=:0 . - How can I prevent query param from disappearing? - How can I prevent from ?wicket:interface=:0 from appearing so that it does not expire after server re-boot (Note: this is the home page of the application) Thanks for the help, RG -- View this message in context: http://www.nabble.com/BookMarkable-Home-Page--tp17830736p17830736.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BookMarkable Home Page?
Maybe override onError and redirect to the bookmarkable page w/ params? On Fri, Jun 13, 2008 at 3:46 PM, nanotech [EMAIL PROTECTED] wrote: Hi All, In my application the Home Page of the class has the url that looks like this http://localhost:8080/app/?id=ABCXYZ This form has a textfield that I am pre-filling with value of id from query param (in this case ABCYXZ). It also has JCaptcha component and a text field component to validate that captcha. And there is Submit button. Now, The problem is: When I Submit the form and if any of the required fields is not filled up then it shows validation errors which is all good. But, the page refreshes and url of the page changes to http://localhost:8080/app/?wicket:interface=:0 . - How can I prevent query param from disappearing? - How can I prevent from ?wicket:interface=:0 from appearing so that it does not expire after server re-boot (Note: this is the home page of the application) Thanks for the help, RG -- View this message in context: http://www.nabble.com/BookMarkable-Home-Page--tp17830736p17830736.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ryan Gravener http://twitter.com/ryangravener
RE: Wicket 1.2 - 1.3 upgrade question
Like this? ?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-namemyproject/display-name filter filter-namewicket.myproject/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.mycompany.WicketApplication/param-value /init-param init-param param-namefilterMappingUrlPattern/param-name param-value/test/*/param-value /init-param /filter filter-mapping filter-namewicket.myproject/filter-name url-pattern/test/*/url-pattern /filter-mapping /web-app -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 2:45 PM To: users@wicket.apache.org Subject: Re: Wicket 1.2 - 1.3 upgrade question the filter itself takes a configuration param where you have to repeat the mapping... class WicketFilter { /** * The name of the root path parameter that specifies the root dir of the app. */ public static final String FILTER_MAPPING_PARAM = filterMappingUrlPattern; String filterMapping = filterConfig.getInitParameter(WicketFilter.FILTER_MAPPING_PARAM); } -igor On Fri, Jun 13, 2008 at 11:09 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Yes, there is a filter-mapping element that maps filter-name to url-pattern. However, as I mentioned in http://www.nabble.com/Re%3A-%28Class%3C--extends-Page%3C-%3E%3E%29-cas ti ng-troubles-td17640954i40.html#a17824049, when I changed the url-pattern from /* to /something/* -- my static images (referenced by the HTML such as img wicket:id=picture src=image1.png alt=Picture/ where image1.png was set via AttributeModifyer) no longer appeared. That suggested to me that perhaps I wasn't supposed to change the url-pattern of the filter. Should I submit this as a JIRA issue? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 12:53 PM To: users@wicket.apache.org Subject: Re: Wicket 1.2 - 1.3 upgrade question you have to give the mapping as a config param to the filter also, i forget the exact name right now... -igor On Fri, Jun 13, 2008 at 10:00 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Wicket 1.3 is configured as a filter rather than as a servlet. The Quickstart shows a filter whose URL-PATTERN is /*. The project that I wish to upgrade contains two Wicket 1.2 application servlets (two different home-pages accessed via different URLs), and one plain-vanilla non-Wicket servlet. They are deployed together because they share the same code-base. This is my Wicket 1.2 project's web.xml file. How do I do this sort of thing in Wicket 1.3? ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd version=2.4 display-nameMEMSpssWebModule/display-name context-param param-nameconfiguration/param-name param-valuedevelopment/param-value /context-param servlet servlet-nameMEM_Application/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.MEM_Application/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEM_Application/servlet-name url-pattern/mem/*/url-pattern /servlet-mapping servlet servlet-nameMEMTestApplication/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.TestApplication/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEMTestApplication/servlet-name url-pattern/MEMTest/*/url-pattern /servlet-mapping servlet servlet-nametrackingnumbers/servlet-name servlet-classmem.TrackingNumbers/servlet-class /servlet servlet-mapping servlet-nametrackingnumbers/servlet-name url-pattern/trackingnumbers/url-pattern /servlet-mapping resource-ref descriptionResource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file./description
Re: Wicket 1.2 - 1.3 upgrade question
guess so -igor On Fri, Jun 13, 2008 at 1:04 PM, Frank Silbermann [EMAIL PROTECTED] wrote: Like this? ?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-namemyproject/display-name filter filter-namewicket.myproject/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.mycompany.WicketApplication/param-value /init-param init-param param-namefilterMappingUrlPattern/param-name param-value/test/*/param-value /init-param /filter filter-mapping filter-namewicket.myproject/filter-name url-pattern/test/*/url-pattern /filter-mapping /web-app -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 2:45 PM To: users@wicket.apache.org Subject: Re: Wicket 1.2 - 1.3 upgrade question the filter itself takes a configuration param where you have to repeat the mapping... class WicketFilter { /** * The name of the root path parameter that specifies the root dir of the app. */ public static final String FILTER_MAPPING_PARAM = filterMappingUrlPattern; String filterMapping = filterConfig.getInitParameter(WicketFilter.FILTER_MAPPING_PARAM); } -igor On Fri, Jun 13, 2008 at 11:09 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Yes, there is a filter-mapping element that maps filter-name to url-pattern. However, as I mentioned in http://www.nabble.com/Re%3A-%28Class%3C--extends-Page%3C-%3E%3E%29-cas ti ng-troubles-td17640954i40.html#a17824049, when I changed the url-pattern from /* to /something/* -- my static images (referenced by the HTML such as img wicket:id=picture src=image1.png alt=Picture/ where image1.png was set via AttributeModifyer) no longer appeared. That suggested to me that perhaps I wasn't supposed to change the url-pattern of the filter. Should I submit this as a JIRA issue? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 12:53 PM To: users@wicket.apache.org Subject: Re: Wicket 1.2 - 1.3 upgrade question you have to give the mapping as a config param to the filter also, i forget the exact name right now... -igor On Fri, Jun 13, 2008 at 10:00 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Wicket 1.3 is configured as a filter rather than as a servlet. The Quickstart shows a filter whose URL-PATTERN is /*. The project that I wish to upgrade contains two Wicket 1.2 application servlets (two different home-pages accessed via different URLs), and one plain-vanilla non-Wicket servlet. They are deployed together because they share the same code-base. This is my Wicket 1.2 project's web.xml file. How do I do this sort of thing in Wicket 1.3? ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd version=2.4 display-nameMEMSpssWebModule/display-name context-param param-nameconfiguration/param-name param-valuedevelopment/param-value /context-param servlet servlet-nameMEM_Application/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.MEM_Application/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEM_Application/servlet-name url-pattern/mem/*/url-pattern /servlet-mapping servlet servlet-nameMEMTestApplication/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.TestApplication/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEMTestApplication/servlet-name url-pattern/MEMTest/*/url-pattern /servlet-mapping servlet servlet-nametrackingnumbers/servlet-name servlet-classmem.TrackingNumbers/servlet-class /servlet servlet-mapping servlet-nametrackingnumbers/servlet-name url-pattern/trackingnumbers/url-pattern /servlet-mapping resource-ref descriptionResource reference to a factory for java.sql.Connection instances that may be used for talking to a particular
RE: Wicket 1.2 - 1.3 upgrade question
Adding the filterMappingUrlPattern didn't seem to make any difference. When both are set to /* I see the image; when both are set to /test/* then I don't see the image. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 3:10 PM To: users@wicket.apache.org Subject: Re: Wicket 1.2 - 1.3 upgrade question guess so -igor On Fri, Jun 13, 2008 at 1:04 PM, Frank Silbermann [EMAIL PROTECTED] wrote: Like this? ?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-namemyproject/display-name filter filter-namewicket.myproject/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-cla ss init-param param-nameapplicationClassName/param-name param-valuecom.mycompany.WicketApplication/param-value /init-param init-param param-namefilterMappingUrlPattern/param-name param-value/test/*/param-value /init-param /filter filter-mapping filter-namewicket.myproject/filter-name url-pattern/test/*/url-pattern /filter-mapping /web-app -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 2:45 PM To: users@wicket.apache.org Subject: Re: Wicket 1.2 - 1.3 upgrade question the filter itself takes a configuration param where you have to repeat the mapping... class WicketFilter { /** * The name of the root path parameter that specifies the root dir of the app. */ public static final String FILTER_MAPPING_PARAM = filterMappingUrlPattern; String filterMapping = filterConfig.getInitParameter(WicketFilter.FILTER_MAPPING_PARAM); } -igor On Fri, Jun 13, 2008 at 11:09 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Yes, there is a filter-mapping element that maps filter-name to url-pattern. However, as I mentioned in http://www.nabble.com/Re%3A-%28Class%3C--extends-Page%3C-%3E%3E%29-ca s ti ng-troubles-td17640954i40.html#a17824049, when I changed the url-pattern from /* to /something/* -- my static images (referenced by the HTML such as img wicket:id=picture src=image1.png alt=Picture/ where image1.png was set via AttributeModifyer) no longer appeared. That suggested to me that perhaps I wasn't supposed to change the url-pattern of the filter. Should I submit this as a JIRA issue? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 12:53 PM To: users@wicket.apache.org Subject: Re: Wicket 1.2 - 1.3 upgrade question you have to give the mapping as a config param to the filter also, i forget the exact name right now... -igor On Fri, Jun 13, 2008 at 10:00 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Wicket 1.3 is configured as a filter rather than as a servlet. The Quickstart shows a filter whose URL-PATTERN is /*. The project that I wish to upgrade contains two Wicket 1.2 application servlets (two different home-pages accessed via different URLs), and one plain-vanilla non-Wicket servlet. They are deployed together because they share the same code-base. This is my Wicket 1.2 project's web.xml file. How do I do this sort of thing in Wicket 1.3? ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd version=2.4 display-nameMEMSpssWebModule/display-name context-param param-nameconfiguration/param-name param-valuedevelopment/param-value /context-param servlet servlet-nameMEM_Application/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.MEM_Application/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEM_Application/servlet-name url-pattern/mem/*/url-pattern /servlet-mapping servlet servlet-nameMEMTestApplication/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.TestApplication/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEMTestApplication/servlet-name url-pattern/MEMTest/*/url-pattern /servlet-mapping servlet
Re: BookMarkable Home Page?
I used StateLess form but there is no difference. both the Problems still there. i.e. 1. Query parameter goes away when the form is submitted and if there are validation errors. 2. URL changes to http://localhost:8080/app/?wicket:interface=:0 My hierarchy looks like. --MyApplication extends WebApplication | has |__HomePage [ --Constructor looks like HomePage(PageParameters params) ] | has |___DisplayPanel [-- Constructor looks like DisplayPanel(String id,PageParameters params)] | has | DisplayForm extends StatelessForm [-- Constructor looks like DisplayForm(String id,PageParameters params) ] igor.vaynberg wrote: use statelessform -igor On Fri, Jun 13, 2008 at 12:46 PM, nanotech [EMAIL PROTECTED] wrote: Hi All, In my application the Home Page of the class has the url that looks like this http://localhost:8080/app/?id=ABCXYZ This form has a textfield that I am pre-filling with value of id from query param (in this case ABCYXZ). It also has JCaptcha component and a text field component to validate that captcha. And there is Submit button. Now, The problem is: When I Submit the form and if any of the required fields is not filled up then it shows validation errors which is all good. But, the page refreshes and url of the page changes to http://localhost:8080/app/?wicket:interface=:0 . - How can I prevent query param from disappearing? - How can I prevent from ?wicket:interface=:0 from appearing so that it does not expire after server re-boot (Note: this is the home page of the application) Thanks for the help, RG -- View this message in context: http://www.nabble.com/BookMarkable-Home-Page--tp17830736p17830736.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/BookMarkable-Home-Page--tp17830736p17831329.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BookMarkable Home Page?
But if I do that wouldn't the feedback messages will go away? -- Thoughts? RG Ryan Gravener-3 wrote: Maybe override onError and redirect to the bookmarkable page w/ params? On Fri, Jun 13, 2008 at 3:46 PM, nanotech [EMAIL PROTECTED] wrote: Hi All, In my application the Home Page of the class has the url that looks like this http://localhost:8080/app/?id=ABCXYZ This form has a textfield that I am pre-filling with value of id from query param (in this case ABCYXZ). It also has JCaptcha component and a text field component to validate that captcha. And there is Submit button. Now, The problem is: When I Submit the form and if any of the required fields is not filled up then it shows validation errors which is all good. But, the page refreshes and url of the page changes to http://localhost:8080/app/?wicket:interface=:0 . - How can I prevent query param from disappearing? - How can I prevent from ?wicket:interface=:0 from appearing so that it does not expire after server re-boot (Note: this is the home page of the application) Thanks for the help, RG -- View this message in context: http://www.nabble.com/BookMarkable-Home-Page--tp17830736p17830736.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ryan Gravener http://twitter.com/ryangravener -- View this message in context: http://www.nabble.com/BookMarkable-Home-Page--tp17830736p17831353.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting Wicket Session from outside Wicket context
Igor Vaynberg wrote: see WicketSessionFilter Thank you. That works perfectly. What a great list! -- Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using Java 1.5 features with Wicket 1.3
In my Wicket 1.2 application I used a Java 1.5 JDK. Wicket didn't seem to mind that I used annotations, etc. in my own code. I did the same in code that I upgraded to Wicket 1.3. Also, my Wicket 1.2 application was built from scratch using JBuilder 2006; but the stop-server/modify-code/compile/re-deploy/start-server cycle was laborious, so this time I've been trying to work from the QuickStart, using Maven2 and Eclipse, with Jetty in process for debugging. But for some reason I keep messing up. I was able to compile my code using either Maven2 or Eclipse. Then, when rebuilding with Maven2 I had the bright idea of calling mvn clean first. Well, my compilation is failing all over the place now, with comments of the form: ...annotations are not supported in -source 1.3 (use -source 5 or higher to enable annotations) I googled the error and found a page http://vikashazrati.wordpress.com/2008/05/13/maven2-annotations-not-supp orted/ that suggested I add to my pom.xml build plugins ... plugin artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin /plugins /build I did so, and now I'm getting an error: C:\webReports\web applications\WebCommon\src\main\java\common\components\DatePickerManualS ubmitPanel.java:[10,0] package org.apache.wicket.extensions.yui.calendar.assets.skins.sam does not exist When I go back to Eclipse, it doesn't tell me it cannot build, but when I try to run I get a tab saying: URLClassLoader$1.run() line: not availableSource not found I am getting very frustrated. Does anyone recognize these symptoms? Is my only choice to start over?
Re: Using Java 1.5 features with Wicket 1.3
Do you compile Wicket yourself? If so, this should be compiled using --source 1.4. Your own code can stay with --source 1.5. Timm Am Freitag, 13. Juni 2008 22:58:53 schrieb Frank Silbermann: In my Wicket 1.2 application I used a Java 1.5 JDK. Wicket didn't seem to mind that I used annotations, etc. in my own code. I did the same in code that I upgraded to Wicket 1.3. Also, my Wicket 1.2 application was built from scratch using JBuilder 2006; but the stop-server/modify-code/compile/re-deploy/start-server cycle was laborious, so this time I've been trying to work from the QuickStart, using Maven2 and Eclipse, with Jetty in process for debugging. But for some reason I keep messing up. I was able to compile my code using either Maven2 or Eclipse. Then, when rebuilding with Maven2 I had the bright idea of calling mvn clean first. Well, my compilation is failing all over the place now, with comments of the form: ...annotations are not supported in -source 1.3 (use -source 5 or higher to enable annotations) I googled the error and found a page http://vikashazrati.wordpress.com/2008/05/13/maven2-annotations-not-supp orted/ that suggested I add to my pom.xml build plugins ... plugin artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin /plugins /build I did so, and now I'm getting an error: C:\webReports\web applications\WebCommon\src\main\java\common\components\DatePickerManualS ubmitPanel.java:[10,0] package org.apache.wicket.extensions.yui.calendar.assets.skins.sam does not exist When I go back to Eclipse, it doesn't tell me it cannot build, but when I try to run I get a tab saying: URLClassLoader$1.run() line: not availableSource not found I am getting very frustrated. Does anyone recognize these symptoms? Is my only choice to start over? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using Java 1.5 features with Wicket 1.3
No, I do not compile Wicket myself -- at least. I merely have dependencies to Wicket in the pom.xml. -Original Message- From: Timm Helbig [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 4:06 PM To: users@wicket.apache.org Subject: Re: Using Java 1.5 features with Wicket 1.3 Do you compile Wicket yourself? If so, this should be compiled using --source 1.4. Your own code can stay with --source 1.5. Timm Am Freitag, 13. Juni 2008 22:58:53 schrieb Frank Silbermann: In my Wicket 1.2 application I used a Java 1.5 JDK. Wicket didn't seem to mind that I used annotations, etc. in my own code. I did the same in code that I upgraded to Wicket 1.3. Also, my Wicket 1.2 application was built from scratch using JBuilder 2006; but the stop-server/modify-code/compile/re-deploy/start-server cycle was laborious, so this time I've been trying to work from the QuickStart, using Maven2 and Eclipse, with Jetty in process for debugging. But for some reason I keep messing up. I was able to compile my code using either Maven2 or Eclipse. Then, when rebuilding with Maven2 I had the bright idea of calling mvn clean first. Well, my compilation is failing all over the place now, with comments of the form: ...annotations are not supported in -source 1.3 (use -source 5 or higher to enable annotations) I googled the error and found a page http://vikashazrati.wordpress.com/2008/05/13/maven2-annotations-not-su pp orted/ that suggested I add to my pom.xml build plugins ... plugin artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin /plugins /build I did so, and now I'm getting an error: C:\webReports\web applications\WebCommon\src\main\java\common\components\DatePickerManua lS ubmitPanel.java:[10,0] package org.apache.wicket.extensions.yui.calendar.assets.skins.sam does not exist When I go back to Eclipse, it doesn't tell me it cannot build, but when I try to run I get a tab saying: URLClassLoader$1.run() line: not availableSource not found I am getting very frustrated. Does anyone recognize these symptoms? Is my only choice to start over? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using Java 1.5 features with Wicket 1.3
Never mind. I rebooted my machine and everything is back to normal. Sigh. -Original Message- From: Frank Silbermann [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 4:19 PM To: users@wicket.apache.org Subject: RE: Using Java 1.5 features with Wicket 1.3 No, I do not compile Wicket myself -- at least. I merely have dependencies to Wicket in the pom.xml. -Original Message- From: Timm Helbig [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 4:06 PM To: users@wicket.apache.org Subject: Re: Using Java 1.5 features with Wicket 1.3 Do you compile Wicket yourself? If so, this should be compiled using --source 1.4. Your own code can stay with --source 1.5. Timm Am Freitag, 13. Juni 2008 22:58:53 schrieb Frank Silbermann: In my Wicket 1.2 application I used a Java 1.5 JDK. Wicket didn't seem to mind that I used annotations, etc. in my own code. I did the same in code that I upgraded to Wicket 1.3. Also, my Wicket 1.2 application was built from scratch using JBuilder 2006; but the stop-server/modify-code/compile/re-deploy/start-server cycle was laborious, so this time I've been trying to work from the QuickStart, using Maven2 and Eclipse, with Jetty in process for debugging. But for some reason I keep messing up. I was able to compile my code using either Maven2 or Eclipse. Then, when rebuilding with Maven2 I had the bright idea of calling mvn clean first. Well, my compilation is failing all over the place now, with comments of the form: ...annotations are not supported in -source 1.3 (use -source 5 or higher to enable annotations) I googled the error and found a page http://vikashazrati.wordpress.com/2008/05/13/maven2-annotations-not-su pp orted/ that suggested I add to my pom.xml build plugins ... plugin artifactIdmaven-compiler-plugin/artifactId configuration source1.5/source target1.5/target /configuration /plugin /plugins /build I did so, and now I'm getting an error: C:\webReports\web applications\WebCommon\src\main\java\common\components\DatePickerManua lS ubmitPanel.java:[10,0] package org.apache.wicket.extensions.yui.calendar.assets.skins.sam does not exist When I go back to Eclipse, it doesn't tell me it cannot build, but when I try to run I get a tab saying: URLClassLoader$1.run() line: not availableSource not found I am getting very frustrated. Does anyone recognize these symptoms? Is my only choice to start over? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making Component easier to Generify
I am not aware of a distinction between software decorator and ui decorator. But seeing as wicket is a ui framework, I'll go with ui decorator. Border looks somewhat like a decorator, but since it does not wrap another component, it is not. Also Border needs different markup than the component it 'decorates' which makes it nontransparent, which is kind of the point of decorators. I like to thing of decorators as classes that piggyback behavior on existing instances. Implementing each and every method of a class and delegating to another class is indeed what is needed, but is certainly not insanity. If you use eclipse you can do this easily by adding a member field of a certain type, right-click it and select Source Generate Delegate Methods. When decorating a class is common and intended use of that class, an API usually supplies a SomethingSomethingDecorator class (extends / implements SomethingSomething) that delegates every method by default. You'd then only have to subclass that class. Calling super in methods that only implement an interface as in your reply is just not possible (does not even compile), you need to subclass in order to be able to do that. To return to the final method argument. It is not entirely impossible to decorate a class with final methods, you just can't delegate the final methods. An important one to be able to delegate in wicket is MarkupContainer.add. Otherwise you'd break the hierarchy with a decorated MarkupContainer. By the way, the article I supplied and the article on wikipedia do just the same thing. If you look at VerticalScrollBarDecorator.draw you'll see that it delegates the method to the wrapped Window. Also look at the C++ example. C++ doesn't have interfaces. So, maybe this is a ui decorator as well...? At the end of the article there is a list of other design patterns from the GoF book, unfortunately I couldn't find anything about the software decorator pattern you mentioned (also googled it without avail). So, okay, let's end this discussion for Godwin's sake. I really do want to know how to add behaviour in a transparent way to an existing Link's onClick method. Using Behavior or some other means. AOP is an option but feels hacky just to do this (pointcuts should generally match more than one joinpoint). Event listeners are another (but I won't dare begin that discussion again). Best regards, Matthijs Igor Vaynberg wrote: looked over the article. what they do is a ui decorator, it is not the software decorator pattern. there is no method delegation to the child component. what they create is a composite, you can do the same thing in wicket with a Border. -igor On Thu, Jun 12, 2008 at 9:55 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: right. so when you would do it with a class you will actually have to rewire all the methods to forward to the delegate instead of calling super. that is pure insanity and does not make any sense when methods hold logic. that is why it works with an interface, no logic for you to override and forward to the delegate, only the message dispatch itself. sure, technically you can do it even with a concrete class, but you can also do a lot of other things that dont make sense. -igor On Thu, Jun 12, 2008 at 5:54 PM, Matthijs Wensveen [EMAIL PROTECTED] wrote: Igor Vaynberg wrote: look at the java example. notice Window is an interface. Yeah, but that's just because it's good practice to use the interface when there is one. Notice that the actually decorated class is a new SimpleWindow() in DecoratedWindowTest. Window might as well have been an abstract class, or even a concrete one. The idea is that the contract of the class you wrap is maintained, if that is an interface your decorator implements that, when it's a class your decorator extends it. Same idea. Of course, interfaces are cleaner and you can even decorate more then one interface when you want to, but decorating a class is not uncommon practice (at least where I come from). Example: http://www.onjava.com/pub/a/onjava/2003/02/05/decorator.html eg you cant do: add(new DecoratedComponent(someOtherComponent)); No, because component has final methods that you can't override so you can't delegate to them (that whas my point), but not because you can't decorate a class. Matthijs. PS. If you insist on that you can only decorate an interface, I'll call it wrap-extend or something :) -igor On Thu, Jun 12, 2008 at 5:05 PM, Matthijs Wensveen [EMAIL PROTECTED] wrote: Why would the decorator design pattern only work with interfaces? Maybe we're talking about two different this here? (I'm talking about this one: http://en.wikipedia.org/wiki/Decorator_pattern) I can see why behaviors were introduced. A simple example: a factory method creates a link. In my subclass I want the same link with the same onClick behavior but I also want hello to be outputted to System.out. How
Re: Wicket 1.2 - 1.3 upgrade question
well, package an example project that demonstrates it and attach it to jira -igor On Fri, Jun 13, 2008 at 1:19 PM, Frank Silbermann [EMAIL PROTECTED] wrote: Adding the filterMappingUrlPattern didn't seem to make any difference. When both are set to /* I see the image; when both are set to /test/* then I don't see the image. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 3:10 PM To: users@wicket.apache.org Subject: Re: Wicket 1.2 - 1.3 upgrade question guess so -igor On Fri, Jun 13, 2008 at 1:04 PM, Frank Silbermann [EMAIL PROTECTED] wrote: Like this? ?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-namemyproject/display-name filter filter-namewicket.myproject/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-cla ss init-param param-nameapplicationClassName/param-name param-valuecom.mycompany.WicketApplication/param-value /init-param init-param param-namefilterMappingUrlPattern/param-name param-value/test/*/param-value /init-param /filter filter-mapping filter-namewicket.myproject/filter-name url-pattern/test/*/url-pattern /filter-mapping /web-app -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 2:45 PM To: users@wicket.apache.org Subject: Re: Wicket 1.2 - 1.3 upgrade question the filter itself takes a configuration param where you have to repeat the mapping... class WicketFilter { /** * The name of the root path parameter that specifies the root dir of the app. */ public static final String FILTER_MAPPING_PARAM = filterMappingUrlPattern; String filterMapping = filterConfig.getInitParameter(WicketFilter.FILTER_MAPPING_PARAM); } -igor On Fri, Jun 13, 2008 at 11:09 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Yes, there is a filter-mapping element that maps filter-name to url-pattern. However, as I mentioned in http://www.nabble.com/Re%3A-%28Class%3C--extends-Page%3C-%3E%3E%29-ca s ti ng-troubles-td17640954i40.html#a17824049, when I changed the url-pattern from /* to /something/* -- my static images (referenced by the HTML such as img wicket:id=picture src=image1.png alt=Picture/ where image1.png was set via AttributeModifyer) no longer appeared. That suggested to me that perhaps I wasn't supposed to change the url-pattern of the filter. Should I submit this as a JIRA issue? -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2008 12:53 PM To: users@wicket.apache.org Subject: Re: Wicket 1.2 - 1.3 upgrade question you have to give the mapping as a config param to the filter also, i forget the exact name right now... -igor On Fri, Jun 13, 2008 at 10:00 AM, Frank Silbermann [EMAIL PROTECTED] wrote: Wicket 1.3 is configured as a filter rather than as a servlet. The Quickstart shows a filter whose URL-PATTERN is /*. The project that I wish to upgrade contains two Wicket 1.2 application servlets (two different home-pages accessed via different URLs), and one plain-vanilla non-Wicket servlet. They are deployed together because they share the same code-base. This is my Wicket 1.2 project's web.xml file. How do I do this sort of thing in Wicket 1.3? ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd version=2.4 display-nameMEMSpssWebModule/display-name context-param param-nameconfiguration/param-name param-valuedevelopment/param-value /context-param servlet servlet-nameMEM_Application/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.MEM_Application/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMEM_Application/servlet-name url-pattern/mem/*/url-pattern /servlet-mapping servlet servlet-nameMEMTestApplication/servlet-name servlet-classwicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationClassName/param-name param-valuemem.TestApplication/param-value /init-param load-on-startup1/load-on-startup /servlet
Re: BookMarkable Home Page?
the query parameter will go away, you have to readd it yourself. are you sure you are using the stateless form? doesnt look like it from the url. what does the generated form action url look like? -igor On Fri, Jun 13, 2008 at 1:24 PM, nanotech [EMAIL PROTECTED] wrote: I used StateLess form but there is no difference. both the Problems still there. i.e. 1. Query parameter goes away when the form is submitted and if there are validation errors. 2. URL changes to http://localhost:8080/app/?wicket:interface=:0 My hierarchy looks like. --MyApplication extends WebApplication | has |__HomePage [ --Constructor looks like HomePage(PageParameters params) ] | has |___DisplayPanel [-- Constructor looks like DisplayPanel(String id,PageParameters params)] | has | DisplayForm extends StatelessForm [-- Constructor looks like DisplayForm(String id,PageParameters params) ] igor.vaynberg wrote: use statelessform -igor On Fri, Jun 13, 2008 at 12:46 PM, nanotech [EMAIL PROTECTED] wrote: Hi All, In my application the Home Page of the class has the url that looks like this http://localhost:8080/app/?id=ABCXYZ This form has a textfield that I am pre-filling with value of id from query param (in this case ABCYXZ). It also has JCaptcha component and a text field component to validate that captcha. And there is Submit button. Now, The problem is: When I Submit the form and if any of the required fields is not filled up then it shows validation errors which is all good. But, the page refreshes and url of the page changes to http://localhost:8080/app/?wicket:interface=:0 . - How can I prevent query param from disappearing? - How can I prevent from ?wicket:interface=:0 from appearing so that it does not expire after server re-boot (Note: this is the home page of the application) Thanks for the help, RG -- View this message in context: http://www.nabble.com/BookMarkable-Home-Page--tp17830736p17830736.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/BookMarkable-Home-Page--tp17830736p17831329.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making Component easier to Generify
On Fri, Jun 13, 2008 at 2:44 PM, Matthijs Wensveen [EMAIL PROTECTED] wrote: By the way, the article I supplied and the article on wikipedia do just the same thing. If you look at VerticalScrollBarDecorator.draw you'll see that it delegates the method to the wrapped Window. decorator classes in the onjava article do not perform method delegation across all methods in JComponent, therefore its not a decorator by your own definition? Also look at the C++ example. C++ doesn't have interfaces. So, maybe this is a ui decorator as well...? actually c++ does have interfaces, they are modeled as pure virtual classes, which is what the c++ Window class in the wikipedia article is. -igor At the end of the article there is a list of other design patterns from the GoF book, unfortunately I couldn't find anything about the software decorator pattern you mentioned (also googled it without avail). So, okay, let's end this discussion for Godwin's sake. I really do want to know how to add behaviour in a transparent way to an existing Link's onClick method. Using Behavior or some other means. AOP is an option but feels hacky just to do this (pointcuts should generally match more than one joinpoint). Event listeners are another (but I won't dare begin that discussion again). Best regards, Matthijs Igor Vaynberg wrote: looked over the article. what they do is a ui decorator, it is not the software decorator pattern. there is no method delegation to the child component. what they create is a composite, you can do the same thing in wicket with a Border. -igor On Thu, Jun 12, 2008 at 9:55 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: right. so when you would do it with a class you will actually have to rewire all the methods to forward to the delegate instead of calling super. that is pure insanity and does not make any sense when methods hold logic. that is why it works with an interface, no logic for you to override and forward to the delegate, only the message dispatch itself. sure, technically you can do it even with a concrete class, but you can also do a lot of other things that dont make sense. -igor On Thu, Jun 12, 2008 at 5:54 PM, Matthijs Wensveen [EMAIL PROTECTED] wrote: Igor Vaynberg wrote: look at the java example. notice Window is an interface. Yeah, but that's just because it's good practice to use the interface when there is one. Notice that the actually decorated class is a new SimpleWindow() in DecoratedWindowTest. Window might as well have been an abstract class, or even a concrete one. The idea is that the contract of the class you wrap is maintained, if that is an interface your decorator implements that, when it's a class your decorator extends it. Same idea. Of course, interfaces are cleaner and you can even decorate more then one interface when you want to, but decorating a class is not uncommon practice (at least where I come from). Example: http://www.onjava.com/pub/a/onjava/2003/02/05/decorator.html eg you cant do: add(new DecoratedComponent(someOtherComponent)); No, because component has final methods that you can't override so you can't delegate to them (that whas my point), but not because you can't decorate a class. Matthijs. PS. If you insist on that you can only decorate an interface, I'll call it wrap-extend or something :) -igor On Thu, Jun 12, 2008 at 5:05 PM, Matthijs Wensveen [EMAIL PROTECTED] wrote: Why would the decorator design pattern only work with interfaces? Maybe we're talking about two different this here? (I'm talking about this one: http://en.wikipedia.org/wiki/Decorator_pattern) I can see why behaviors were introduced. A simple example: a factory method creates a link. In my subclass I want the same link with the same onClick behavior but I also want hello to be outputted to System.out. How would I go about doing this with a Behavior? I couldn't figure it out... (which isn't saying it's impossible). Matthijs [EMAIL PROTECTED] wrote: decorators only work with interfaces, component class is not. This is part of the reason why we have behaviors -igor On 6/12/08, Matthijs Wensveen [EMAIL PROTECTED] wrote: Some useful design patterns like Decorator don't work with final methods. Wicket components sometimes have overridable factory methods for child components. The decorator pattern could be very useful here, because you'd be able to decorate the original component with some extra functionality (Link.onClick for example). Unfortunately this doesn't work because some methods are final. Matthijs Igor Vaynberg wrote: i mean generally, for methods, fields, and func args :) most of this stuff can stay final, but people dont bother doing it because its extra typing. -igor On Thu, Jun 12, 2008 at 8:38 AM, James Carman [EMAIL PROTECTED] wrote: You mean like C++? On Thu, Jun 12, 2008 at 11:35 AM, Igor Vaynberg [EMAIL PROTECTED]
Re: Making Component easier to Generify
On Thu, Jun 12, 2008 at 2:06 PM, Matthijs Wensveen [EMAIL PROTECTED] wrote: Some useful design patterns like Decorator don't work with final methods. Wicket components sometimes have overridable factory methods for child components. The decorator pattern could be very useful here, because you'd be able to decorate the original component with some extra functionality (Link.onClick for example). Unfortunately this doesn't work because some methods are final. True, it's been weighing the disadvantages vs the advantages, and so far, ensuring that we wouldn't paint ourselves in the corner too quickly won over flexibility. I think it would be a good idea to take this into consideration with the next major API. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making Component easier to Generify
... this into consideration with the next major API ... revision (1.5) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making Component easier to Generify
True, it's been weighing the disadvantages vs the advantages, and so far, ensuring that we wouldn't paint ourselves in the corner too quickly won over flexibility. To make this 'painless' though, we'd probably need a whole bunch of interfaces. We've looked into moving to a more interface based approach in the past for Wicket, but we concluded that it just got too crazy, increasing the complexity of the API considerably, and had all the disadvantages of interfaces over abstract classes (no guaranteed behavior, everything has to be public and abstract). We might just come to that same conclusion again. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making Component easier to Generify
Igor Vaynberg wrote: On Fri, Jun 13, 2008 at 2:44 PM, Matthijs Wensveen [EMAIL PROTECTED] wrote: By the way, the article I supplied and the article on wikipedia do just the same thing. If you look at VerticalScrollBarDecorator.draw you'll see that it delegates the method to the wrapped Window. decorator classes in the onjava article do not perform method delegation across all methods in JComponent, therefore its not a decorator by your own definition? It's still is a decorator, but I agree it does not do exactly as I thought a proper decorator should do. The delegation is still there, but it is hidden because the wrapped class is added as a child to the decorator. The super.xxx calls take care of calling the needed methods on the wrapped class. But this only works for hierarchies like swing. Hmm.. if I were very puristic, I might not call this decoration at all, in the OO-sense of the pattern. This really just takes a component and puts it somewhere else. It *is* transparent to the (api) user however. It doesn't need to know or care this has happened, so in that sense it is a decorator. Also, I did say: It is not entirely impossible to decorate a class with final methods, you just can't delegate the final methods . So, my definition does not enforce that every method should be delegated. You may read the words Implementing each and every method of a class and delegating to another class is indeed what is needed as Implementing each and every method of a class and delegating to another class is indeed what is *usually / generally* needed :) Also look at the C++ example. C++ doesn't have interfaces. So, maybe this is a ui decorator as well...? actually c++ does have interfaces, they are modeled as pure virtual classes, which is what the c++ Window class in the wikipedia article is. Okay, but then abstract classes in java are interfaces as well :). You said decoration *only* works with interfaces, and there was no way for me to know that your notion of the term interface included classes as well (because then what are we even arguing about :) ) Hm, anyway, let's drop the almost religious fanaticism. We could argue about the definition of the term decorator all year, presumably, but whatever it is called, what I want can't be done in wicket because of some final methods that are in the way. The Link.onClick problem is still unsolved. Matthijs -igor At the end of the article there is a list of other design patterns from the GoF book, unfortunately I couldn't find anything about the software decorator pattern you mentioned (also googled it without avail). So, okay, let's end this discussion for Godwin's sake. I really do want to know how to add behaviour in a transparent way to an existing Link's onClick method. Using Behavior or some other means. AOP is an option but feels hacky just to do this (pointcuts should generally match more than one joinpoint). Event listeners are another (but I won't dare begin that discussion again). Best regards, Matthijs Igor Vaynberg wrote: looked over the article. what they do is a ui decorator, it is not the software decorator pattern. there is no method delegation to the child component. what they create is a composite, you can do the same thing in wicket with a Border. -igor On Thu, Jun 12, 2008 at 9:55 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: right. so when you would do it with a class you will actually have to rewire all the methods to forward to the delegate instead of calling super. that is pure insanity and does not make any sense when methods hold logic. that is why it works with an interface, no logic for you to override and forward to the delegate, only the message dispatch itself. sure, technically you can do it even with a concrete class, but you can also do a lot of other things that dont make sense. -igor On Thu, Jun 12, 2008 at 5:54 PM, Matthijs Wensveen [EMAIL PROTECTED] wrote: Igor Vaynberg wrote: look at the java example. notice Window is an interface. Yeah, but that's just because it's good practice to use the interface when there is one. Notice that the actually decorated class is a new SimpleWindow() in DecoratedWindowTest. Window might as well have been an abstract class, or even a concrete one. The idea is that the contract of the class you wrap is maintained, if that is an interface your decorator implements that, when it's a class your decorator extends it. Same idea. Of course, interfaces are cleaner and you can even decorate more then one interface when you want to, but decorating a class is not uncommon practice (at least where I come from). Example: http://www.onjava.com/pub/a/onjava/2003/02/05/decorator.html eg you cant do: add(new DecoratedComponent(someOtherComponent)); No, because component has final methods that you can't override so you can't delegate to them (that whas my
Re: Making Component easier to Generify
Eelco Hillenius wrote: True, it's been weighing the disadvantages vs the advantages, and so far, ensuring that we wouldn't paint ourselves in the corner too quickly won over flexibility. To make this 'painless' though, we'd probably need a whole bunch of interfaces. We've looked into moving to a more interface based approach in the past for Wicket, but we concluded that it just got too crazy, increasing the complexity of the API considerably, and had all the disadvantages of interfaces over abstract classes (no guaranteed behavior, everything has to be public and abstract). We might just come to that same conclusion again. It's good to know that when you reach the same conclusion it is a deliberate one. BTW, interfaces are useful for this, but not a necessity. Or am I the only one thinking that (I seem to be... hmm...). More interfaces mean even more scrolling through the I's in the javadoc, no, lol. Matthijs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Anchors in Wicket?
I created an Link to another page's anchor similar to the code shown below. The anchor actually gets tagged on to the bookmarkable URL. However, for some reason the browser does not jump to my anchor. Not sure what's going on - is there a particular way I have to create an anchor in Wicket so that the URL causes the browser to scroll further down in the page? Thanks, Michael -Original Message- From: Thijs [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2008 1:38 PM To: users@wicket.apache.org Subject: Re: Anchors in Wicket? This is a bookmarkable link (the only place I use it with) but you get the idea :) import org.apache.wicket.PageParameters; import org.apache.wicket.markup.ComponentTag; import org.apache.wicket.markup.html.link.BookmarkablePageLink; import org.apache.wicket.model.IModel; public class AnchoredBookmarkablePageLink extends BookmarkablePageLink { private static final long serialVersionUID = 1L; private IModel stringAnchor; public AnchoredBookmarkablePageLink(String id, Class pageClass, IModel anchor) { super(id, pageClass); this.stringAnchor = anchor; } public AnchoredBookmarkablePageLink(String id, Class pageClass, PageParameters params, IModel anchor) { super(id, pageClass, params); this.stringAnchor = anchor; } @Override protected CharSequence appendAnchor(ComponentTag tag, CharSequence url) { url = url + # + stringAnchor.getObject().toString(); return url; } } Thijs Michael Mehrle wrote: Mind sharing that? ;-) -Original Message- From: Thijs [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2008 11:23 PM To: users@wicket.apache.org Subject: Re: Anchors in Wicket? The component is any wicket component in the same page or next page if you know that component. What you are doing, an anchor in a different page, I've solved by writing my own subclass of link where I append the '#rsvp' myself. Michael Mehrle schreef: I don't get it - what is the 'component' in the setAnchor() method? If I set an anchor in a completely different page like this: a href=#rsvp / What do I set as the 'component' in the link's setAnchor? Thanks, Michael -Original Message- From: Thijs Vonk [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2008 12:39 PM To: users@wicket.apache.org Subject: Re: Anchors in Wicket? Michael Mehrle wrote: How do create a link that jumps to some anchor in a page? Is there a way to define this in Wicket or do I have to do this manually somehow? Michael yes. use link.setAnchor(Component) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making Component easier to Generify
On Fri, Jun 13, 2008 at 7:02 PM, Matthijs Wensveen [EMAIL PROTECTED] wrote: It's good to know that when you reach the same conclusion it is a deliberate one. BTW, interfaces are useful for this, but not a necessity. Or am I the only one thinking that (I seem to be... hmm...). More interfaces mean even more scrolling through the I's in the javadoc, no, lol. Interfaces aren't required to create decorators. Commons proxy (via Javassist and CGLIB) can create decorators for bean classes or interfaces. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making Component easier to Generify
LOL. -igor On 6/13/08, James Carman [EMAIL PROTECTED] wrote: On Fri, Jun 13, 2008 at 7:02 PM, Matthijs Wensveen [EMAIL PROTECTED] wrote: It's good to know that when you reach the same conclusion it is a deliberate one. BTW, interfaces are useful for this, but not a necessity. Or am I the only one thinking that (I seem to be... hmm...). More interfaces mean even more scrolling through the I's in the javadoc, no, lol. Interfaces aren't required to create decorators. Commons proxy (via Javassist and CGLIB) can create decorators for bean classes or interfaces. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]