Re: how to call javascript function on form submission

2011-03-27 Thread Josh Kamau
Yes you can Lets say you are submitting the form with ajax, When you submit the form, then you have to add the form to the ajax request target so that it can be rerendered , then on the same target object, you calll target.appendJavascript( showFormTooltips()); My explanation is simplistic but

Re: Navigation and Adding Panels dynamically.

2011-03-27 Thread Mansour Al Akeel
Martin, I could not find any help using this extension. May be I missed something somewhere. Let's look at a peice of code of what I am trying to do: private void setScreen(String screen) { try { Panel myPanel; myPanel = (Panel)

Re: Navigation and Adding Panels dynamically.

2011-03-27 Thread vineet semwal
Foo.class.newInstance() will use zero arg constructor which is not possible because panel has no zero arg. constructor so basically you got the exception at that line itself :) just pass the panel id in screen method and one enum which helps you in identifying the panel type you want to create

Re: Navigation and Adding Panels dynamically.

2011-03-27 Thread Mansour Al Akeel
Vineet, thank you for replying. I don't think this is the issue, because the panels I am creating, have their Id's set directly in the constructor. For example, public EditUserScreen(){ super(workScreen); setOutputMarkupPlaceholderTag(true); setOutputMarkupId(true); } And basically

Re: Navigation and Adding Panels dynamically.

2011-03-27 Thread vineet semwal
sorry i wrongly assumed you might not have defined zero arg constructor.. you dont need setOutputMarkupId(true) as you are already using setOutputMarkupPlaceholderTag(true) and yes you are using replacewith correctly ,i dont think there is any problem in this code.. On Sun, Mar 27, 2011 at

RE: trouble implementing 'mutually required' validator

2011-03-27 Thread PALMER, THOMAS C (ATTCORP)
Excellent - just return an empty list and it works like a charm. Thanks - -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Saturday, March 26, 2011 1:57 PM To: users@wicket.apache.org Subject: Re: trouble implementing 'mutually required'

Re: how to call javascript function on form submission

2011-03-27 Thread hariharansrc
sorry for asking u again i just want to display a tooltip based on the validation results i dont know how to do that using wicket can u help with an example to explain how to do -- View this message in context:

Re: how to call javascript function on form submission

2011-03-27 Thread Josh Kamau
Hi. I know there could be many ways of achieving that . But i would do this. I would create my component. e.g TextFieldString username = new TextFieldString(username); Then add validators to the textfield. e.g username.setRequired(true) ; //add the wicket validators e.g email

Re: how to call javascript function on form submission

2011-03-27 Thread Martin Grigorov
https://github.com/wicketstuff/core/blob/master/jdk-1.5-parent/jquery-parent/jquery-examples/src/main/java/org/wicketstuff/jquery/demo/Page4JGrowl.java On Sun, Mar 27, 2011 at 5:22 PM, Josh Kamau joshnet2...@gmail.com wrote: Hi. I know there could be many ways of achieving that . But i would

Re: hide empty table

2011-03-27 Thread Martin Makundi
Hi! Try enclosure: https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html https://issues.apache.org/jira/browse/WICKET-3422 2011/3/27 hrbaer herber.m...@gmail.com: Hi all, how can I hide an empty table? This is my markup: -        Platzhalter                 span

Re: hide empty table

2011-03-27 Thread shetc
WebMarkupContainer -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/hide-empty-table-tp3409461p3409553.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail:

Re: Navigation and Adding Panels dynamically.

2011-03-27 Thread Mansour Al Akeel
Hello Vineet, I resolved the issue. I didn't add the panel to the Ajax request target. So ajaxRequestTarget.add(currentPanel); solved the issue. Thank you. On Sun Mar 27,2011 02:50 pm, vineet semwal wrote: sorry i wrongly assumed you might not have defined zero arg constructor.. you

use css tooltip for wicket validation

2011-03-27 Thread hariharansrc
i want to use css or jquery for giving validation tooltip based on the validation results can anyone tell how to do it with an example -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/use-css-tooltip-for-wicket-validation-tp3409561p3409561.html Sent from the Users

Re: use css tooltip for wicket validation

