Re: artwork problem while changing background color of liquid canvas
Had same problem. Try (,or something like) this (named "Bocs" instead of "Box") to avoid name clashes in future): public class Bocs extends WebMarkupContainer { public static final byte DEFAULT_ROUNDING_RADIUS = 8; public static final String DEAFAULT_FILLCOLOR = "#EEFFD0"; public static final int DEAFAULT_BORDERWIDTH = 1; public static final String DEFAULT_BORDERCOLOR = "#AA"; public Bocs(String id) { this(id, DEFAULT_ROUNDING_RADIUS, DEAFAULT_FILLCOLOR, DEAFAULT_BORDERWIDTH, DEFAULT_BORDERCOLOR); } public Bocs(String id, int roundingRadius, String fillColor, int borderWidth, String borderColor) { super(id); this.setOutputMarkupId(true); this.setOutputMarkupPlaceholderTag(true); // CAUTION: do not substitute Graphics graphics = new Border(borderColor, borderWidth); graphics.setChainedGraphics(new Fill(fillColor)); LiquidCanvasBehavior behavior = new LiquidCanvasBehavior(graphics, new RoundedRect( (byte) roundingRadius)); this.add(behavior); } private static final long serialVersionUID = 1L; } Use latest Wicket (1.4-rc5), Wicketstuff Artwork (1.4-20090706.220716-150). Stefan
traditional(?) form processing
Hi, I'd like to create traditional form processing in wicket: to direct a form target to a (bookmarkable) page and receive the form content as PageParameters on that page. Is there any easy and supported way to achieve this? E.g. I have a search page that receives the parameters that way, and I'd like to have a form that targets that page with visible input field and a hidden field. With the usual way, I'd create it as part of a stateless form, but I'd like to skip the processing on the old page. Thanks and regards, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: traditional(?) form processing
Okay, this was too easy... :) what is the best way to populate the form's action attribute? Regards, Istvan On Wed, Jan 6, 2010 at 3:37 PM, Martijn Dashorst wrote: > > > > > > No wicket required > > Martijn > > On Wed, Jan 6, 2010 at 3:30 PM, Istvan Soos wrote: >> Hi, >> >> I'd like to create traditional form processing in wicket: to direct a >> form target to a (bookmarkable) page and receive the form content as >> PageParameters on that page. Is there any easy and supported way to >> achieve this? >> >> E.g. I have a search page that receives the parameters that way, and >> I'd like to have a form that targets that page with visible input >> field and a hidden field. With the usual way, I'd create it as part of >> a stateless form, but I'd like to skip the processing on the old page. >> >> Thanks and regards, >> Istvan >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > > -- > Become a Wicket expert, learn from the best: http://wicketinaction.com > Apache Wicket 1.4 increases type safety for web applications > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 > > - > 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: traditional(?) form processing
Sorry, missed an important part: What is the best way to populate the form's action attribute with a page's bookmarkable url (without knowning it either in the HTML or in the Java code, just the Page class is known)? Regards, Istvan On Wed, Jan 6, 2010 at 3:39 PM, Istvan Soos wrote: > Okay, this was too easy... :) what is the best way to populate the > form's action attribute? > > Regards, > Istvan > > On Wed, Jan 6, 2010 at 3:37 PM, Martijn Dashorst > wrote: >> >> >> >> >> >> No wicket required >> >> Martijn >> >> On Wed, Jan 6, 2010 at 3:30 PM, Istvan Soos wrote: >>> Hi, >>> >>> I'd like to create traditional form processing in wicket: to direct a >>> form target to a (bookmarkable) page and receive the form content as >>> PageParameters on that page. Is there any easy and supported way to >>> achieve this? >>> >>> E.g. I have a search page that receives the parameters that way, and >>> I'd like to have a form that targets that page with visible input >>> field and a hidden field. With the usual way, I'd create it as part of >>> a stateless form, but I'd like to skip the processing on the old page. >>> >>> Thanks and regards, >>> Istvan >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> >> >> -- >> Become a Wicket expert, learn from the best: http://wicketinaction.com >> Apache Wicket 1.4 increases type safety for web applications >> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 >> >> - >> 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: traditional(?) form processing
Thanks, I do appreciate your fast response! Regards, Istvan On Wed, Jan 6, 2010 at 3:44 PM, Martijn Dashorst wrote: > > > add(new WebMarkupContainer("form").add(new > SimpleAttributeModifier("action", urlFor(pageClass))); > > Martijn > > On Wed, Jan 6, 2010 at 3:41 PM, Istvan Soos wrote: >> Sorry, missed an important part: >> >> What is the best way to populate the form's action attribute with a >> page's bookmarkable url (without knowning it either in the HTML or in >> the Java code, just the Page class is known)? >> >> Regards, >> Istvan >> >> On Wed, Jan 6, 2010 at 3:39 PM, Istvan Soos wrote: >>> Okay, this was too easy... :) what is the best way to populate the >>> form's action attribute? >>> >>> Regards, >>> Istvan >>> >>> On Wed, Jan 6, 2010 at 3:37 PM, Martijn Dashorst >>> wrote: >>>> >>>> >>>> >>>> >>>> >>>> No wicket required >>>> >>>> Martijn >>>> >>>> On Wed, Jan 6, 2010 at 3:30 PM, Istvan Soos wrote: >>>>> Hi, >>>>> >>>>> I'd like to create traditional form processing in wicket: to direct a >>>>> form target to a (bookmarkable) page and receive the form content as >>>>> PageParameters on that page. Is there any easy and supported way to >>>>> achieve this? >>>>> >>>>> E.g. I have a search page that receives the parameters that way, and >>>>> I'd like to have a form that targets that page with visible input >>>>> field and a hidden field. With the usual way, I'd create it as part of >>>>> a stateless form, but I'd like to skip the processing on the old page. >>>>> >>>>> Thanks and regards, >>>>> Istvan >>>>> >>>>> - >>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Become a Wicket expert, learn from the best: http://wicketinaction.com >>>> Apache Wicket 1.4 increases type safety for web applications >>>> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 >>>> >>>> - >>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >>>> >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > > -- > Become a Wicket expert, learn from the best: http://wicketinaction.com > Apache Wicket 1.4 increases type safety for web applications > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 > > - > 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
autologin redirect for https cookie and go back
Hi, I'd like to create automatic login with the following setup: - The auto-login key is stored in a secure cookie issued only over https. - I have created a separate page for this, it can read (a do authentication) or update the cookie (on form login), and it is sending the cookie only over https. - Most of the things the users will land on are http The HttpsRequestCycleProcessor gives a great job to achieve most of that, however I'm struggling with the autologin, because I'd like to do an initial redirect on session create. I can do a redirect to the cookie page, it will be https, it can send the cookie, however I do not know how to redirect back to the original page. I have no page nor pageClass information, because the redirect happens in WebApplication.newSession(...) and at that time the request.getPage() is null. Any idea or example how this should work? I'm storing the cookie page's redirect information in the session as pageClass and PageParameters, and these are populated manually, as the origin is well known. Thanks, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: autologin redirect for https cookie and go back
It seems that I've buried myself too deep in the world of bookmarkable pages that I've forgotten the basics of http. Oh dear, such a simple answer, it must be Friday... :) Thanks, Istvan On Fri, Jan 8, 2010 at 5:30 PM, Igor Vaynberg wrote: > but you do have the original url, so redirect back to that > > -igor > > On Fri, Jan 8, 2010 at 8:16 AM, Istvan Soos wrote: >> Hi, >> >> I'd like to create automatic login with the following setup: >> - The auto-login key is stored in a secure cookie issued only over https. >> - I have created a separate page for this, it can read (a do >> authentication) or update the cookie (on form login), and it is >> sending the cookie only over https. >> - Most of the things the users will land on are http >> >> The HttpsRequestCycleProcessor gives a great job to achieve most of >> that, however I'm struggling with the autologin, because I'd like to >> do an initial redirect on session create. I can do a redirect to the >> cookie page, it will be https, it can send the cookie, however I do >> not know how to redirect back to the original page. I have no page nor >> pageClass information, because the redirect happens in >> WebApplication.newSession(...) and at that time the request.getPage() >> is null. >> >> Any idea or example how this should work? I'm storing the cookie >> page's redirect information in the session as pageClass and >> PageParameters, and these are populated manually, as the origin is >> well known. >> >> Thanks, >> Istvan >> >> - >> 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: wicketstuff-jwicket, drag-and-drop, Internet Explorer 7/8
I'm interrested in using jWicket, please use this email for whatever announce, thanks once again, Stefan
mod_proxy + ssl + HttpsRequestCycleProcessor
Hi, We are using HttpsRequestCycleProcessor + @RequireHttps annotation in our local dev environment (the server is a jetty executed directly from Eclipse). In the production environment, we have Apache + mod_proxy, and I'd prefer if Apache could handle the SSL part (in that case we are not required to configure SSL on the application server - glassfish v3). Is there any best practice how to achieve this? Thanks and regards, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: mod_proxy + ssl + HttpsRequestCycleProcessor
That is ok, however in production I still would like to benefit of the @RequireHttps. Will it work? I suppose there should be a setup that uses mod_headers to inject a header in the request or something like that, but I'm only guessing this... Istvan On Thu, Mar 4, 2010 at 6:23 PM, Josh Chappelle wrote: > In your Application class you could check to see if you are running in > Production or Development mode. If you are running in Development mode then > use the HttpsRequestCycleProcessor. Otherwise use the default > RequestCycleProcessor. > > Josh > > -Original Message- > From: Istvan Soos [mailto:istvan.s...@gmail.com] > Sent: Thursday, March 04, 2010 11:05 AM > To: users@wicket.apache.org > Subject: mod_proxy + ssl + HttpsRequestCycleProcessor > > Hi, > > We are using HttpsRequestCycleProcessor + @RequireHttps annotation in > our local dev environment (the server is a jetty executed directly > from Eclipse). In the production environment, we have Apache + > mod_proxy, and I'd prefer if Apache could handle the SSL part (in that > case we are not required to configure SSL on the application server - > glassfish v3). Is there any best practice how to achieve this? > > Thanks and regards, > Istvan > > - > 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: mod_proxy + ssl + HttpsRequestCycleProcessor
The solution seems to be an extra header with the mod_header module and an extra filter before the wicket filter. With the later we can check the extra header, and overwrite the scheme to "https" if the header is present. Seems to be working for now... Regards, Istvan On Thu, Mar 4, 2010 at 6:04 PM, Istvan Soos wrote: > Hi, > > We are using HttpsRequestCycleProcessor + @RequireHttps annotation in > our local dev environment (the server is a jetty executed directly > from Eclipse). In the production environment, we have Apache + > mod_proxy, and I'd prefer if Apache could handle the SSL part (in that > case we are not required to configure SSL on the application server - > glassfish v3). Is there any best practice how to achieve this? > > Thanks and regards, > Istvan > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
onkeyup ajax call with the key pressed
Hi, Is there a way to combine onkeyup event (on a div panel, not on form component) into an ajax call, that will contain the character of the key pressed? Thanks, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: onkeyup ajax call with the key pressed
Thanks! Is there somewhere an example for this? E.g. with Java callback codes and like... Thanks, Istvan On Fri, Mar 12, 2010 at 1:40 PM, Pedro Santos wrote: > Yes, for example you can add an ajax behaviour to you page, and using his > callback url mount an script like > > wicketAjaxGet(callbackUrl + '&key=' + event.keyCode); > > on your div onkeyup event. > > On Fri, Mar 12, 2010 at 6:55 AM, Istvan Soos wrote: > >> Hi, >> >> Is there a way to combine onkeyup event (on a div panel, not on form >> component) into an ajax call, that will contain the character of the >> key pressed? >> >> Thanks, >> Istvan >> >> - >> 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
wicket-jmx
Hi, Is there any documentation around wicket-jmx? I've found only a few blog entry so far, but not much in detail... (e.g. how to initialize it) Thanks, Istvan
Re: wicket-jmx
To answer my own question: just put the wicket-jmx.jar in the classpath and enable the JMX server. That is it, really :) Regards, Istvan On Wed, Mar 17, 2010 at 2:04 PM, Istvan Soos wrote: > > Hi, > Is there any documentation around wicket-jmx? I've found only a few blog > entry so far, but not much in detail... (e.g. how to initialize it) > Thanks, > Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket:message inside a script tag
Hi, I'd like to localize a simple javascript alert, e.g like this: alert('hello world'); However wicket:message key="helloWorld" is not parsed inside the
Re: Wicket Session Lifecycle Methods????
Why don't you persist when do user actually does the change (on the interface)? Regards, Istvan On Tue, Mar 30, 2010 at 9:56 AM, corneliu.petrescu wrote: > Hey, > I'm trying to store user application configuration in the session: > things like prefered style, prefered locale, etc... > Basically i store these things in a DB table for each user. When a user > logs in i load his settings into the WebSession, the problem is when i > have to persist the changes the user made as i can't find any > onSessionExpired, onLogout handlers. > The only thing i have is sessionDestroyed ... but its not enough since > at that moment the session does not exist anymore. > Any ideeas guys? > > > > > - > 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 Session Lifecycle Methods????
I meant that you probably have some forms in the application where you change these. Persist at that point, before/after calling the session's setters... Regards, Istvan On Tue, Mar 30, 2010 at 10:18 AM, corneliu.petrescu wrote: > That was my first ideea but i can't since > Session.getStyle, Session.setStyle are final. :( > > On Tue, 2010-03-30 at 10:06 +0200, Istvan Soos wrote: >> Why don't you persist when do user actually does the change (on the >> interface)? >> >> Regards, >> Istvan >> >> On Tue, Mar 30, 2010 at 9:56 AM, corneliu.petrescu >> wrote: >> > Hey, >> > I'm trying to store user application configuration in the session: >> > things like prefered style, prefered locale, etc... >> > Basically i store these things in a DB table for each user. When a user >> > logs in i load his settings into the WebSession, the problem is when i >> > have to persist the changes the user made as i can't find any >> > onSessionExpired, onLogout handlers. >> > The only thing i have is sessionDestroyed ... but its not enough since >> > at that moment the session does not exist anymore. >> > Any ideeas guys? >> > >> > >> > >> > >> > - >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> > For additional commands, e-mail: users-h...@wicket.apache.org >> > >> > >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
IE7 + ajax + cookie = no go?
Hi, I've a page where the user can edit his/her settings through an ajax-updated form. Each time a setting is modified it is being sent to the server side, stored in the session and in the database, and I issue a new cookie that contains the value too. (Of course if the user is not authenticated, only the session and the cookie is updated). Now the symptom is that IE7 keeps forgetting the cookie (and/or the session?). Does anybody else encountered similar problem? What could be the solution? Regards, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ListMultipleChoice and keypress
Hi! How to receive a javascript keypress event from a ListMultipleChoice? Basically I'd need to have a callback (on certain keys like enter, and arrow keys) with the currently selected items. I've tried AjaxFormComponentUpdatingBehavior, I've got two problems with it: - How to have this callback only on certain keys, not any key? - When the arrow keys are used, the callback is called *before* the actual moving of the selection is done in the browser, so I cannot detect the newly selected item. (this is a JavaScript limitation afaik, but maybe this can be worked around by sending the currently selected item+the code of the pressed key) Any ideas? Best regards, Istvan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbie asking for pointers
Hello all, I am in a process of learning Wicket - great framework, I am super happy so far. We will develop a small website soon, and there is a feature which I don't know how to implement properly yet - maybe it is because the lack of experience on my behalf. So I would like to ask for some pointers. The site will have an online ordering form for a few products. The ordering process will be really simple in the first version of the website - a simple Wizard can take care of it, no problems. users will be able to register also - another Wizard, still no problems. Now the requirement is that visitors will be able to start the ordering process, and they must log in or register only at the last step of the ordering process. How can you do it in Wicket - can you simply save the state of the ordering wizard, switch to the login / register wizard, and upon completion, resume the ordering wizard in a "nice" way? Thanks! Regards, Istvan -- View this message in context: http://www.nabble.com/Newbie-asking-for-pointers-tp22540558p22540558.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
HttpsRequestCycleProcessor goes back to http on form failure
Hi, I'm using HttpsRequestCycleProcessor and it works in most of the cases. However... My login form is https protected. My non-bookmarkable urls are encrypted. On my login form, if the user misses the password, it will get notified (part of the form gets red) and it has the chance to start over. However this time the url is like http://example.com/?x= so it got redirected back to http. How could I remain on https in such cases? Regards, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: HttpsRequestCycleProcessor goes back to http on form failure
Further analysis showed that this problem is somehow related to the apache + mod-proxy + mod-headers environment, because pure jetty or pure glassfish didn't have any issue. Regards, Istvan On Fri, Apr 23, 2010 at 4:12 PM, Istvan Soos wrote: > Hi, > > I'm using HttpsRequestCycleProcessor and it works in most of the > cases. However... > > My login form is https protected. > My non-bookmarkable urls are encrypted. > > On my login form, if the user misses the password, it will get > notified (part of the form gets red) and it has the chance to start > over. However this time the url is like http://example.com/?x= so > it got redirected back to http. > > How could I remain on https in such cases? > > Regards, > Istvan > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
YUI 3 anyone?
Hi, Is there a cool best-practice or even better an integration library to use YUI 3? I know the standard generic way, I'm interested specifically in YUI 3... Thanks, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
full JS page + include wicket components?
Hi, I have a complex editor page I plan to implement in JavaScript (YUI 3). However, there are components implemented in Wicket and present on other pages, that I'd like to reuse - if possible. For example I have a combobox that first contains only 10 items, the last one will populate 30 more, or it can switch to textfield + autocomplete also. Is there an easy way to reuse the later component in my JavaScript codes - e.g. to include on demand, use it and extract the final value? Regards, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
autocomplete based on other field's value + storing the reference
Hi, I've the following stripped down hierarchy: form wicket:id="form" |- input type="text" wicket:id="main" |- input type="text" wicket:id="description" |- input type="hidden" wicket:id="reference" I'd like the description field to work as an autocomplete field: when the users clicks into it, it might suggest descriptions from the server side list, based on the value of the 'main' field. If the user selects one description, the reference id should be stored in the hidden field. After that (or if there is no suggestion) the user is free to edit the description field as (s)he likes. In the same form, I have several of these fields, therefore I need some generic solution. Any ideas or similar solutions? Thanks and regards, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: is possible that CryptedUrlWebRequestCodingStrategy not working
Fernando, It would be better to protect you application in an other way: e.g. create the ids with random, fixed-length postfixes. My practice is to create 4-length postfix with 0-9a-zA-Z random pattern. This is 62^4 possibility for each id in the sequence, e.g. 1aiP7, and 2pN63 is valid, but 1aiP6 is not (because it does not exists in the database). And if you strip the 4-length postfix, you can get a normal sequence (1, 2, ..., 9, a, ..., z, A, ..., Z, 10, 11, ...) Looking it in other way, if you create a hash for each id and accept only request knowing the hash, you are a bit safer (until a hacker decodes the hash algorithm). Hope it helps, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Opening a new modal window when OK is clicked on currently open modal window
Yes, by opening the second window *when* the first is closed. Try something like this: abstract class Modal1 extends ModalWindow { public Modal1(id) { // ... setWindowClosedCallback(new ModalWindow.CloseButtonCallback() { @Override public void onClose(AjaxRequestTarget target) { Modal1.this.onClose(target); } }); } protected abstract void onClose(AjaxRequestTarget target); public Modal1 showMe(target) { // ... super.show(); return this; } } // somewhere in the page: ModalWindow modal1, modal2; // ... add(modal1 = new Modal1("w1") { @Override void onClose(AjaxRequestTarget target) { modal2.show(target); } }); add(modal2 = new Modal2("w2")); // ... modal1.showMe(target); The more flexible solution is by setting the close callback *when* the window is shown: modal1.showMe(target).setWindowClosedCallback(new ModalWindow.CloseButtonCallback() { @Override public void onClose(AjaxRequestTarget target) { modal2.show(target); } }); On Thu, Jun 3, 2010 at 3:48 PM, Chris Colman wrote: > Is it possible to replace the currently open Modal window with a > different modal window from within the OK click handler of the currently > open modal window? > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: drag and drop
You can implement by adding DraggableBehavior *and* DroppableBehavior to each item, something like this: add(new DraggableBehavior() { { setName("someName"); setRevert(DraggableBehavior.DragRevertMode.ALWAYS); setRevertDuration(0); setHelper(DragHelperMode.CLONE); setOpacity(Opacity.LOW); } }); add(new DroppableBehavior() { {//{ setHoverClass("resequencerHover"); setTolerance(DropTolerance.POINTER); setDraggablesAcceptedByDroppable(new DraggablesAcceptedByDroppable("someName")); }//} @Override protected void onDrop(AjaxRequestTarget target, final Component component, final SpecialKeys keys) { // get seqnum (sequence number) // if source and target seqnum are the same then ignore // update data (maybe even in persistent store, AKA database) // refresh container containing your list (target.addComponent(listContainer);) } }); add(new AttributeAppender("class", true, new AbstractReadOnlyModel() { @Override public String getObject() { return "resequencer"; } }, " ")); CSS: .resequencer { border-top: 3px solid transparent; } .resequencerHover { border-top: 3px solid #00; } This is just the rough idea (my case is more complicated). Istvan (aka Stefan) On Mon, Jun 7, 2010 at 12:26 PM, DerBernd wrote: > > Hi, > another question of mine: > Is there any implementation of an "Sortable" where I can change order of > items within an by dragging and dropping. Or what would even be > better: change order of Components in an RepeatingView. > > > I found the org.wicketstuff.jquery.dnd.DnDSortableHandler. But do not > really > know how to make it work, cause I found no examples on the web. > > Thanks a lot > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2245708.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: drag and drop
My seqnums are persistently stored, when items are retrieved so the seqnum. I used models to pass and get item data: @Override public void populateItem(final Item item) { final ItemData itemData = item.getModelObject(); item.add(new MyLink("title", new DraggableModel(itemData) { @Override public String getObject() { return itemData.getTitle(); } @Override public DraggableModel onDrop(AjaxRequestTarget target, DroppableModel droppableModel) { // check where the item was dropped (my items can be dropped in more containers) if (droppableModel.getType() == Droppable.RESEQUENCER) { // clip D&D-ed into clip seqnum updater Integer newSeqnum = (Integer) (droppableModel.getMobject()); if (newSeqnum.equals(itemData.getSeqnum())) { return null; } // update your data in persistent store return null; } // else (if any) } } add(new DraggableBehavior() { { setName(Draggable.PRODUCT.name()); setRevert(DraggableBehavior.DragRevertMode.ALWAYS); setRevertDuration(0); setHelper(DragHelperMode.CLONE); setOpacity(Opacity.LOW); } }); add(new DroppableBehavior() { { setHoverClass("resequencerHover"); setTolerance(DropTolerance.POINTER); setDraggablesAcceptedByDroppable(new DraggablesAcceptedByDroppable(Draggable.PRODUCT.name())); } @Override protected void onDrop(AjaxRequestTarget target, final Component component, final SpecialKeys keys) { DraggableModel model = (DraggableModel) component.getDefaultModel(); // the container invokes the onDrop() callback of item, passing container's data, so that // the item can figure out where was dropped model.onDrop(target, new DroppableModel(Droppable.RESEQUENCER, itemData.getSeqnum())); } }); add(new AttributeAppender("class", true, new AbstractReadOnlyModel() { @Override public String getObject() { return "resequencer"; } }, " ")); } public abstract class DraggableModel extends AbstractReadOnlyModel { protected Draggable type; protected T mobject; public DraggableModel(Draggable type) { this.type = type; } public DraggableModel(T object) { this.mobject = object; } public DraggableModel(Draggable type, T object) { this.type = type; this.mobject = object; } public final T getMobject() { return mobject; } public Draggable getType() { return type; } @Override public String getObject() { return null; } /** * Callback, invoked by 'droppable' when it accepts this draggable. * Implementers should call droppable's onDrop() if droppable is not null. * @param target * @param droppableModel * @return */ public abstract DraggableModel onDrop(AjaxRequestTarget target, DroppableModel droppableModel); } public class DroppableModel extends AbstractReadOnlyModel { protected Droppable type; protected T mobject; public DroppableModel(Droppable type) { this.type = type; } public DroppableModel(T object) { this.mobject = object; } public DroppableModel(Droppable type, T object) { this.type = type; this.mobject = object; } public DroppableModel() { throw new UnsupportedOperationException("Type required"); } public final T getMobject() { return mobject; } public Droppable getType() { return type; } @Override public String getObject() { return null; } /** * Callback, invoked by 'draggable' after this droppable invoked draggable's onDrop(). * Implementers should call draggable's onDrop() if draggable is not null. * @param target * @param draggableModel * @return */ public DroppableModel onDrop(AjaxRequestTarget target, DraggableModel draggableModel) { return null; } } public enum Droppable { TRASH, RESEQUENCER /* etc */; } public enum Draggable { PRODUCT, USER /* etc */; } Hoping that copy&paste&adjustments are OK, Istvan On Mon, Jun 7, 2010 at 3:02 PM, DerBernd wrote: > > Ok, > I think I understood, but how do you get the seqnum? > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-tp1881857p2245847.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: jQuery Accordion implementation
Go ahead, Istvan On Thu, Jun 10, 2010 at 2:12 PM, Martin Makundi < martin.maku...@koodaripalvelut.com> wrote: > "Just do it" ;) > > 2010/6/10 Stefan Lindner : > > I'm starting to implement jQuery's Accordion for jWicket now. Any > > suggestions/wishes? > > > > Stefan > > > > - > > 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: Welcome Martin Grigorov as a core team member
Congrats Martin !
Re: setDefaultButton works in all browsers?
Had/have problems on IE7. Never worked in a form being in a modal window (panel). Stefan On Tue, Sep 21, 2010 at 4:54 PM, Anna Simbirtsev wrote: > I am using setDefaultButton to submit the form using enter key. It > seems to be working ok, but I have read on the internet that people > are having problems in some browsers. Does anybody have any > recommendations? > > Thanks > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: ModalWindow update size
// add to your ModalWindow constructor: setWidthUnit("em"); setHeightUnit("em"); setResizable(false); setOutputMarkupId(true); @Override public void show(AjaxRequestTarget target) { super.show(target); // ... int width = ...; int height = ...; target.appendJavascript(""// + "var thisWindow = Wicket.Window.get();\n"// + "if (thisWindow) {\n"// + "thisWindow.window.style.width = \"" + width + "em\";\n"// + "thisWindow.content.style.height = \"" + height + "em\";\n"// + "thisWindow.center();\n"// + "}"// ); }
Re: Status of wicketstuff jquery integration
Try this: http://code.google.com/p/jqwicket/ Allow high/low level jQuery/UI access. (sometimes low level JavaScripting is required). Tried all libraries you mentioned but JqWicket looks to be the most promising. To make my life easier I modified it, JQBehavior extends AbstractDefaultAjaxBehavior (instead Behavior). stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ajax versioning
Hi! In case I have a bookmarkable page with some AJAX on it (form+table) and the user can navigate away and back to this page (using the back button). How can I make sure that in case of the back button, the user will see the state of the page after the AJAX modifications? Best regards, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to set Javascript error handler for Wicket Ajax error
I'm using Wicket-1.5. Figured out that an AjaxCallDecorator with failure handler almost solves my problem. What parameters are passed to failure handler of an Ajax call decorator ? (to be able to figure out type of failure) stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
components by property expressions
Hi! When I use CompoundPropertyModels, I can automatically wire together my model with the components. However, now what I need to do is to find the corresponding Component by a property expression. How to do this? Eg. if there is a CPM attached to my form, with a model object of a User, I need to find out what Component is bound to the "loginName" field of the model. How to achieve this? Best regards, Istvan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
page styling/variation + resource references
hi, When using resource references for linking to a CSS file, there is a possibility to have multiple versions that can be selected via the style / variation setting. What I'd like to achieve is, that the style / variation is picked based on the page where the resource reference is used. This I can achieve currently by placing a wicket:link element in the header: This is all fine, however if I don't use the above "autolink" feature, instead I'd like to add the reference as a HeaderItem in code, picking up of the style / variation no more works. Looking into the source code, the only path where style / variation info is read in this case if from getSession().getStyle(), which is not OK for me, because I'd like to have it set based on the page and not based on a global setting. Is there some way to make the HeaderItem aware of the page and pass the style/variation info to the resource reference? Thanks, Istvan