Validate RefreshingView
Hi, I've got a problem that I hope someone can help me with and point me in the right direction. Is there a way in the validation phase to validate that a refreshingview contain items? My scenario: I've got a page that holds a form, an ajaxsubmitlink and a panel. The panel in turn has some input controls plus two other panels. The first nested panel holds a refreshingview where the user can add items using a textfield (in the same panel). I need to validate that the user has added atleast one item to the refreshingview, is there a way I can do that? I could use the ajaxsubmitlink's onSubmit function in the page, but that will cause problems in the second nested panel if the validation fails since no database activity will then take place and as I've read somewhere because Wicket clones the modelobject in submits. So that would mean anything entered in the second nested panel will be lost. -Håkan
How to dynamic add links to WebMarkupContainer
Hi, all I have a WebMarkupContainer in my page, and I need to create some links to this WebMarkupContainer.But I do not have markup like a wicket:id= foo/a, because I do not know how many links I need to create, but I do not know how to create links without markup. Can anyone help me? Thanks very much! -- -- Enjoy. Thanks! Haulyn Microproduction Mobile: +086-15864011231 email: saharab...@gmail.com, hmp.hau...@foxmail.com website: http://haulynjason.net gtalk: saharab...@gmail.com yahoo: jia_hao...@yahoo.com msn: saharab...@gmail.com skype: saharabear QQ: 378606292 Haulyn Jason
Re: How to dynamic add links to WebMarkupContainer
El mié, 23-09-2009 a las 17:21 +0800, Haulyn R. Jason escribió: Hi, all I have a WebMarkupContainer in my page, and I need to create some links to this WebMarkupContainer.But I do not have markup like a wicket:id= foo/a, because I do not know how many links I need to create, but I do not know how to create links without markup. Can anyone help me? Thanks very much! Use RepeatingView, ListView or something like them. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to dynamic add links to WebMarkupContainer
On Wed, Sep 23, 2009 at 3:09 PM, Martin Grigorov mcgreg...@e-card.bgwrote: El mié, 23-09-2009 a las 17:21 +0800, Haulyn R. Jason escribió: Hi, all I have a WebMarkupContainer in my page, and I need to create some links to this WebMarkupContainer.But I do not have markup like a wicket:id= foo/a, because I do not know how many links I need to create, but I do not know how to create links without markup. Can anyone help me? Thanks very much! Use RepeatingView, ListView or something like them. Sound like you want to create a bookmark kind of link e.g. a href=#fooClick Me!/a will take you to a name=fooBlah/a You can use a Label, put any HTML you want as the String / Model and have it rendered, just do setEscapeModelStrings(false) - Peter
Re: How to dynamic add links to WebMarkupContainer
Hi, Peter, happy to meet you here. Label, Sounds good, but How can I get the html String generated by Link class with onClicked method override? On Wed, Sep 23, 2009 at 5:45 PM, Peter Thomas ptrtho...@gmail.com wrote: On Wed, Sep 23, 2009 at 3:09 PM, Martin Grigorov mcgreg...@e-card.bg wrote: El mié, 23-09-2009 a las 17:21 +0800, Haulyn R. Jason escribió: Hi, all I have a WebMarkupContainer in my page, and I need to create some links to this WebMarkupContainer.But I do not have markup like a wicket:id= foo/a, because I do not know how many links I need to create, but I do not know how to create links without markup. Can anyone help me? Thanks very much! Use RepeatingView, ListView or something like them. Sound like you want to create a bookmark kind of link e.g. a href=#fooClick Me!/a will take you to a name=fooBlah/a You can use a Label, put any HTML you want as the String / Model and have it rendered, just do setEscapeModelStrings(false) - Peter -- -- Enjoy. Thanks! Haulyn Microproduction Mobile: +086-15864011231 email: saharab...@gmail.com, hmp.hau...@foxmail.com website: http://haulynjason.net gtalk: saharab...@gmail.com yahoo: jia_hao...@yahoo.com msn: saharab...@gmail.com skype: saharabear QQ: 378606292 Haulyn Jason
Best way to handle circular references
Hi all, I'm developing a wicket application and I'm facing a problem. I built a menupanel that shows the menu to access the various aplication pages; since the panel needs to show the pages it contains a list of links that when clicked simply do the the following setResponsePage(new Page()); In the class menupanel.java I must reference Page In the class Page.java I must reference MenuPanel At the end I have a circular reference between manupanel and the various Page and I don't like it. While reading wicketInAction I noted that in the examples there is a circular reference between Checkout page and Index page. Are circular references unavoidable with Wicket? Is there a best practive to avoid this situation? Thanks, Giovanni -- Giovanni Cuccu Via del Borgo di S. Pietro, 90/c - 40126 Bologna e-mail: giovanni.cuccu _at_ cup2000.it - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Collection of strings in form
What is the best way to handle a collection of strings in a form? DomainObject String property1 String property2 CollectionString property3 I'm thinking either some type of repeater, or a text area that creates an element in the collection for each line (might be easier). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Best way to handle circular references
It looks like you are looking for cohesion. In the class menupanel.java I must reference Page In the class Page.java I must reference MenuPanel menupanel can to be an parameter to PageXXX; PageXXX can to be abstract and have an abstract method : abstract protected Page getPageToSetOnReturnOnCase1Case2And3(PossibleParameter p); noted that in the examples there is a circular reference between Checkout page and Index page on the example the objects has an reference to the other type class. And the class object do not has an reference those objects. I don't see it as circular reference. Are circular references unavoidable with Wicket? do they are unavoidable in java, in object oriented paradigm? Is this the correct question? Is there a best practive to avoid this situation? When I avoid an circular reference, I make a choice between a several possible solutions, the on I get depends on the class objectives On Wed, Sep 23, 2009 at 7:21 AM, Giovanni Cuccu giovanni.cu...@cup2000.itwrote: Hi all, I'm developing a wicket application and I'm facing a problem. I built a menupanel that shows the menu to access the various aplication pages; since the panel needs to show the pages it contains a list of links that when clicked simply do the the following setResponsePage(new Page()); In the class menupanel.java I must reference Page In the class Page.java I must reference MenuPanel At the end I have a circular reference between manupanel and the various Page and I don't like it. While reading wicketInAction I noted that in the examples there is a circular reference between Checkout page and Index page. Are circular references unavoidable with Wicket? Is there a best practive to avoid this situation? Thanks, Giovanni -- Giovanni Cuccu Via del Borgo di S. Pietro, 90/c - 40126 Bologna e-mail: giovanni.cuccu _at_ cup2000.it - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Regarding: HybridUrlCodingStrategy and session expired
Hi, I hope someone can help me on this issue. I have a payment page and receipt page. The receipt page invalidates the session, so user can't go back. Due to some external configuration i needed to use HybridUrlCodingStrategy to make sure that payment page has a url containing ...Secure. This way it would be caught by some setup we have, making the page secure. Before i used the HybridUrlCodingStrategy the goback button from the receipt page to the payment page would show me the session expired error. But since i have been using the HybridUrlCodingStrategy i get an error, because wicket is trying to process the payment page. The payment page and receipt page are non-bookmarkable, but the HybridUrlCodingStrategy consideres the page as bookmarkable. Could it be related to this..? Does anyone have an idea on what i am doing wrong, or what to do to fix this problem so i get the session expired when using goback button ? Best Regards Muro
Re: Stateless Applications and Wicket
Interesting point! I'm also wondering if this is somehow feasible... On Wed, Sep 23, 2009 at 1:01 AM, Ricardo Mayerhofer ricardo.ekm.lis...@gmail.com wrote: It would be very nice to see better support for stateless applications in wicket. Some topics that come to my mind right now are: - Ajax, - PagingNavigator, - Dropdown onSelectionChange. It works fine if I overide getStatelessHint to return true and there is no enclosing form. If there is a ancolsing form the following message appears: Attempt to access unknown request listener interface IOnChangeListener. Pehaps it could get fixed, and stateless hint always returns true for this one. May I open a Jira issue for this? I know that many have said that if you are building this kind of application perhaps wicket is not for you. But IMO even considering that wicket was not initially built with this kind of problem in mind, he is better in this field than many frameworks out there. That's why we've choosen wicket to develop a high traffic stateless website, and he's doing well, except for some issues during development, like the points listed above. We are now using jquery as a complement to wicket, but surely it would be much easier if we could count on wicket ajax for example. Ricardo - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Best way to handle circular references
Thanks for the response, I try to clarify my point of view. Before using wicket I don't remember that my classes were cross references, I always paid attention that if class A references Class B Class B can't reference Class A (even in imports). After starting wicket development I've seen several cases of circular references in my code. Since these circular references sometimes seem natural (Page references MenuPanel and MenuPanel references Page) but at the same time I consider the a bad practice I'm asking to myself and to this list if someone had the same thoughts and what was the conclusion. What is your advice? Should I relax my best practice about class circular referencing? Should I code my Wicket app in a different manner? Thanks, Giovanni It looks like you are looking for cohesion. In the class menupanel.java I must reference Page In the class Page.java I must reference MenuPanel menupanel can to be an parameter to PageXXX; PageXXX can to be abstract and have an abstract method : abstract protected Page getPageToSetOnReturnOnCase1Case2And3(PossibleParameter p); noted that in the examples there is a circular reference between Checkout page and Index page on the example the objects has an reference to the other type class. And the class object do not has an reference those objects. I don't see it as circular reference. Are circular references unavoidable with Wicket? do they are unavoidable in java, in object oriented paradigm? Is this the correct question? Is there a best practive to avoid this situation? When I avoid an circular reference, I make a choice between a several possible solutions, the on I get depends on the class objectives On Wed, Sep 23, 2009 at 7:21 AM, Giovanni Cuccu giovanni.cu...@cup2000.itwrote: Hi all, I'm developing a wicket application and I'm facing a problem. I built a menupanel that shows the menu to access the various aplication pages; since the panel needs to show the pages it contains a list of links that when clicked simply do the the following setResponsePage(new Page()); In the class menupanel.java I must reference Page In the class Page.java I must reference MenuPanel At the end I have a circular reference between manupanel and the various Page and I don't like it. While reading wicketInAction I noted that in the examples there is a circular reference between Checkout page and Index page. Are circular references unavoidable with Wicket? Is there a best practive to avoid this situation? Thanks, Giovanni -- Giovanni Cuccu Via del Borgo di S. Pietro, 90/c - 40126 Bologna e-mail: giovanni.cuccu _at_ cup2000.it - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Giovanni Cuccu Via del Borgo di S. Pietro, 90/c - 40126 Bologna e-mail: giovanni.cuccu _at_ cup2000.it - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ModalWindow and RedirectRequestTarget
Hi, I have a ModalWindow and want to redirect to a download of a shared resource if the user clicks ok (i.e. closes the window). Currently, I am doing the following to achieve this, but Wicket produces a slightly wrong URL in the call to RequestCycle.urlFor(): setWindowClosedCallback(new WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { ValueMap params = ...; ResourceReference reference = new ResourceReference(myResource); CharSequence redirectUrl = RequestCycle.get().urlFor(reference, params); IRequestTarget target = new RedirectRequestTarget(redirectUrl.toString()); RequestCycle.get().setRequestTarget(target); } } This correctly closes the window and redirects afterwards, but the URL produced by the call to urlFor() starts with ../ because in ServletWebRequest.getRelativePathPrefixToWicketHandler() the if-statement looking for an Ajax-Request yields true (as the close request from the ModalWindow is an Ajax-Request) and then prepends the ../. What would be the correct way to do this? Closing the modal window and redirecting to a shared resource afterwards. Thanks in advance for any hints, Timo -- Timo B. Hübel M.Sc. freiheit.com technologies gmbh Straßenbahnring 22 / 20251 Hamburg, Germany fon +49 (0)40 / 890584-0 fax +49 (0)40 / 890584-20 HRB Hamburg 70814 38CC 735A AA87 7FA8 A18F 5050 579F 7EA6 C3B8 E81C Geschäftsführer: Claudia Dietze, Stefan Richter, Jörg Kirchhof signature.asc Description: This is a digitally signed message part.
Re: Is it the best way to code a Link depending on a condition
ok, i understand, thanks, NM On Tue, Sep 22, 2009 at 9:45 PM, Jeremy Thomerson jer...@wickettraining.com wrote: It's the same reason you shouldn't use new Label(id object.getSomeText());. See this example: public MyPage () { Person p = getPersonFromSomewhere(); Label l = new Label(numberOfPhoneNumbers, p.getPhoneNumbers().size()); l.setVisible(p.getPhoneNumbers().size() 0); new Link(addPhoneNumber) { onClick() { p.addPhoneNumber(123-456-7890); } } } When you add the phone number, it would not show up. Not only would your label not be able to get the new value for the size of the phone numbers, but it would also not change it's visibility. Why? Because you statically set both of those in the constructor. They can't change unless you go to a completely new instance of the page. But clicking that link (or performing some ajax operation) won't create a new page - they'll use the one you're already on. Synopsis: You should use models and override isVisible because they always retrieve the latest information for every render. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Sep 22, 2009 at 8:18 AM, Nicolas Melendez nmelen...@getsense.com.ar wrote: Jeremy:you say 2 - don't call setEnabled() - override isEnabled why is better override isEnable then setEnable? thanks NM On Mon, Sep 21, 2009 at 9:44 AM, cmoulliard cmoulli...@gmail.com wrote: Joseph, Can you explain a little bit what you mean by provide it with attribute (IModelString) ? private Label labelTitle; public static Label createLabelTitle(String title) { return new Label(title,new Model( title )); } -- becomes private Label labelTitle; public static Label createLabelTitle(String title) { return new Label(title,new PropertyModel( ModelClass, title )); } Is it right what I create ? Joseph Pachod wrote: cmoulliard wrote: What I have done to avoid to repeat the creation of the labels is to define and use static method private Label labelTitle; public static Label getLabelTitle(String title) { return new Label(title,new Model( title )); } I personally would name this method createLabelTitle(String title) or getNewLabelTitle(String title), for explicitness. Furthermore, I would directly provide it with a final IModelString title attribute, not to dictate how the data has to be provided (dynamic or not for example). In the end, this method is fine for just a label, but for anything more complex a panel would be the way to go I would say. The main exception here I see right now is the case of pages. For example, if we're speaking of a page title, then I would define it in my base page and make an abstract String getTitle() method in the base page so I'm sure everyone set it up later on. I would do the same if it's a specific kind of structured page, for example an abstract class ContentHoldingPage extend TheBasePage. ++ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Charles Moulliard SOA Architect My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/ -- View this message in context: http://www.nabble.com/Is-it-the-best-way-to-code-a-Link-depending-on-a-condition-tp25488603p25530206.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Form Processing problem on pages with Border - Wicket 1.4.1
I am migrating a project from 1.3.6 to 1.4.1. I've run into a problem and I'm not sure if this is a bug or not. Most of the pages have a border and the border has a DropDownChoice in it (as well as other components). Technically it's in a panel in the border. The Form objects are typically children of the border, like add(border); border.add(inputForm); When the form is submitted, the DropDownChoice's value is being reset. I've traced through the code and it looks like the root of the cause is in Form#internalUpdateFormComponentModels. This is checking if there is a border and, if yes, then visiting all the components of the border. The internalUpdateFormComponentModels method in 1.3.6 didn't look for the border and visit it's components. It's not obvious to me why this needs to be done now in 1.4. So ultimately FormComponent#visitComponentsPostOrderHelper is being called for all components whether they are inside the form or not. It's returning visitor.component(component), which calls Form#component and that calls ((IFormModelUpdateListener)component).updateModel(); I looked through the nabble logs and noticed this entry here: http://www.nabble.com/Form-processing-issues-and-questions-%28particularly-r elated-to-Border-and-ListMultipleChoice%29-td25251849.html#a25251849 Is there something I need to do here? I'm not seeing any way of telling the Form not to visit the Border's controls, and again, I'm not sure why it's doing this. I'd greatly appreciate any insight that can be offered. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
componment hierarchy changed between rendering and form submission
I have a form used for performing a search on a database. If I fill the form and then I submit it for the search and wait until the results appear, it works well. The search takes some seconds (5-10 seconds). Instead, if I change some fields, dropdown choices, checkboxes on the form after clicking on the submit button and before the result appear, I get the following error: Unexpected RuntimeException WicketMessage: submitted http post value [check180] for CheckGroup component [28:tabs:panel:main:form:searchType] contains an illegal relative path element [check180] which does not point to a Check component. Due to this the CheckGroup component cannot resolve the selected Check component pointed to by the illegal value. A possible reason is that componment hierarchy changed between rendering and form submission.Root cause:org.apache.wicket.WicketRuntimeException: submitted http post value [check180] for CheckGroup component [28:tabs:panel:main:form:searchType] contains an illegal relative path element [check180] which does not point to a Check component. Due to this the CheckGroup component cannot resolve the selected Check component pointed to by the illegal value. A possible reason is that componment hierarchy changed between rendering and form submission. at org.apache.wicket.markup.html.form.CheckGroup.convertValue(CheckGroup.java:140) at org.apache.wicket.markup.html.form.FormComponent.convertInput(FormComponent.java:1189) at org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1093) at org.apache.wicket.markup.html.form.Form$22.validate(Form.java:1905) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:166) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:421) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:408) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:385) at org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1089) at org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:1897) at org.apache.wicket.markup.html.form.Form.validate(Form.java:1886) at org.apache.wicket.markup.html.form.Form.process(Form.java:846) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:808) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1239) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1316) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418) at org.apache.wicket.RequestCycle.request(RequestCycle.java:532) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:201) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378) at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390) at
Date validation in a form
I would like to know How I can validate the string date inputted by a user in a textfield of my form ? e.g : The SimpleDateformat to be used to create a java Date is : dd/MM/ So I would like to check that the user has well introduced its date using this format Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer * blog : http://cmoulliard.blogspot.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Collection of strings in form
or something like this http://wicketinaction.com/2008/10/building-a-listeditor-form-component/ -igor On Wed, Sep 23, 2009 at 3:32 AM, Sam Barrow s...@sambarrow.com wrote: What is the best way to handle a collection of strings in a form? DomainObject String property1 String property2 CollectionString property3 I'm thinking either some type of repeater, or a text area that creates an element in the collection for each line (might be easier). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor
Hi all, ich have a component (textfield) with an FXValidationAjaxHandler. If i set this component in pageconstructor to visible(false) then the needed javascript code for validation is not contributed to pageheader. if set to visible(true) all is fine. does anyone had the same problem and if so, is there a workaround available? greets chris snippet: ... pComponent.add(new FXValidationAjaxHandler(pFXJavascriptEvent)); this.pComponent.setOutputMarkupPlaceholderTag(true); this.pComponent.setOutputMarkupId(true) this.pComponent.setVisible(false); // no javascript is added //this.pComponent.setVisible(true); // javascript is added form.add(this.pComponent); ... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket 1.4.1 and HtmlUnit
Hi,after upgrade from wicket 1.4-rc2 to 1.4.1 I have problems with my HtmlUnit tests. It seems to be a problem with form submitting. I'm not sure if this is a wicket problem, but with version 1.4.rc2 it works fine. Here a sample code: HtmlPage page = client.getPage(request); HtmlButton btn = getSubmitButton(page); ... btn.click(); List results = page.getByXpath(xpath to my filter results); The problem is that the page isn't updated. When I write page = page.refresh(); after btn.click() it works fine, but it should not be necessary. The button causes an ajax request so btn.click() returns no new page. As I said, I don't know if this is a problem in wicket, but when I downgrade into 1.4-rc2 the tests work fine. I've also tried with 1.4.-rc5: he same as in 1.4.1 Does anyone has any idea? greets Tomek
Maven eclipse plugin
hi i am new to eclipse and maven i followed the wicket wiki to create a new wicket project after created the pom i try to create the project using the eclipse plugin (mvn eclipse:eclipse) i got the following error [INFO] Scanning for projects... [INFO] [INFO] Building quickstart [INFO]task-segment: [eclipse:eclipse] [INFO] [INFO] Preparing eclipse:eclipse [INFO] No goals needed for project - skipping [INFO] [eclipse:eclipse {execution: default-cli}] [FATAL ERROR] org.apache.maven.plugin.eclipse.EclipsePlugin#execute() caused a l inkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms: [FATAL ERROR] Plugin realm = app0.child-container[org.apache.maven.plugins:maven -eclipse-plugin:2.5.1] urls[0] = file:/C:/Users/Ananth/.m2/repository/org/apache/maven/plugins/maven-ec lipse-plugin/2.5.1/maven-eclipse-plugin-2.5.1.jar urls[1] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-archiv er/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar urls[2] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-utils/ 1.4.5/plexus-utils-1.4.5.jar urls[3] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-intera ctivity-jline/1.0-alpha-5/plexus-interactivity-jline-1.0-alpha-5.jar urls[4] = file:/C:/Users/Ananth/.m2/repository/jline/jline/0.9.1/jline-0.9.1.jar urls[5] = file:/C:/Users/Ananth/.m2/repository/org/apache/maven/maven-archiver/2 .2/maven-archiver-2.2.jar urls[6] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-resour ces/1.0-alpha-4/plexus-resources-1.0-alpha-4.jar urls[7] = file:/C:/Users/Ananth/.m2/repository/biz/aQute/bndlib/0.0.145/bndlib-0 .0.145.jar urls[8] = file:/C:/Users/Ananth/.m2/repository/org/apache/maven/shared/maven-osg i/0.2.0/maven-osgi-0.2.0.jar urls[9] = file:/C:/Users/Ananth/.m2/repository/org/eclipse/core/resources/3.3.0- v20070604/resources-3.3.0-v20070604.jar [FATAL ERROR] Container realm = plexus.core urls[0] = file:/D:/Program Files/Apache Software Foundation/apache-maven-2.2.0/l ib/maven-2.2.0-uber.jar [INFO] [ERROR] FATAL ERROR [INFO] [INFO] org/eclipse/core/internal/localstore/SafeChunkyInputStream org.eclipse.core.internal.localstore.SafeChunkyInputStream [INFO] [INFO] Trace java.lang.NoClassDefFoundError: org/eclipse/core/internal/localstore/SafeChunkyI nputStream at org.apache.maven.plugin.eclipse.EclipsePlugin.getWorkspaceConfigurati on(EclipsePlugin.java:1473) at org.apache.maven.plugin.eclipse.EclipsePlugin.fillDefaultClasspathCon tainers(EclipsePlugin.java:1222) at org.apache.maven.plugin.eclipse.EclipsePlugin.setup(EclipsePlugin.jav a:753) at org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(AbstractId eSupportMojo.java:483) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:553) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:523) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:4 1) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: java.lang.ClassNotFoundException: org.eclipse.core.internal.localstor e.SafeChunkyInputStream at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at
Re: Maven eclipse plugin
What do you mean after created the pom? If you're following the guide here, http://cwiki.apache.org/WICKET/windows-guide-to-installing-wicket-on-eclipse-with-maven.html, you shouldn't have to create the pom manually. The mvn archetype:create command will do that for you. Dane On Wed, Sep 23, 2009 at 8:00 AM, Anantha Kumaran ananthakuma...@gmail.comwrote: hi i am new to eclipse and maven i followed the wicket wiki to create a new wicket project after created the pom i try to create the project using the eclipse plugin (mvn eclipse:eclipse) i got the following error [INFO] Scanning for projects... [INFO] [INFO] Building quickstart [INFO]task-segment: [eclipse:eclipse] [INFO] [INFO] Preparing eclipse:eclipse [INFO] No goals needed for project - skipping [INFO] [eclipse:eclipse {execution: default-cli}] [FATAL ERROR] org.apache.maven.plugin.eclipse.EclipsePlugin#execute() caused a l inkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms: [FATAL ERROR] Plugin realm = app0.child-container[org.apache.maven.plugins:maven -eclipse-plugin:2.5.1] urls[0] = file:/C:/Users/Ananth/.m2/repository/org/apache/maven/plugins/maven-ec lipse-plugin/2.5.1/maven-eclipse-plugin-2.5.1.jar urls[1] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-archiv er/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar urls[2] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-utils/ 1.4.5/plexus-utils-1.4.5.jar urls[3] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-intera ctivity-jline/1.0-alpha-5/plexus-interactivity-jline-1.0-alpha-5.jar urls[4] = file:/C:/Users/Ananth/.m2/repository/jline/jline/0.9.1/jline-0.9.1.jar urls[5] = file:/C:/Users/Ananth/.m2/repository/org/apache/maven/maven-archiver/2 .2/maven-archiver-2.2.jar urls[6] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-resour ces/1.0-alpha-4/plexus-resources-1.0-alpha-4.jar urls[7] = file:/C:/Users/Ananth/.m2/repository/biz/aQute/bndlib/0.0.145/bndlib-0 .0.145.jar urls[8] = file:/C:/Users/Ananth/.m2/repository/org/apache/maven/shared/maven-osg i/0.2.0/maven-osgi-0.2.0.jar urls[9] = file:/C:/Users/Ananth/.m2/repository/org/eclipse/core/resources/3.3.0- v20070604/resources-3.3.0-v20070604.jar [FATAL ERROR] Container realm = plexus.core urls[0] = file:/D:/Program Files/Apache Software Foundation/apache-maven-2.2.0/l ib/maven-2.2.0-uber.jar [INFO] [ERROR] FATAL ERROR [INFO] [INFO] org/eclipse/core/internal/localstore/SafeChunkyInputStream org.eclipse.core.internal.localstore.SafeChunkyInputStream [INFO] [INFO] Trace java.lang.NoClassDefFoundError: org/eclipse/core/internal/localstore/SafeChunkyI nputStream at org.apache.maven.plugin.eclipse.EclipsePlugin.getWorkspaceConfigurati on(EclipsePlugin.java:1473) at org.apache.maven.plugin.eclipse.EclipsePlugin.fillDefaultClasspathCon tainers(EclipsePlugin.java:1222) at org.apache.maven.plugin.eclipse.EclipsePlugin.setup(EclipsePlugin.jav a:753) at org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(AbstractId eSupportMojo.java:483) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:553) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:523) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:4 1) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at
Re: Wicket 1.4.1 and HtmlUnit
your app works fine in a browser, right? so its most likely an htmlunit problem. -igor On Wed, Sep 23, 2009 at 7:31 AM, Tomek Sniadach tomek.sniad...@googlemail.com wrote: Hi,after upgrade from wicket 1.4-rc2 to 1.4.1 I have problems with my HtmlUnit tests. It seems to be a problem with form submitting. I'm not sure if this is a wicket problem, but with version 1.4.rc2 it works fine. Here a sample code: HtmlPage page = client.getPage(request); HtmlButton btn = getSubmitButton(page); ... btn.click(); List results = page.getByXpath(xpath to my filter results); The problem is that the page isn't updated. When I write page = page.refresh(); after btn.click() it works fine, but it should not be necessary. The button causes an ajax request so btn.click() returns no new page. As I said, I don't know if this is a problem in wicket, but when I downgrade into 1.4-rc2 the tests work fine. I've also tried with 1.4.-rc5: he same as in 1.4.1 Does anyone has any idea? greets Tomek - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Disable Ajax Buttons/Links while a in request progress
I assume you meant to do this: AjaxLink favLink = new AjaxLink(fav) { @Override protected IAjaxCallDecorator getAjaxCallDecorator() { return new IAjaxCallDecorator() { public CharSequence decorateOnFailureScript( CharSequence arg0) { return this.disabled=false;; } public CharSequence decorateOnSuccessScript( CharSequence arg0) { return this.disabled=false;; } public CharSequence decorateScript(CharSequence script) { return this.disabled=true;+script; } }; } }; But doing this does not work and still causes a double submit if I double click on the link really fast. Anything I'm missing? Any other suggestions? Tim igor.vaynberg wrote: ajaxcalldecorator { decoratescript(string script) { return this.disabled=true;+script; } decoratesuccess() { return this.disabled=false; } decoratefailure() { return this.disabled=false; } } -igor On 11/5/07, Francisco Diaz Trepat - gmail francisco.diaztre...@gmail.com wrote: Hi, I wish to discuss best practices for disabling an AjaxLink and a AjaxButton while a previous request is being process. f(t) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Disable-Ajax-Buttons-Links-while-a-in-request-progress-tp13591964p25531206.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: August London Wicket Event (just a drink?)
Oct 7 is looming and is the page updated? nooo! :-P Y. On 5 Aug 2009, at 20:18, jWeekend wrote: As many of our guests enjoy their hard-won summer holidays, we will hold our next London Wicket Event on October 7th (dates/location/ presentation TBC here soon). In the meantime, for those of you who may be about to experience withdrawal symptoms missing our apres-Wicket refreshments, we're fixing a quiet drink on Monday evening. Send us a note on the jWeekend Contact Us page if you can make it and I'll send you a confirmation the venue (central London) and times (19:00ish) when they're fixed. Regards - Cemal jWeekend OO Java Technologies http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket in France
Hello, Are there any Wicketers out there living in Bordeaux, France? Regards, Pierre -- Sans amis était le grand maître des mondes, Eprouvait manque, ce pour quoi il créa les esprits, Miroirs bienveillants de sa béatitude. Mais au vrai, il ne trouva aucun égal, Du calice du royaume total des âmes Ecume jusqu'à lui l'infinité. (Schiller, l'amitié)
Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor
javascript contributions do not show up for components that are not visible, add it to a visible component instead. -igor On Wed, Sep 23, 2009 at 7:15 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Hi all, ich have a component (textfield) with an FXValidationAjaxHandler. If i set this component in pageconstructor to visible(false) then the needed javascript code for validation is not contributed to pageheader. if set to visible(true) all is fine. does anyone had the same problem and if so, is there a workaround available? greets chris snippet: ... pComponent.add(new FXValidationAjaxHandler(pFXJavascriptEvent)); this.pComponent.setOutputMarkupPlaceholderTag(true); this.pComponent.setOutputMarkupId(true) this.pComponent.setVisible(false); // no javascript is added //this.pComponent.setVisible(true); // javascript is added form.add(this.pComponent); ... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Disable Ajax Buttons/Links while a in request progress
if the clientside is not good enough then use a serverside check http://markmail.org/message/leji5o6dmubffm6q -igor On Wed, Sep 23, 2009 at 8:55 AM, tdelesio tdele...@gmail.com wrote: I assume you meant to do this: AjaxLink favLink = new AjaxLink(fav) { �...@override protected IAjaxCallDecorator getAjaxCallDecorator() { return new IAjaxCallDecorator() { public CharSequence decorateOnFailureScript( CharSequence arg0) { return this.disabled=false;; } public CharSequence decorateOnSuccessScript( CharSequence arg0) { return this.disabled=false;; } public CharSequence decorateScript(CharSequence script) { return this.disabled=true;+script; } }; } }; But doing this does not work and still causes a double submit if I double click on the link really fast. Anything I'm missing? Any other suggestions? Tim igor.vaynberg wrote: ajaxcalldecorator { decoratescript(string script) { return this.disabled=true;+script; } decoratesuccess() { return this.disabled=false; } decoratefailure() { return this.disabled=false; } } -igor On 11/5/07, Francisco Diaz Trepat - gmail francisco.diaztre...@gmail.com wrote: Hi, I wish to discuss best practices for disabling an AjaxLink and a AjaxButton while a previous request is being process. f(t) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Disable-Ajax-Buttons-Links-while-a-in-request-progress-tp13591964p25531206.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Date validation in a form
see DateTextField in extensions -igor On Wed, Sep 23, 2009 at 7:13 AM, Charles Moulliard cmoulli...@gmail.com wrote: I would like to know How I can validate the string date inputted by a user in a textfield of my form ? e.g : The SimpleDateformat to be used to create a java Date is : dd/MM/ So I would like to check that the user has well introduced its date using this format Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer * blog : http://cmoulliard.blogspot.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket in Italy
Hi, are there any Wicketers living in Turin, Italy? Best regards, giovanni Resources are limited, Imagination is unlimited.
Re: Best way to handle circular references
what is the actual problem you are having with this other then i dont like it? -igor On Wed, Sep 23, 2009 at 3:21 AM, Giovanni Cuccu giovanni.cu...@cup2000.it wrote: Hi all, I'm developing a wicket application and I'm facing a problem. I built a menupanel that shows the menu to access the various aplication pages; since the panel needs to show the pages it contains a list of links that when clicked simply do the the following setResponsePage(new Page()); In the class menupanel.java I must reference Page In the class Page.java I must reference MenuPanel At the end I have a circular reference between manupanel and the various Page and I don't like it. While reading wicketInAction I noted that in the examples there is a circular reference between Checkout page and Index page. Are circular references unavoidable with Wicket? Is there a best practive to avoid this situation? Thanks, Giovanni -- Giovanni Cuccu Via del Borgo di S. Pietro, 90/c - 40126 Bologna e-mail: giovanni.cuccu _at_ cup2000.it - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: + key as alternative for tab key
Boydens Joeri (OZ joeri.boydens at oz.be writes: How would you do this in an elegant and generic way ? Joeri Also, take a look at wicketstuff-input-events Daniel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Palette Update Behaviour Problem
I am using a Palette to assign multiple Category objects to a Document object. When I select a Category, the Palette seems to operate correctly on-screen, but I'm having two issues: 1) debugging the code, the selected choice (in the onUpdate below) is ALWAYS the first item in the allCategories list 2) this (incorrect) Category is added to the Document, but does not seem to stay that way. If I switch to another Document and then come back to the original, there are no longer any Categories I've scoured this list but haven't managed to find something directly applicable to this situation. Can anyone assist? What am I doing wrong here? IChoiceRendererCategory renderer = new ChoiceRendererCategory ( name ); final IModel selected = new Model((Serializable) selectedDocument.getCategories()); IModel allCategories = new Model((Serializable)categories); final PaletteCategory documentsPalette = new PaletteCategory(categoryPalette, selected, allCategories, renderer, 10, true) { @Override protected Recorder newRecorderComponent() { final Recorder recorder = new Recorder(recorder, this); recorder.setOutputMarkupId( true ); recorder.add(new AjaxFormComponentUpdatingBehavior (onchange) { @Override protected void onUpdate( AjaxRequestTarget ajaxRequestTarget) { selectedCategory.addCategory((Category) recorder.getSelectedChoices().next()); } }); return recorder; } }; Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor
Hi, first thanks for reply. Well, it's not possible to add it to a visible component. Let me explain. I have 2 custom panels and depending on the selection in a dropdownchoice the corresponding panel gets visible or hidden. Because one of these panels need to be invisible on page construction (so not both are showing up) i need to set it invisible. If i then select it in the dropdownchoice i gets visible. And now the problem begins. Cause of the initial invisibility the needed javascript code for validation of the panel fields isn't injected. How can i workaround this? Thanks in advance chris -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Mi 23.09.2009 19:20 An: users@wicket.apache.org Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor javascript contributions do not show up for components that are not visible, add it to a visible component instead. -igor On Wed, Sep 23, 2009 at 7:15 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Hi all, ich have a component (textfield) with an FXValidationAjaxHandler. If i set this component in pageconstructor to visible(false) then the needed javascript code for validation is not contributed to pageheader. if set to visible(true) all is fine. does anyone had the same problem and if so, is there a workaround available? greets chris snippet: ... pComponent.add(new FXValidationAjaxHandler(pFXJavascriptEvent)); this.pComponent.setOutputMarkupPlaceholderTag(true); this.pComponent.setOutputMarkupId(true) this.pComponent.setVisible(false); // no javascript is added //this.pComponent.setVisible(true); // javascript is added form.add(this.pComponent); ... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Is it the best way to code a Link depending on a condition
hi Charles The whole issue is that you don't know how the data (in this case a String) is to be retrieved. Can it be read only once ? Should it be refresh on each request cycle ? On each access to the data ? Does it come from a database ? Wicket's model allows you to go away from all these considerations : you just want to be able to get the string. Just let the users of your wicket component decide how they want to provide the data. As such, your example is, I think, broken : private Label labelTitle; public static Label createLabelTitle(String title) { return new Label(title,new PropertyModel( ModelClass, title )); } What if someone wants to change this string ? title = my new title won't work there ! Thus, it should be, IMO : public static Label createLabelTitle(final IModelString titleModel) { return new Label(title,titleModel.get()); } ++ NB : you might be interested by this article http://blog.jteam.nl/2009/09/16/wicket-dos-and-donts/ Joseph, Can you explain a little bit what you mean by provide it with attribute (IModelString) ? private Label labelTitle; public static Label createLabelTitle(String title) { return new Label(title,new Model( title )); } -- becomes private Label labelTitle; public static Label createLabelTitle(String title) { return new Label(title,new PropertyModel( ModelClass, title )); } Is it right what I create ? Joseph Pachod wrote: cmoulliard wrote: What I have done to avoid to repeat the creation of the labels is to define and use static method private Label labelTitle; public static Label getLabelTitle(String title) { return new Label(title,new Model( title )); } I personally would name this method createLabelTitle(String title) or getNewLabelTitle(String title), for explicitness. Furthermore, I would directly provide it with a final IModelString title attribute, not to dictate how the data has to be provided (dynamic or not for example). In the end, this method is fine for just a label, but for anything more complex a panel would be the way to go I would say. The main exception here I see right now is the case of pages. For example, if we're speaking of a page title, then I would define it in my base page and make an abstract String getTitle() method in the base page so I'm sure everyone set it up later on. I would do the same if it's a specific kind of structured page, for example an abstract class ContentHoldingPage extend TheBasePage. ++ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Charles Moulliard SOA Architect My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/ -- View this message in context: http://www.nabble.com/Is-it-the-best-way-to-code-a-Link-depending-on-a-condition-tp25488603p25530206.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket in France
hi Not in Bordeaux, but France is bigger than just this town no ? ;) But then I admit living place, Alsace, might seem quite far and foreign to you ;) However, you might be interested by this french forum : http://www.developpez.net/forums/f1265/java/developpement-web-java/frameworks/wicket/ ++ Hello, Are there any Wicketers out there living in Bordeaux, France? Regards, Pierre -- Sans amis était le grand maître des mondes, Eprouvait manque, ce pour quoi il créa les esprits, Miroirs bienveillants de sa béatitude. Mais au vrai, il ne trouva aucun égal, Du calice du royaume total des âmes Ecume jusqu'à lui l'infinité. (Schiller, l'amitié) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket in France
Cheers, man! Alsace is a bit far for a meeting, I'm afraid. Are you planning to go to any conference? On Wed, Sep 23, 2009 at 11:05 PM, josephpac...@thomas-daily.de wrote: hi Not in Bordeaux, but France is bigger than just this town no ? ;) But then I admit living place, Alsace, might seem quite far and foreign to you ;) However, you might be interested by this french forum : http://www.developpez.net/forums/f1265/java/developpement-web-java/frameworks/wicket/ ++ Hello, Are there any Wicketers out there living in Bordeaux, France? Regards, Pierre -- Sans amis était le grand maître des mondes, Eprouvait manque, ce pour quoi il créa les esprits, Miroirs bienveillants de sa béatitude. Mais au vrai, il ne trouva aucun égal, Du calice du royaume total des âmes Ecume jusqu'à lui l'infinité. (Schiller, l'amitié) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Sans amis était le grand maître des mondes, Eprouvait manque, ce pour quoi il créa les esprits, Miroirs bienveillants de sa béatitude. Mais au vrai, il ne trouva aucun égal, Du calice du royaume total des âmes Ecume jusqu'à lui l'infinité. (Schiller, l'amitié)
Starting with Wicket, Spring, Maven and JDBC
Hi Guys, I'm new to Wicket with Spring(I never used Spring before, just Seam). I'm using lolite but it comes with JPA instead of JDBC. I would like to know if there is some archetype for the setup that I described in the title. I already checked wicket stuff if no luck. Thanks in advance, -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */
Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor
put the two panels into a parent container that is always visible. -igor On Wed, Sep 23, 2009 at 1:37 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Hi, first thanks for reply. Well, it's not possible to add it to a visible component. Let me explain. I have 2 custom panels and depending on the selection in a dropdownchoice the corresponding panel gets visible or hidden. Because one of these panels need to be invisible on page construction (so not both are showing up) i need to set it invisible. If i then select it in the dropdownchoice i gets visible. And now the problem begins. Cause of the initial invisibility the needed javascript code for validation of the panel fields isn't injected. How can i workaround this? Thanks in advance chris -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Mi 23.09.2009 19:20 An: users@wicket.apache.org Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor javascript contributions do not show up for components that are not visible, add it to a visible component instead. -igor On Wed, Sep 23, 2009 at 7:15 AM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Hi all, ich have a component (textfield) with an FXValidationAjaxHandler. If i set this component in pageconstructor to visible(false) then the needed javascript code for validation is not contributed to pageheader. if set to visible(true) all is fine. does anyone had the same problem and if so, is there a workaround available? greets chris snippet: ... pComponent.add(new FXValidationAjaxHandler(pFXJavascriptEvent)); this.pComponent.setOutputMarkupPlaceholderTag(true); this.pComponent.setOutputMarkupId(true) this.pComponent.setVisible(false); // no javascript is added //this.pComponent.setVisible(true); // javascript is added form.add(this.pComponent); ... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Starting with Wicket, Spring, Maven and JDBC
Well, besides iolite, you could take a look at wicket-phonebook and wicketopia. They're not JDBC but they both come with Spring preconfigured. The phonebook has a couple of example DAO's and iBatis (among others) set up. You could take those as a starting point and 'add' JDBC. Cheers, Erik On Wed, Sep 23, 2009 at 11:33 PM, Pedro Sena sena.pe...@gmail.com wrote: Hi Guys, I'm new to Wicket with Spring(I never used Spring before, just Seam). I'm using lolite but it comes with JPA instead of JDBC. I would like to know if there is some archetype for the setup that I described in the title. I already checked wicket stuff if no luck. Thanks in advance, -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor
i'm sorry, but doesn't work. i attached a simple project. i added the needed components to a webmarkupcontainer. instead of panels this time i used requiredtextfields to keep it as simple as possible. one textfield is visible the other invisible. here is the generated markup: ?xml version=1.0 encoding=UTF-8? html xmlns=http://www.w3.org/1999/xhtml; xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd; head meta http-equiv=Content-Type content=text/html; charset=UTF-8/ titleWicket Demo/title link rel=stylesheet type=text/css href=/css/style.css/ script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/debug!--/*--![CDATA[/*!--*/ var djConfig = {}; djConfig.isDebug = true; djConfig.parseWidgets = false; djConfig.searchIds = [] /*--]]*//script script type=text/javascript src=resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior/dojo-0.4/dojo.js/script script type=text/javascript src=resources/org.wicketstuff.dojo.AbstractRequireDojoBehavior/dojo-wicket/dojoWicket.js/script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/namespaces/wicketstuff!--/*--![CDATA[/*!--*/ dojo.registerModulePath(wicketstuff, ../../../resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior); /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/consoleDebug!--/*--![CDATA[/*!--*/ dojo.require(dojo.debug.console); dojo.require(dojo.widget.Tree); /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractRequireDojoBehavior!--/*--![CDATA[/*!--*/ dojo.require(dojo.lfx.*); dojo.require(dojo.gfx.*); dojo.require(dojo.html.*); /*--]]*//script script type=text/javascript id=txt11DojoParse!--/*--![CDATA[/*!--*/ djConfig.searchIds.push(txt11); /*--]]*//script script language='JavaScript' type='text/javascript' var txt11_first = false; function txt11_validate(type) { with(dojo.byId('txt11').style){backgroundColor = '#FFF';} if (type=='valid'){ dojo.lfx.html.highlight('txt11', dojo.gfx.color.hex2rgb('#98c27d'), 200).play(0) dojo.lfx.html.unhighlight('txt11', dojo.gfx.color.hex2rgb('#98c27d'), 200).play(200) }else{ dojo.lfx.html.highlight('txt11', dojo.gfx.color.hex2rgb('#fc8682'), 200).play(0) ; dojo.lfx.html.unhighlight('txt11', dojo.gfx.color.hex2rgb('#fc8682'), 200).play(200) ; } } /script /head body span wicket:id=container input id=txt11 onblur=javascript:var wcall=wicketAjaxGet('?wicket:interface=:0:container:txt1::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=trueamp;container:txt1=' + this.value, function() { }, function() { });return !wcall; name=container:txt1 widgetId=txt11 value= type=text wicket:id=txt1/ input id=txt22 style=display:none/input /span /body /html -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Do 24.09.2009 00:06 An: users@wicket.apache.org Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor put the two panels into a parent container that is always visible. -igor On Wed, Sep 23, 2009 at 1:37 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Hi, first thanks for reply. Well, it's not possible to add it to a visible component. Let me explain. I have 2 custom panels and depending on the selection in a dropdownchoice the corresponding panel gets visible or hidden. Because one of these panels need to be invisible on page construction (so not both are showing up) i need to set it invisible. If i then select it in the dropdownchoice i gets visible. And now the problem begins. Cause of the initial invisibility the needed javascript code for validation of the panel fields isn't injected. How can i workaround this? Thanks in advance chris -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Mi 23.09.2009 19:20 An: users@wicket.apache.org Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor javascript contributions do not show up for components that are not visible, add it to a visible component instead. -igor On Wed, Sep 23, 2009 at
Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor
i meant add the javascript to a container that is visible. components that are not visible do not render their javascript, it wouldnt make any sense for them to do otherwise. -igor On Wed, Sep 23, 2009 at 5:16 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: i'm sorry, but doesn't work. i attached a simple project. i added the needed components to a webmarkupcontainer. instead of panels this time i used requiredtextfields to keep it as simple as possible. one textfield is visible the other invisible. here is the generated markup: ?xml version=1.0 encoding=UTF-8? html xmlns=http://www.w3.org/1999/xhtml; xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd; head meta http-equiv=Content-Type content=text/html; charset=UTF-8/ titleWicket Demo/title link rel=stylesheet type=text/css href=/css/style.css/ script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/debug!--/*--![CDATA[/*!--*/ var djConfig = {}; djConfig.isDebug = true; djConfig.parseWidgets = false; djConfig.searchIds = [] /*--]]*//script script type=text/javascript src=resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior/dojo-0.4/dojo.js/script script type=text/javascript src=resources/org.wicketstuff.dojo.AbstractRequireDojoBehavior/dojo-wicket/dojoWicket.js/script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/namespaces/wicketstuff!--/*--![CDATA[/*!--*/ dojo.registerModulePath(wicketstuff, ../../../resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior); /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/consoleDebug!--/*--![CDATA[/*!--*/ dojo.require(dojo.debug.console); dojo.require(dojo.widget.Tree); /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractRequireDojoBehavior!--/*--![CDATA[/*!--*/ dojo.require(dojo.lfx.*); dojo.require(dojo.gfx.*); dojo.require(dojo.html.*); /*--]]*//script script type=text/javascript id=txt11DojoParse!--/*--![CDATA[/*!--*/ djConfig.searchIds.push(txt11); /*--]]*//script script language='JavaScript' type='text/javascript' var txt11_first = false; function txt11_validate(type) { with(dojo.byId('txt11').style){backgroundColor = '#FFF';} if (type=='valid'){ dojo.lfx.html.highlight('txt11', dojo.gfx.color.hex2rgb('#98c27d'), 200).play(0) dojo.lfx.html.unhighlight('txt11', dojo.gfx.color.hex2rgb('#98c27d'), 200).play(200) }else{ dojo.lfx.html.highlight('txt11', dojo.gfx.color.hex2rgb('#fc8682'), 200).play(0) ; dojo.lfx.html.unhighlight('txt11', dojo.gfx.color.hex2rgb('#fc8682'), 200).play(200) ; } } /script /head body span wicket:id=container input id=txt11 onblur=javascript:var wcall=wicketAjaxGet('?wicket:interface=:0:container:txt1::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=trueamp;container:txt1=' + this.value, function() { }, function() { });return !wcall; name=container:txt1 widgetId=txt11 value= type=text wicket:id=txt1/ input id=txt22 style=display:none/input /span /body /html -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Do 24.09.2009 00:06 An: users@wicket.apache.org Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor put the two panels into a parent container that is always visible. -igor On Wed, Sep 23, 2009 at 1:37 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Hi, first thanks for reply. Well, it's not possible to add it to a visible component. Let me explain. I have 2 custom panels and depending on the selection in a dropdownchoice the corresponding panel gets visible or hidden. Because one of these panels need to be invisible on page construction (so not both are showing up) i need to set it invisible. If i then select it in the dropdownchoice i gets visible. And now the problem begins. Cause of the initial invisibility the needed javascript code for validation of the panel fields isn't injected. How can i workaround this? Thanks in advance chris -Ursprüngliche Nachricht- Von: Igor Vaynberg
AW: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor
well, it makes no sense to add the javascript to another container. how should i validate the textfields if the javascript points to a different component? or could you give me an example? -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Do 24.09.2009 02:32 An: users@wicket.apache.org Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor i meant add the javascript to a container that is visible. components that are not visible do not render their javascript, it wouldnt make any sense for them to do otherwise. -igor On Wed, Sep 23, 2009 at 5:16 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: i'm sorry, but doesn't work. i attached a simple project. i added the needed components to a webmarkupcontainer. instead of panels this time i used requiredtextfields to keep it as simple as possible. one textfield is visible the other invisible. here is the generated markup: ?xml version=1.0 encoding=UTF-8? html xmlns=http://www.w3.org/1999/xhtml; xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd; head meta http-equiv=Content-Type content=text/html; charset=UTF-8/ titleWicket Demo/title link rel=stylesheet type=text/css href=/css/style.css/ script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/debug!--/*--![CDATA[/*!--*/ var djConfig = {}; djConfig.isDebug = true; djConfig.parseWidgets = false; djConfig.searchIds = [] /*--]]*//script script type=text/javascript src=resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior/dojo-0.4/dojo.js/script script type=text/javascript src=resources/org.wicketstuff.dojo.AbstractRequireDojoBehavior/dojo-wicket/dojoWicket.js/script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/namespaces/wicketstuff!--/*--![CDATA[/*!--*/ dojo.registerModulePath(wicketstuff, ../../../resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior); /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/consoleDebug!--/*--![CDATA[/*!--*/ dojo.require(dojo.debug.console); dojo.require(dojo.widget.Tree); /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractRequireDojoBehavior!--/*--![CDATA[/*!--*/ dojo.require(dojo.lfx.*); dojo.require(dojo.gfx.*); dojo.require(dojo.html.*); /*--]]*//script script type=text/javascript id=txt11DojoParse!--/*--![CDATA[/*!--*/ djConfig.searchIds.push(txt11); /*--]]*//script script language='JavaScript' type='text/javascript' var txt11_first = false; function txt11_validate(type) { with(dojo.byId('txt11').style){backgroundColor = '#FFF';} if (type=='valid'){ dojo.lfx.html.highlight('txt11', dojo.gfx.color.hex2rgb('#98c27d'), 200).play(0) dojo.lfx.html.unhighlight('txt11', dojo.gfx.color.hex2rgb('#98c27d'), 200).play(200) }else{ dojo.lfx.html.highlight('txt11', dojo.gfx.color.hex2rgb('#fc8682'), 200).play(0) ; dojo.lfx.html.unhighlight('txt11', dojo.gfx.color.hex2rgb('#fc8682'), 200).play(200) ; } } /script /head body span wicket:id=container input id=txt11 onblur=javascript:var wcall=wicketAjaxGet('?wicket:interface=:0:container:txt1::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=trueamp;container:txt1=' + this.value, function() { }, function() { });return !wcall; name=container:txt1 widgetId=txt11 value= type=text wicket:id=txt1/ input id=txt22 style=display:none/input /span /body /html -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Do 24.09.2009 00:06 An: users@wicket.apache.org Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor put the two panels into a parent container that is always visible. -igor On Wed, Sep 23, 2009 at 1:37 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: Hi, first thanks for reply. Well, it's not possible to add it to a visible component. Let me explain. I have 2 custom panels and depending on the selection in a dropdownchoice the corresponding panel gets visible or hidden. Because
AW: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor
maybe i'm to stupid to understand what you mean. so please provide an example. thx -Ursprüngliche Nachricht- Von: Giambalvo, Christian [mailto:christian.giamba...@excelsisnet.com] Gesendet: Do 24.09.2009 02:45 An: users@wicket.apache.org Betreff: AW: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor well, it makes no sense to add the javascript to another container. how should i validate the textfields if the javascript points to a different component? or could you give me an example? -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Do 24.09.2009 02:32 An: users@wicket.apache.org Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor i meant add the javascript to a container that is visible. components that are not visible do not render their javascript, it wouldnt make any sense for them to do otherwise. -igor On Wed, Sep 23, 2009 at 5:16 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: i'm sorry, but doesn't work. i attached a simple project. i added the needed components to a webmarkupcontainer. instead of panels this time i used requiredtextfields to keep it as simple as possible. one textfield is visible the other invisible. here is the generated markup: ?xml version=1.0 encoding=UTF-8? html xmlns=http://www.w3.org/1999/xhtml; xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd; head meta http-equiv=Content-Type content=text/html; charset=UTF-8/ titleWicket Demo/title link rel=stylesheet type=text/css href=/css/style.css/ script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/debug!--/*--![CDATA[/*!--*/ var djConfig = {}; djConfig.isDebug = true; djConfig.parseWidgets = false; djConfig.searchIds = [] /*--]]*//script script type=text/javascript src=resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior/dojo-0.4/dojo.js/script script type=text/javascript src=resources/org.wicketstuff.dojo.AbstractRequireDojoBehavior/dojo-wicket/dojoWicket.js/script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/namespaces/wicketstuff!--/*--![CDATA[/*!--*/ dojo.registerModulePath(wicketstuff, ../../../resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior); /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/consoleDebug!--/*--![CDATA[/*!--*/ dojo.require(dojo.debug.console); dojo.require(dojo.widget.Tree); /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractRequireDojoBehavior!--/*--![CDATA[/*!--*/ dojo.require(dojo.lfx.*); dojo.require(dojo.gfx.*); dojo.require(dojo.html.*); /*--]]*//script script type=text/javascript id=txt11DojoParse!--/*--![CDATA[/*!--*/ djConfig.searchIds.push(txt11); /*--]]*//script script language='JavaScript' type='text/javascript' var txt11_first = false; function txt11_validate(type) { with(dojo.byId('txt11').style){backgroundColor = '#FFF';} if (type=='valid'){ dojo.lfx.html.highlight('txt11', dojo.gfx.color.hex2rgb('#98c27d'), 200).play(0) dojo.lfx.html.unhighlight('txt11', dojo.gfx.color.hex2rgb('#98c27d'), 200).play(200) }else{ dojo.lfx.html.highlight('txt11', dojo.gfx.color.hex2rgb('#fc8682'), 200).play(0) ; dojo.lfx.html.unhighlight('txt11', dojo.gfx.color.hex2rgb('#fc8682'), 200).play(200) ; } } /script /head body span wicket:id=container input id=txt11 onblur=javascript:var wcall=wicketAjaxGet('?wicket:interface=:0:container:txt1::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=trueamp;container:txt1=' + this.value, function() { }, function() { });return !wcall; name=container:txt1 widgetId=txt11 value= type=text wicket:id=txt1/ input id=txt22 style=display:none/input /span /body /html -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Do 24.09.2009 00:06 An: users@wicket.apache.org Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor put the two panels into a parent container that
Re: August London Wicket Event (just a drink?)
Ioannis, It's good to hear from you - I hope you and your family are well! I have been talking to 2 guest presenters we are flying in from Europe and to potential hosts of our next event just this week; I will make an announcement as soon as everything is confirmed - the next date will probably be in the first week of December, but I may fix something on a smaller scale before then as well. I think we may also be organising a quiet drink or bite to eat next week - let me know if you're around. Regards - Cemal jWeekend OO Java Technologies, Wicket Training and Development http://jWeekend.com 2009/9/23 Ioannis Mavroukakis imavrouka...@gameaccount.com: Oct 7 is looming and is the page updated? nooo! :-P Y. On 5 Aug 2009, at 20:18, jWeekend wrote: As many of our guests enjoy their hard-won summer holidays, we will hold our next London Wicket Event on October 7th (dates/location/presentation TBC here soon). In the meantime, for those of you who may be about to experience withdrawal symptoms missing our apres-Wicket refreshments, we're fixing a quiet drink on Monday evening. Send us a note on the jWeekend Contact Us page if you can make it and I'll send you a confirmation the venue (central London) and times (19:00ish) when they're fixed. Regards - Cemal jWeekend OO Java Technologies http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
maven/quickstart question
I've been using wicket under for a while now, always using ant, but now I have to create a quickstart app and I'm new to maven... I've created the quickstart app and it runs under Jetty no problem but where does it store the Wicket and Jetty .jars? They don't seem to be under the directory I created using the maven 'archetype:create' command. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
maven/quickstart question
Chris, Maven creates a local repository of libraries your projects depend on. Take a look under .m2 in your home directory. Regards - Cemal jWeekend OO Java Technologies, Wicket Training and Development http://jWeekend.com I've been using wicket under for a while now, always using ant, but now I have to create a quickstart app and I'm new to maven... I've created the quickstart app and it runs under Jetty no problem but where does it store the Wicket and Jetty .jars? They don't seem to be under the directory I created using the maven 'archetype:create' command. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: maven/quickstart question
They probably are at user home. You can know more about maven settings at: http://maven.apache.org/settings.html * localRepository*: This value is the path of this build system's local repository. The default value is ${user.home}/.m2/repository. This element is especially useful for a main build server allowing all logged-in users to build from a common local repository. On Wed, Sep 23, 2009 at 11:01 PM, Chris Colman chr...@stepaheadsoftware.com wrote: I've been using wicket under for a while now, always using ant, but now I have to create a quickstart app and I'm new to maven... I've created the quickstart app and it runs under Jetty no problem but where does it store the Wicket and Jetty .jars? They don't seem to be under the directory I created using the maven 'archetype:create' command. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor
Why validate the input on a textfield that isn't displayed to the user? -- Jeremy Thomerson http://www.wickettraining.com On Wed, Sep 23, 2009 at 7:45 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: well, it makes no sense to add the javascript to another container. how should i validate the textfields if the javascript points to a different component? or could you give me an example? -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Do 24.09.2009 02:32 An: users@wicket.apache.org Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor i meant add the javascript to a container that is visible. components that are not visible do not render their javascript, it wouldnt make any sense for them to do otherwise. -igor On Wed, Sep 23, 2009 at 5:16 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: i'm sorry, but doesn't work. i attached a simple project. i added the needed components to a webmarkupcontainer. instead of panels this time i used requiredtextfields to keep it as simple as possible. one textfield is visible the other invisible. here is the generated markup: ?xml version=1.0 encoding=UTF-8? html xmlns=http://www.w3.org/1999/xhtml; xmlns:wicket= http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd; head meta http-equiv=Content-Type content=text/html; charset=UTF-8/ titleWicket Demo/title link rel=stylesheet type=text/css href=/css/style.css/ script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/debug!--/*--![CDATA[/*!--*/ var djConfig = {}; djConfig.isDebug = true; djConfig.parseWidgets = false; djConfig.searchIds = [] /*--]]*//script script type=text/javascript src=resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior/dojo-0.4/dojo.js/script script type=text/javascript src=resources/org.wicketstuff.dojo.AbstractRequireDojoBehavior/dojo-wicket/dojoWicket.js/script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/namespaces/wicketstuff!--/*--![CDATA[/*!--*/ dojo.registerModulePath(wicketstuff, ../../../resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior); /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/consoleDebug!--/*--![CDATA[/*!--*/ dojo.require(dojo.debug.console); dojo.require(dojo.widget.Tree); /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractRequireDojoBehavior!--/*--![CDATA[/*!--*/ dojo.require(dojo.lfx.*); dojo.require(dojo.gfx.*); dojo.require(dojo.html.*); /*--]]*//script script type=text/javascript id=txt11DojoParse!--/*--![CDATA[/*!--*/ djConfig.searchIds.push(txt11); /*--]]*//script script language='JavaScript' type='text/javascript' var txt11_first = false; function txt11_validate(type) { with(dojo.byId('txt11').style){backgroundColor = '#FFF';} if (type=='valid'){ dojo.lfx.html.highlight('txt11', dojo.gfx.color.hex2rgb('#98c27d'), 200).play(0) dojo.lfx.html.unhighlight('txt11', dojo.gfx.color.hex2rgb('#98c27d'), 200).play(200) }else{ dojo.lfx.html.highlight('txt11', dojo.gfx.color.hex2rgb('#fc8682'), 200).play(0) ; dojo.lfx.html.unhighlight('txt11', dojo.gfx.color.hex2rgb('#fc8682'), 200).play(200) ; } } /script /head body span wicket:id=container input id=txt11 onblur=javascript:var wcall=wicketAjaxGet('?wicket:interface=:0:container:txt1::IActivePageBehaviorListener:0:wicket:ignoreIfNotActive=trueamp;container:txt1=' + this.value, function() { }, function() { });return !wcall; name=container:txt1 widgetId=txt11 value= type=text wicket:id=txt1/ input id=txt22 style=display:none/input /span /body /html -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Do 24.09.2009 00:06 An: users@wicket.apache.org Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor put the two panels into a parent container that is
RE: maven/quickstart question
Cool, thanks for the info. That repository looks like the manually managed one I maintain for ant's use to allow sharing of jars across multiple projects. I guess maven has automated that process somewhat. The default value is ${user.home}/.m2/repository. This element is especially useful for a main build server allowing all logged-in users to build from a common local repository. On Wed, Sep 23, 2009 at 11:01 PM, Chris Colman chr...@stepaheadsoftware.com wrote: I've been using wicket under for a while now, always using ant, but now I have to create a quickstart app and I'm new to maven... I've created the quickstart app and it runs under Jetty no problem but where does it store the Wicket and Jetty .jars? They don't seem to be under the directory I created using the maven 'archetype:create' command. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Maven eclipse plugin
Hi i followed the same guide and all went nicely till the project creation I cann't create the eclipse descriptor using mvn eclipse:eclipse command What do you mean after created the pom? If you're following the guide here, http://cwiki.apache.org/WICKET/windows-guide-to-installing-wicket-on-eclipse-with-maven.html , you shouldn't have to create the pom manually. The mvn archetype:create command will do that for you. Dane On Wed, Sep 23, 2009 at 8:00 AM, Anantha Kumaran ananthakuma...@gmail.comwrote: hi i am new to eclipse and maven i followed the wicket wiki to create a new wicket project after created the pom i try to create the project using the eclipse plugin (mvn eclipse:eclipse) i got the following error [INFO] Scanning for projects... [INFO] [INFO] Building quickstart [INFO]task-segment: [eclipse:eclipse] [INFO] [INFO] Preparing eclipse:eclipse [INFO] No goals needed for project - skipping [INFO] [eclipse:eclipse {execution: default-cli}] [FATAL ERROR] org.apache.maven.plugin.eclipse.EclipsePlugin#execute() caused a l inkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms: [FATAL ERROR] Plugin realm = app0.child-container[org.apache.maven.plugins:maven -eclipse-plugin:2.5.1] urls[0] = file:/C:/Users/Ananth/.m2/repository/org/apache/maven/plugins/maven-ec lipse-plugin/2.5.1/maven-eclipse-plugin-2.5.1.jar urls[1] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-archiv er/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar urls[2] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-utils/ 1.4.5/plexus-utils-1.4.5.jar urls[3] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-intera ctivity-jline/1.0-alpha-5/plexus-interactivity-jline-1.0-alpha-5.jar urls[4] = file:/C:/Users/Ananth/.m2/repository/jline/jline/0.9.1/jline-0.9.1.jar urls[5] = file:/C:/Users/Ananth/.m2/repository/org/apache/maven/maven-archiver/2 .2/maven-archiver-2.2.jar urls[6] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-resour ces/1.0-alpha-4/plexus-resources-1.0-alpha-4.jar urls[7] = file:/C:/Users/Ananth/.m2/repository/biz/aQute/bndlib/0.0.145/bndlib-0 .0.145.jar urls[8] = file:/C:/Users/Ananth/.m2/repository/org/apache/maven/shared/maven-osg i/0.2.0/maven-osgi-0.2.0.jar urls[9] = file:/C:/Users/Ananth/.m2/repository/org/eclipse/core/resources/3.3.0- v20070604/resources-3.3.0-v20070604.jar [FATAL ERROR] Container realm = plexus.core urls[0] = file:/D:/Program Files/Apache Software Foundation/apache-maven-2.2.0/l ib/maven-2.2.0-uber.jar [INFO] [ERROR] FATAL ERROR [INFO] [INFO] org/eclipse/core/internal/localstore/SafeChunkyInputStream org.eclipse.core.internal.localstore.SafeChunkyInputStream [INFO] [INFO] Trace java.lang.NoClassDefFoundError: org/eclipse/core/internal/localstore/SafeChunkyI nputStream at org.apache.maven.plugin.eclipse.EclipsePlugin.getWorkspaceConfigurati on(EclipsePlugin.java:1473) at org.apache.maven.plugin.eclipse.EclipsePlugin.fillDefaultClasspathCon tainers(EclipsePlugin.java:1222) at org.apache.maven.plugin.eclipse.EclipsePlugin.setup(EclipsePlugin.jav a:753) at org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(AbstractId eSupportMojo.java:483) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:553) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:523) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:4 1) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Old instances of a page remain in memory (apparently) forever
Hi: I'm not sure whether this behavior is normal or not, so I'm going to describe it and I hope someone can tell me if I'm doing something wrong or if there's just nothing wrong! In my app I found out that each time a request is made, old instances of a page remain in memory, and get accumulated in time (I noticed this behavior by looking at the All instances feature from eclipse debug's perspective). I searched the code for bad practices like anonyomus Model classes, but I didn't find those kind of thins. So finally I created a new simple project to test whether this behaviour repeated there too, and I found out that it did! Here's the new simple project code (wicket 1.3.5, tomcat 6, eclipse galileo): public class MyApp extends WebApplication { @Override public Class getHomePage() { return MyPage.class; } } public class MyPage extends WebPage { private String text; public MyPage() { this(notext); } public MyPage(String textt) { super(); this.text = textt; Form form = new Form(form){ private static final long serialVersionUID = -3566834353426372805L; @Override protected void onSubmit() { setResponsePage(new MyPage2(text)); } }; form.add(new TextField(text, new PropertyModel(this, text))); form.add(new Button(accept)); this.add(form); } } Class MyPage2 does the exact same thing, except it sets MyPage as the response page. When debugging (with a breakpoint in MyPage's constructor), every time a new page is instanciated, I see that the old instances of that page remains in memory. Using the All references feature I walked through the reference-path, and I reached a weakReference to this page from a SerializedPagesCache$SerializedPageWithSession instance (I had to stop there because it was driving me crazy). (Of course I have no idea whether this is normal or not, I'm just giving more info) Anyway, can anyone tell me what's wrong? Or is this a expected behavior and sometime later this old instances will be eliminated from the jvm? Thanks in advance, Esteban
Re: Old instances of a page remain in memory (apparently) forever
the instances are held in memory until the jvm runs the garbage collector. -igor On Wed, Sep 23, 2009 at 8:09 PM, Esteban Ignacio Masoero emaso...@getsense.com.ar wrote: Hi: I'm not sure whether this behavior is normal or not, so I'm going to describe it and I hope someone can tell me if I'm doing something wrong or if there's just nothing wrong! In my app I found out that each time a request is made, old instances of a page remain in memory, and get accumulated in time (I noticed this behavior by looking at the All instances feature from eclipse debug's perspective). I searched the code for bad practices like anonyomus Model classes, but I didn't find those kind of thins. So finally I created a new simple project to test whether this behaviour repeated there too, and I found out that it did! Here's the new simple project code (wicket 1.3.5, tomcat 6, eclipse galileo): public class MyApp extends WebApplication { @Override public Class getHomePage() { return MyPage.class; } } public class MyPage extends WebPage { private String text; public MyPage() { this(notext); } public MyPage(String textt) { super(); this.text = textt; Form form = new Form(form){ private static final long serialVersionUID = -3566834353426372805L; @Override protected void onSubmit() { setResponsePage(new MyPage2(text)); } }; form.add(new TextField(text, new PropertyModel(this, text))); form.add(new Button(accept)); this.add(form); } } Class MyPage2 does the exact same thing, except it sets MyPage as the response page. When debugging (with a breakpoint in MyPage's constructor), every time a new page is instanciated, I see that the old instances of that page remains in memory. Using the All references feature I walked through the reference-path, and I reached a weakReference to this page from a SerializedPagesCache$SerializedPageWithSession instance (I had to stop there because it was driving me crazy). (Of course I have no idea whether this is normal or not, I'm just giving more info) Anyway, can anyone tell me what's wrong? Or is this a expected behavior and sometime later this old instances will be eliminated from the jvm? Thanks in advance, Esteban - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Old instances of a page remain in memory (apparently) forever
you can check the javadoc for WeakReference, but basically WeakReferences hold the reference until a full gc occurs On Thu, Sep 24, 2009 at 12:14 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: the instances are held in memory until the jvm runs the garbage collector. -igor On Wed, Sep 23, 2009 at 8:09 PM, Esteban Ignacio Masoero emaso...@getsense.com.ar wrote: Hi: I'm not sure whether this behavior is normal or not, so I'm going to describe it and I hope someone can tell me if I'm doing something wrong or if there's just nothing wrong! In my app I found out that each time a request is made, old instances of a page remain in memory, and get accumulated in time (I noticed this behavior by looking at the All instances feature from eclipse debug's perspective). I searched the code for bad practices like anonyomus Model classes, but I didn't find those kind of thins. So finally I created a new simple project to test whether this behaviour repeated there too, and I found out that it did! Here's the new simple project code (wicket 1.3.5, tomcat 6, eclipse galileo): public class MyApp extends WebApplication { @Override public Class getHomePage() { return MyPage.class; } } public class MyPage extends WebPage { private String text; public MyPage() { this(notext); } public MyPage(String textt) { super(); this.text = textt; Form form = new Form(form){ private static final long serialVersionUID = -3566834353426372805L; @Override protected void onSubmit() { setResponsePage(new MyPage2(text)); } }; form.add(new TextField(text, new PropertyModel(this, text))); form.add(new Button(accept)); this.add(form); } } Class MyPage2 does the exact same thing, except it sets MyPage as the response page. When debugging (with a breakpoint in MyPage's constructor), every time a new page is instanciated, I see that the old instances of that page remains in memory. Using the All references feature I walked through the reference-path, and I reached a weakReference to this page from a SerializedPagesCache$SerializedPageWithSession instance (I had to stop there because it was driving me crazy). (Of course I have no idea whether this is normal or not, I'm just giving more info) Anyway, can anyone tell me what's wrong? Or is this a expected behavior and sometime later this old instances will be eliminated from the jvm? Thanks in advance, Esteban - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- http://mapsdev.blogspot.com/ Marcelo Takeshi Fukushima - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor
Chris, The fact that you've chosen to use Wicket probably shows there's not so much danger of that! To better see what's going on, try the snippet below in the project you attached // ... mark t2 final and // append this to your BasePage constructor con.add(t2.setOutputMarkupId(true)); add(new AjaxLink(toggleVisiblity){ @Override public void onClick(AjaxRequestTarget target) { t2.setVisible(!t2.isVisible()); target.addComponent(t2); } }); Fix your BasePage.html accordingly eg, add an anchor to the body with wicket:id=toggleVisiblity. When you fire up your app, click on that link once and you can use FireBug in Firefox to verify that the onblur code you wanted is indeed in place. Is that the effect you were after? Regards - Cemal jWeekend OO Java Technologies, Wicket Training and Development http://jWeekend.com PS Nabble is not showing posts to our list (I think it's pointing back to SourceForge again!) so I am replying here in case you need a solution quickly and this happens to be the actual issue you are faced with! maybe i'm to stupid to understand what you mean. so please provide an example. thx -Ursprüngliche Nachricht- Von: Giambalvo, Christian [mailto:christian.giamba...@excelsisnet.com] Gesendet: Do 24.09.2009 02:45 An: users@wicket.apache.org Betreff: AW: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor - Hide quoted text - well, it makes no sense to add the javascript to another container. how should i validate the textfields if the javascript points to a different component? or could you give me an example? -Ursprüngliche Nachricht- Von: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Gesendet: Do 24.09.2009 02:32 An: users@wicket.apache.org Betreff: Re: FXValidationAjaxHandler - Javascript not added if component is set visible(false) in page constructor i meant add the javascript to a container that is visible. components that are not visible do not render their javascript, it wouldnt make any sense for them to do otherwise. -igor On Wed, Sep 23, 2009 at 5:16 PM, Giambalvo, Christian christian.giamba...@excelsisnet.com wrote: i'm sorry, but doesn't work. i attached a simple project. i added the needed components to a webmarkupcontainer. instead of panels this time i used requiredtextfields to keep it as simple as possible. one textfield is visible the other invisible. here is the generated markup: ?xml version=1.0 encoding=UTF-8? html xmlns=http://www.w3.org/1999/xhtml; xmlns:wicket=http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd; head meta http-equiv=Content-Type content=text/html; charset=UTF-8/ titleWicket Demo/title link rel=stylesheet type=text/css href=/css/style.css/ script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/debug!--/*--![CDATA[/*!--*/ var djConfig = {}; djConfig.isDebug = true; djConfig.parseWidgets = false; djConfig.searchIds = [] /*--]]*//script script type=text/javascript src=resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior/dojo-0.4/dojo.js/script script type=text/javascript src=resources/org.wicketstuff.dojo.AbstractRequireDojoBehavior/dojo-wicket/dojoWicket.js/script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/namespaces/wicketstuff!--/*--![CDATA[/*!--*/ dojo.registerModulePath(wicketstuff, ../../../resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior); /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractDefaultDojoBehavior/consoleDebug!--/*--![CDATA[/*!--*/ dojo.require(dojo.debug.console); dojo.require(dojo.widget.Tree); /*--]]*//script script type=text/javascript id=org.wicketstuff.dojo.AbstractRequireDojoBehavior!--/*--![CDATA[/*!--*/ dojo.require(dojo.lfx.*); dojo.require(dojo.gfx.*); dojo.require(dojo.html.*); /*--]]*//script script type=text/javascript id=txt11DojoParse!--/*--![CDATA[/*!--*/ djConfig.searchIds.push(txt11); /*--]]*//script script language='JavaScript' type='text/javascript' var txt11_first = false; function txt11_validate(type) { with(dojo.byId('txt11').style){backgroundColor = '#FFF';} if (type=='valid'){ dojo.lfx.html.highlight('txt11', dojo.gfx.color.hex2rgb('#98c27d'), 200).play(0) dojo.lfx.html.unhighlight('txt11', dojo.gfx.color.hex2rgb('#98c27d'),
Re: Old instances of a page remain in memory (apparently) forever
Thanks for the quick answer! After doing some exhaustive testing, I've just found out that, just before seeing your answer. The problem was that it wasn't until the 20th instance that finally the garbage collector decided to free up some memmory (I tried calling it explicitly but apparently the memmory wasn't too occupied so it did nothing). On Thu, Sep 24, 2009 at 12:14 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: the instances are held in memory until the jvm runs the garbage collector. -igor On Wed, Sep 23, 2009 at 8:09 PM, Esteban Ignacio Masoero emaso...@getsense.com.ar wrote: Hi: I'm not sure whether this behavior is normal or not, so I'm going to describe it and I hope someone can tell me if I'm doing something wrong or if there's just nothing wrong! In my app I found out that each time a request is made, old instances of a page remain in memory, and get accumulated in time (I noticed this behavior by looking at the All instances feature from eclipse debug's perspective). I searched the code for bad practices like anonyomus Model classes, but I didn't find those kind of thins. So finally I created a new simple project to test whether this behaviour repeated there too, and I found out that it did! Here's the new simple project code (wicket 1.3.5, tomcat 6, eclipse galileo): public class MyApp extends WebApplication { @Override public Class getHomePage() { return MyPage.class; } } public class MyPage extends WebPage { private String text; public MyPage() { this(notext); } public MyPage(String textt) { super(); this.text = textt; Form form = new Form(form){ private static final long serialVersionUID = -3566834353426372805L; @Override protected void onSubmit() { setResponsePage(new MyPage2(text)); } }; form.add(new TextField(text, new PropertyModel(this, text))); form.add(new Button(accept)); this.add(form); } } Class MyPage2 does the exact same thing, except it sets MyPage as the response page. When debugging (with a breakpoint in MyPage's constructor), every time a new page is instanciated, I see that the old instances of that page remains in memory. Using the All references feature I walked through the reference-path, and I reached a weakReference to this page from a SerializedPagesCache$SerializedPageWithSession instance (I had to stop there because it was driving me crazy). (Of course I have no idea whether this is normal or not, I'm just giving more info) Anyway, can anyone tell me what's wrong? Or is this a expected behavior and sometime later this old instances will be eliminated from the jvm? Thanks in advance, Esteban - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Maven eclipse plugin
hi i found the problem it is due to some corrupted jar in the maven repo i cleared that and now working properly On Thu, Sep 24, 2009 at 8:35 AM, Anantha Kumaran ananthakuma...@gmail.comwrote: Hi i followed the same guide and all went nicely till the project creation I cann't create the eclipse descriptor using mvn eclipse:eclipse command What do you mean after created the pom? If you're following the guide here, http://cwiki.apache.org/WICKET/windows-guide-to-installing-wicket-on-eclipse-with-maven.html , you shouldn't have to create the pom manually. The mvn archetype:create command will do that for you. Dane On Wed, Sep 23, 2009 at 8:00 AM, Anantha Kumaran ananthakuma...@gmail.comwrote: hi i am new to eclipse and maven i followed the wicket wiki to create a new wicket project after created the pom i try to create the project using the eclipse plugin (mvn eclipse:eclipse) i got the following error [INFO] Scanning for projects... [INFO] [INFO] Building quickstart [INFO]task-segment: [eclipse:eclipse] [INFO] [INFO] Preparing eclipse:eclipse [INFO] No goals needed for project - skipping [INFO] [eclipse:eclipse {execution: default-cli}] [FATAL ERROR] org.apache.maven.plugin.eclipse.EclipsePlugin#execute() caused a l inkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms: [FATAL ERROR] Plugin realm = app0.child-container[org.apache.maven.plugins:maven -eclipse-plugin:2.5.1] urls[0] = file:/C:/Users/Ananth/.m2/repository/org/apache/maven/plugins/maven-ec lipse-plugin/2.5.1/maven-eclipse-plugin-2.5.1.jar urls[1] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-archiv er/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar urls[2] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-utils/ 1.4.5/plexus-utils-1.4.5.jar urls[3] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-intera ctivity-jline/1.0-alpha-5/plexus-interactivity-jline-1.0-alpha-5.jar urls[4] = file:/C:/Users/Ananth/.m2/repository/jline/jline/0.9.1/jline-0.9.1.jar urls[5] = file:/C:/Users/Ananth/.m2/repository/org/apache/maven/maven-archiver/2 .2/maven-archiver-2.2.jar urls[6] = file:/C:/Users/Ananth/.m2/repository/org/codehaus/plexus/plexus-resour ces/1.0-alpha-4/plexus-resources-1.0-alpha-4.jar urls[7] = file:/C:/Users/Ananth/.m2/repository/biz/aQute/bndlib/0.0.145/bndlib-0 .0.145.jar urls[8] = file:/C:/Users/Ananth/.m2/repository/org/apache/maven/shared/maven-osg i/0.2.0/maven-osgi-0.2.0.jar urls[9] = file:/C:/Users/Ananth/.m2/repository/org/eclipse/core/resources/3.3.0- v20070604/resources-3.3.0-v20070604.jar [FATAL ERROR] Container realm = plexus.core urls[0] = file:/D:/Program Files/Apache Software Foundation/apache-maven-2.2.0/l ib/maven-2.2.0-uber.jar [INFO] [ERROR] FATAL ERROR [INFO] [INFO] org/eclipse/core/internal/localstore/SafeChunkyInputStream org.eclipse.core.internal.localstore.SafeChunkyInputStream [INFO] [INFO] Trace java.lang.NoClassDefFoundError: org/eclipse/core/internal/localstore/SafeChunkyI nputStream at org.apache.maven.plugin.eclipse.EclipsePlugin.getWorkspaceConfigurati on(EclipsePlugin.java:1473) at org.apache.maven.plugin.eclipse.EclipsePlugin.fillDefaultClasspathCon tainers(EclipsePlugin.java:1222) at org.apache.maven.plugin.eclipse.EclipsePlugin.setup(EclipsePlugin.jav a:753) at org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(AbstractId eSupportMojo.java:483) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:553) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:523) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at
Re: Palette Update Behaviour Problem
Tim, Just to know. Have you implemented your own Recorder? ps: You can get it with palette.getRecorderComponent(). Then add the behavior. On Wed, Sep 23, 2009 at 4:30 PM, Tim Hughes thug...@troglobyte.com wrote: I am using a Palette to assign multiple Category objects to a Document object. When I select a Category, the Palette seems to operate correctly on-screen, but I'm having two issues: 1) debugging the code, the selected choice (in the onUpdate below) is ALWAYS the first item in the allCategories list 2) this (incorrect) Category is added to the Document, but does not seem to stay that way. If I switch to another Document and then come back to the original, there are no longer any Categories I've scoured this list but haven't managed to find something directly applicable to this situation. Can anyone assist? What am I doing wrong here? IChoiceRendererCategory renderer = new ChoiceRendererCategory( name ); final IModel selected = new Model((Serializable)selectedDocument.getCategories()); IModel allCategories = new Model((Serializable)categories); final PaletteCategory documentsPalette = new PaletteCategory(categoryPalette, selected, allCategories, renderer, 10, true) { @Override protected Recorder newRecorderComponent() { final Recorder recorder = new Recorder(recorder, this); recorder.setOutputMarkupId( true ); recorder.add(new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate( AjaxRequestTarget ajaxRequestTarget) { selectedCategory.addCategory((Category)recorder.getSelectedChoices().next()); } }); return recorder; } }; Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: Old instances of a page remain in memory (apparently) forever
If you run System.gc(), you are recommended to jvm to run the garbarge. Anyway, It is not mandatory to do it. On Thu, Sep 24, 2009 at 12:56 AM, Esteban Ignacio Masoero emaso...@getsense.com.ar wrote: Thanks for the quick answer! After doing some exhaustive testing, I've just found out that, just before seeing your answer. The problem was that it wasn't until the 20th instance that finally the garbage collector decided to free up some memmory (I tried calling it explicitly but apparently the memmory wasn't too occupied so it did nothing). On Thu, Sep 24, 2009 at 12:14 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: the instances are held in memory until the jvm runs the garbage collector. -igor On Wed, Sep 23, 2009 at 8:09 PM, Esteban Ignacio Masoero emaso...@getsense.com.ar wrote: Hi: I'm not sure whether this behavior is normal or not, so I'm going to describe it and I hope someone can tell me if I'm doing something wrong or if there's just nothing wrong! In my app I found out that each time a request is made, old instances of a page remain in memory, and get accumulated in time (I noticed this behavior by looking at the All instances feature from eclipse debug's perspective). I searched the code for bad practices like anonyomus Model classes, but I didn't find those kind of thins. So finally I created a new simple project to test whether this behaviour repeated there too, and I found out that it did! Here's the new simple project code (wicket 1.3.5, tomcat 6, eclipse galileo): public class MyApp extends WebApplication { @Override public Class getHomePage() { return MyPage.class; } } public class MyPage extends WebPage { private String text; public MyPage() { this(notext); } public MyPage(String textt) { super(); this.text = textt; Form form = new Form(form){ private static final long serialVersionUID = -3566834353426372805L; @Override protected void onSubmit() { setResponsePage(new MyPage2(text)); } }; form.add(new TextField(text, new PropertyModel(this, text))); form.add(new Button(accept)); this.add(form); } } Class MyPage2 does the exact same thing, except it sets MyPage as the response page. When debugging (with a breakpoint in MyPage's constructor), every time a new page is instanciated, I see that the old instances of that page remains in memory. Using the All references feature I walked through the reference-path, and I reached a weakReference to this page from a SerializedPagesCache$SerializedPageWithSession instance (I had to stop there because it was driving me crazy). (Of course I have no idea whether this is normal or not, I'm just giving more info) Anyway, can anyone tell me what's wrong? Or is this a expected behavior and sometime later this old instances will be eliminated from the jvm? Thanks in advance, Esteban - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Fernando Wermus. www.linkedin.com/in/fernandowermus