2011-03-27 Thread Martin Grigorov
I think I answered you with a link to an example in your other thread On Sun, Mar 27, 2011 at 8:01 PM, hariharansrc hariharan...@gmail.comwrote: i want to use css or jquery for giving validation tooltip based on the validation results can anyone tell how to do it with an example -- View

Re: hide empty table

2011-03-27 Thread hrbaer
Thanks shetc. Meanwhile I did some additional research and beside add a WebMarkupContainer which I can make (in-/)visible there is another option: wicket:enclosure. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/hide-empty-table-tp3409461p3409570.html Sent from the

Page to select something and use the selection in another page

2011-03-27 Thread fernandospr
Hi, I need to build a page (1) where the user will have a form and one of the inputs will have a button that will open another page (2) where he/she will select something from a list, probably from a DataView, then accept and use the selected item in the form of page (1). Any ideas? Thanks in

Re: Page to select something and use the selection in another page

2011-03-27 Thread Clint Checketts
Could the second page be a modal window? Or do you require that it is a separate browser window? On Sunday, March 27, 2011, fernandospr fernando...@gmail.com wrote: Hi, I need to build a page (1) where the user will have a form and one of the inputs will have a button that will open another

Re: Page to select something and use the selection in another page

2011-03-27 Thread Jeremy Thomerson
window.opener? http://www.w3schools.com/jsref/prop_win_opener.asp On Sun, Mar 27, 2011 at 1:54 PM, fernandospr fernando...@gmail.com wrote: Hi, I need to build a page (1) where the user will have a form and one of the inputs will have a button that will open another page (2) where he/she

Re: Page to select something and use the selection in another page

2011-03-27 Thread James Carman
In our application, we call these loop pages. Here's how we implemented it: public abstract class LoopLink extends SubmitLink { public LoopLink(String id) { super(id); setDefaultFormProcessing(false); } protected abstract Page getLoopPage(); @Override

Highlight current/clicked AjaxLink

2011-03-27 Thread Mansour Al Akeel
Hello all, I have created a dynamic menu using AjaxLink. Clicking a link results in dispalying the correcponding class on the screen. It's common, to display the clicked link in a different color/background ... etc. But I wasn't able to find a way to achieve this. Any advice tutorial, article ?

Re: [1.5RC2] impossible to add cookies

2011-03-27 Thread adriclad
Anybody had the same problem ? May I have to refer the bug in a jira ticket for the 1.5-RC3 ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/1-5RC2-impossible-to-add-cookies-tp3380554p3409846.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Error during headers validation since migration to 1.5

2011-03-27 Thread adriclad
No answer... May I write a Jira ticket for 1.5-RC3 to inform this bug ? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-during-headers-validation-since-migration-to-1-5-tp3355890p3409851.html Sent from the Users forum mailing list archive at Nabble.com.

Set all form fields to output markup id automatically

2011-03-27 Thread Bruno Borges
I'm developing a project with Scala + Wicket and I wanted to set that all form components have their markup id output automatically (setOutputMarkupId(true)). Any idea? Cheers, Bruno Borges www.brunoborges.com.br +55 21 76727099 The glory of great men should always be measured by the means

Re: Set all form fields to output markup id automatically

2011-03-27 Thread James Carman
A quick way to set it by default would be to use a IComponentInitializationListener. On Sun, Mar 27, 2011 at 8:52 PM, Bruno Borges bruno.bor...@gmail.com wrote: I'm developing a project with Scala + Wicket and I wanted to set that all form components have their markup id output automatically

Re: Set all form fields to output markup id automatically

2011-03-27 Thread Bruno Borges
I was looking for a better way (optimized too) to achieve this, considering that I'm using Scala. I admit I'm not an expert on Scala though. :-) Bruno Borges www.brunoborges.com.br +55 21 76727099 The glory of great men should always be measured by the means they have used to acquire it. -

Re: Set all form fields to output markup id automatically

2011-03-27 Thread Clint Checketts
If this is specific to a particular form you could use A formcompoment visitor to iterate over each child and call setOutputMarkupId On Sunday, March 27, 2011, Bruno Borges bruno.bor...@gmail.com wrote: I was looking for a better way (optimized too) to achieve this, considering that I'm using

Re: [wicketstuff-core] Wicketstuff Developers please use a separate commit when fixing breakage due to wicket upstream changes

2011-03-27 Thread Michael O'Cleirigh
Hi Bruno, Actually everything was fine with the 1.5-rc2.1 release but I just wanted to make sure that future releases would be trouble free as well. This is just a possible edge case issue when doing point releases (it does not apply for the first release on a given wicket release). This

Re: Problem get selected value using dynamic select with optgroup

2011-03-27 Thread Mansour Al Akeel
I didn't clearly understand the question. But another shot in the dark ;) You mean, is the behaviour of the ajax link depends on the clicked item ? If that's what you mean, then I like to be able to disable the clicked link while viewing the corresponding panel. The second part about the

Re: Set all form fields to output markup id automatically

2011-03-27 Thread James Carman
You could use an aspect. However, the calling of the IComponentInstantiationListeners already occurs in-line during the constructor execution, so adding your logic (which is merely setting a flag) shouldn't be too much overhead, really. It shouldn't be any different (other than pushing a stack

Re: Page to select something and use the selection in another page

2011-03-27 Thread fernandospr
@Clint it could be a modal or not. It does not matter. But, in the selection page, I need to be able to list with a DataView and probably also filter the entities using an input form. @James thanks for the example code, but I'm not quite sure if I'm following. Please could you please put an

Re: Page to select something and use the selection in another page

2011-03-27 Thread James Carman
On Sun, Mar 27, 2011 at 10:19 PM, fernandospr fernando...@gmail.com wrote: @James thanks for the example code, but I'm not quite sure if I'm following. Please could you please put an example on which would be the first page, second page(selection)? In our application, you would be on a page

Re: [wicketstuff-core] Wicketstuff Developers please use a separate commit when fixing breakage due to wicket upstream changes

2011-03-27 Thread Bruno Borges
Wow... got it. Thanks for clarifying all of this. Now, I think it is hard to guarantee no one will push API changes + features on a unique commit. Shouldn't we consider to stop building for point releases and only release after a stable Wicket version? (ie. not RC's) Bruno Borges

Re: Highlight current/clicked AjaxLink

2011-03-27 Thread Mansour Al Akeel
No answer yet. Any thing not clear ? On Sun Mar 27,2011 07:37 pm, Mansour Al Akeel wrote: Hello all, I have created a dynamic menu using AjaxLink. Clicking a link results in dispalying the correcponding class on the screen. It's common, to display the clicked link in a different

Re: Set all form fields to output markup id automatically

2011-03-27 Thread Bruno Borges
For now, I simply did this: object autoMarkupId extends IComponentInstantiationListener { def onInstantiation(component: Component) { if (component.isInstanceOf[FormComponent[_]]) { component.setOutputMarkupId(true)

Re: Highlight current/clicked AjaxLink

2011-03-27 Thread Bruno Borges
Please provide a quickstart with the use case, so we can reproduce the bug. Bruno Borges www.brunoborges.com.br +55 21 76727099 The glory of great men should always be measured by the means they have used to acquire it. - Francois de La Rochefoucauld On Sun, Mar 27, 2011 at 8:37 PM, Mansour

Re: Highlight current/clicked AjaxLink

2011-03-27 Thread Mansour Al Akeel
Bruno, There' no bug here. It's just something I need to do, and unable to find a way to do it with wicket. All I need to do is to highlight the clicked ajaxLink in a list. I am not sure how to add a css class to this link only, knowing that there is other links in this list. I just didn't get

Re: Highlight current/clicked AjaxLink

2011-03-27 Thread Josh Kamau
hi. Have you tried something like myLink.add(new AttributeAppender(...)); or myLink.add(new AttributeModifier(...)) this methods can add/modify a css class in a markup element. Please check the javadocs for method details if this is what you want. However, if i were in your situation, i

Re: Highlight current/clicked AjaxLink

2011-03-27 Thread Mansour Al Akeel
Josh, Yes each link is reloading a different page, and the list of the links is not rebuilt. Only the contents part of the page. What would your css alternative solution be ? How can I get the clicked link disabled and assing it a class, excluding the rest of the links, without breaking the ajax