Re: how to use LinkTree in frame
Thank Igor :-) But if I wanna change the tree behavior, such as expanding the Node when the node is clicked as the junction link is clicked. So I have to invoke updateTree(target); The ajaxLink seems to be the only choice.:-( Igor Vaynberg [EMAIL PROTECTED] wrote: you have to override the method that generates the link and replace it with a BookmarkablePageLink -igor On 10/15/07, Kevin Liu wrote: The question may be how ajaxLink be bookmarkable: the code below absolutely does not work fine: pageLink = new AjaxLink(id){ private static final long serialVersionUID = 3332246227467032288L; public void onClick(AjaxRequestTarget target){ //.. setResponsePage(Destination.class); updateTree(target); } }; pageLink.add(new AttributeModifier(target,true,new Model(right))); Kevin Liu wrote: Could someone tell me how to use LinkTree in the left frame and the target of the links in the tree is the right frame?? Thanks a lot~ -Kevin Liu - Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. -Kevin Liu - Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. -Kevin Liu - Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
Re: WicketMessage: Expected close tag for 'tr wicket:id=sorting' Possible attempt to embed component(s) 'span wicket:id=actions' in the body of this component which discards its body
Thanks for the reply, Igor - I probably didn't explain myself well, the HTML I listed in my post was part of the error message thrown by Wicket and not my source code. In my source HTML I had this (read span for spanx, if I put in span it doesn't show up in the post !!): [dataview navigator] table cellspacing=0 class=dataview tr thActions/th thBooking Id/th th wicket:id=bookingStartRunStart Time/th thEnd Time/th thCampaign/th thStatus/th thProgram Profile/th thWeighting Profile/th /tr tr wicket:id=sorting tdspanX wicket:id=actions[actions]/td tdspanX wicket:id=bookingid[bookingid] /td tdspanX wicket:id=bookingStartRun[bookingStartRun]/td tdspanX wicket:id=bookingEndRun[bookingEndRun]/td tdspanX wicket:id=campaign[campaign]/td tdspanX wicket:id=status[status]/td tdspanX wicket:id=programProfile[programProfile]/td tdspanX wicket:id=weightingProfile[weightingProfile]/td /tr /table and just in case I've also tried this: [dataview navigator] table cellspacing=0 class=dataview tr thActions/th thBooking Id/th th wicket:id=bookingStartRunStart Time/th thEnd Time/th thCampaign/th thStatus/th thProgram Profile/th thWeighting Profile/th /tr tr wicket:id=sorting td wicket:id=actions[actions]/td td wicket:id=bookingid[bookingid] /td td wicket:id=bookingStartRun[bookingStartRun]/td td wicket:id=bookingEndRun[bookingEndRun]/td td wicket:id=campaign[campaign]/td td wicket:id=status[status]/td td wicket:id=programProfile[programProfile]/td td wicket:id=weightingProfile[weightingProfile]/td /tr /table They both give the error I stated. It is lifted more or less entirely from the Wicketstuff SortedGrid example so I'm not clear on what I'm doing wrong, unless it is an incompatibility with Wicket 1.3 ? -- View this message in context: http://www.nabble.com/WicketMessage%3A-Expected-close-tag-for-%27%3Ctr-wicket%3Aid%3D%22sorting%22%3E%27-Possible-attempt-to-embed-component%28s%29-%27%3Cspan-wicket%3Aid%3D%22actions%22%3E%27-in-the-body-of-this-component-which-discards-its-body-tf4631132.html#a13228299 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Examples for AjaxLazyLoadPanel?
Did you look at http://www.wicketstuff.org/wicket13/ajax/lazy-loading.1 Kind regards, Florian Sperber SantiagoA schrieb: Hi, i am trying to use an AjaxLazyLoadPanel, but have some Problems to get it work. I have a page with a panel, which produces heavily loading action. I just want the page to be shown while the panel is loaded in contrast to load the whole thing and get the page rendered afterwards. Are there examples on how to use the panel correctly? I´m relatively new to this (2 years working with java, half a year with wicket), so please excuse. :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session Objects Approach
I found another con with detachable is that if you are constructing a complex object graph _before_ putting it in the database you would have to do something cleverer... e.g. only detach if already persisted? We just stuck with non-detachable models. Eelco Hillenius wrote: Does this approach have any significant improvement over the former? and what could be the cons Like Alex said, look at LoadableDetachableModel for instance. You don't have to discard right away; just do at at the end of the request. It's what detachable is for. Pro detaching: less memory consumption per session, and you can avoid lazy loading problems when you use e.g. Hibernate. Con: more database traffic (if you don't cache these objects) and cpu usage (though very very minimal). In general a pro is also that your objects are always fresh. A general con when working in forms can be that you have to persist changes right away or you'll lose them with the reload. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Session-Objects-Approach-tf4600804.html#a13229389 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to use LinkTree in frame
But then you have to use custom javascript, because you want to both update the tree and the right frame. -Matej On 10/16/07, Kevin Liu [EMAIL PROTECTED] wrote: Thank Igor :-) But if I wanna change the tree behavior, such as expanding the Node when the node is clicked as the junction link is clicked. So I have to invoke updateTree(target); The ajaxLink seems to be the only choice.:-( Igor Vaynberg [EMAIL PROTECTED] wrote: you have to override the method that generates the link and replace it with a BookmarkablePageLink -igor On 10/15/07, Kevin Liu wrote: The question may be how ajaxLink be bookmarkable: the code below absolutely does not work fine: pageLink = new AjaxLink(id){ private static final long serialVersionUID = 3332246227467032288L; public void onClick(AjaxRequestTarget target){ //.. setResponsePage(Destination.class); updateTree(target); } }; pageLink.add(new AttributeModifier(target,true,new Model(right))); Kevin Liu wrote: Could someone tell me how to use LinkTree in the left frame and the target of the links in the tree is the right frame?? Thanks a lot~ -Kevin Liu - Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. -Kevin Liu - Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. -Kevin Liu - Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Java Swing with Wicket Question
Hello, I have developed Java Swing with Wicket. In IE Browser, first loading, I am not able to view the tree view. But when I click next time, the tree is showing. Any loading problem in IE?? Please send your suggestion. But in Firefox Browser, the tree view is working Fine. Thanking You. Regards, Edi -- View this message in context: http://www.nabble.com/Java-Swing-with-Wicket-Question-tf4632971.html#a13229774 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom rendering
I think you just have to toggle the operation (url ) and model object for label based on user is null or not. Label dynamicText = new Label(lbl , new AbstractReadOnlyModel(){ public Object getObject(){ User u = ...; if(u==null){ return in order to sign in please click; } else{ return hello u.get_name(); } } }); Similarly for link. just change the action in onClick for example -swaroop On 10/16/07, Cristi Manole [EMAIL PROTECTED] wrote: Hello, I was wondering if it is possible to do custom rendering in wicket. What i need is something like a panel in which - if the user is not logged in, there will be a text with in order to sign in please click Sign in and then the link and - if the user is logged in, the same text component would show hello user, please click Sign out in order to logout and then the link. The point is having an anchor with different text and different target through code - one panel, not having two very similar panels. I didn't manage to get this custom functionality by having a wicket:id=..span wicked:id=..//a. Thank you.
Re: safari and ajax (issue 938)
This can be discarded. Seems as my tomcat didnt want to be upgraded to beta4, so it kept beta3 somewhere and used that. A reboot solved that. And it's now working perfect:) Thanks for the attention:) regardt Nino Nino Saturnino Martinez Vazquez Wael wrote: Hmm that did not help. Im running safari 2.0.4. Ok next step is to create a quickstart, ill do that tomorrow.. regards Nino Nino Saturnino Martinez Vazquez Wael wrote: Ahh ok I'll try this, I guess im the other canary then:) Nathan Hamblen wrote: Make sure you've cleared Safari's cache since upgrading to beta4. So far I haven't run into any problems with Safari ajax in the new version, and I seem to be the canary in the coal mine. ;) Nino Saturnino Martinez Vazquez Wael wrote: Hmm changing it OnChangeAjaxBehavior, makes it stop working if using it in conjuction with datepicker on safari and FF.. BTW, i am using an text field with datepicker and want to make selecting a date with the datepicker trigger the ajax call, it works in IE FF but not safari.. Nino Saturnino Martinez Vazquez Wael wrote: Hi im having some trouble with wicket,ajax and safari. I get the exact same errors as this wicket issue, marked resolved: http://issues.apache.org/jira/browse/WICKET-938 Browsing the ajax on wicket examples does not seem to trigger the bug. I've been looking at this example: http://wicketstuff.org/wicket13/ajax/on-change-ajax-behavior Im using AjaxFormComponentUpdatingBehavior (with onchange as parameter) and the example uses OnChangeAjaxBehavior, could this cause the problem? Theres also a link from the issue towards nabble but it can nolonger find the message? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ImageMap and Ajax
Hi, I'm using an ImageMap to display an image. Whenever a user clicks on the image, the coordinates get sent to the Server using AJAX. There, I want to add a CircleLink to the place where the user clicked. So I'm trying to replace the whole map using: protected void onEvent(AjaxRequestTarget target) { WebRequest request = (WebRequest) getRequest(); final MapString, String[] parameters = request.getParameterMap(); final int x = Integer.parseInt(parameters.get(x)[0]); final int y = Integer.parseInt(parameters.get(y)[0]); imageMap.addCircleLink(x, y, 10, new Link(testLink) { @Override public void onClick() { // TODO Auto-generated method stub } }); target.addComponent(imageMap); PicMapPanel.this.processResult(x, y, target); } My problem now is that the imageMap can't be replaced. AJAX debug says ERROR: Component with id [[theMap2]] a was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. And yes, I'm sure I called it, but it can't be found in the markup. Does anyone have an idea how to solve this? Maybe in a completely different way, I wouldn't mind that ;-) Michael -- View this message in context: http://www.nabble.com/ImageMap-and-Ajax-tf4633435.html#a13230846 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Examples for AjaxLazyLoadPanel?
Allright. Problem solved. Thanks for the help again. -- View this message in context: http://www.nabble.com/Examples-for-AjaxLazyLoadPanel--tf4632483.html#a13231668 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Link embedded in localized Label/Message?
Hi, is it possible to have a link in a localized label? I would like to have something like this in my output: Please click a href=xyzhere/a. And then do -- Is there a possiblity to use a StringResourceModel here? Something like pagexyz.usermessage=Please click {mylink}. And then do... How would I now add the link to the message? myLabel.add( new Link( does not work... If this is not possible, how is the standard way of doing such a thing? Thanks for your help! Marcus
Re: enable / disable MarkupContainer and all children
-bump- Summary: how to disable a component and all of its children in one call? And also: what is the expected behavior of a disabled parent component in the light of its children? A quick look in the source of FormComponentPanel tells me that this code does not disable or enable its children when it itself is disabled or enabled. Matthijs PS. The onBeforeRender implementation I have (uses IVisitor to disable children) works well enough. This mail is just because I'm curious how this should be done. Matthijs Wensveen wrote: Hi, I have a Panel (myPanel) containing some child components. When I say: myPanel.setEnabled(false); I want to disable the panel, but also disable all children. Preferably, I'd override setEnabled, but since it is final (sigh), this is impossible. A less elegant way to do it is to supply a public setChildrenEnabled method, or something. Usually, the applications I build try to be as implementation-agnostic as possible regarding the specific component subclasses, i.e. declare myPanel as Panel or even Component where possible. In that case, classes that use myPanel don't see setChildrenEnabled unless they cast it to MyPanel. Another way would be to override onBeforeRender and use a Component.IVisitor to call setEnabled on all children. This works, but seems to me like the wrong moment to do this. Also, it would not allow you to disable myPanel but enable some specific child (since that would be overruled in onBeforeRender of MyPanel). I think it comes down to the semantics of setEnabled. What does it mean when a component is disabled? What does it mean to a child when its parent is disabled? (this is starting to sound like a charity ad.) Anyways. Any ideas? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Link embedded in localized Label/Message?
Hi, In your HTML the label is a child of the link so do it the other way around, add the label to the link Link l = new Link.. l.add(new Label.. with a wicket:id=..span wicket:id=../span/a gr Thies Hi, is it possible to have a link in a localized label? I would like to have something like this in my output: Please click a href=xyzhere/a. And then do -- Is there a possiblity to use a StringResourceModel here? Something like pagexyz.usermessage=Please click {mylink}. And then do... How would I now add the link to the message? myLabel.add( new Link( does not work... If this is not possible, how is the standard way of doing such a thing? Thanks for your help! Marcus -- http://www.ehour.nl/ http://blog.ehour.nl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Link embedded in localized Label/Message?
It is not possible. A label will remove *all* markup between its tags and put the contents of the model inside. In your case I would suggest using wicket:message tags instead. wicket:message key=beforeHereLinkPlease click /wicket:messagea href=# wicket:id=hereLinkwicket:message key=insideHereLinkhere/wicket:message/awicket:message key=afterHereLink. And then do.../wicket:message Martijn On 10/16/07, marcus dickerhof [EMAIL PROTECTED] wrote: Hi, is it possible to have a link in a localized label? I would like to have something like this in my output: Please click a href=xyzhere/a. And then do -- Is there a possiblity to use a StringResourceModel here? Something like pagexyz.usermessage=Please click {mylink}. And then do... How would I now add the link to the message? myLabel.add( new Link( does not work... If this is not possible, how is the standard way of doing such a thing? Thanks for your help! Marcus -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta4/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TabbedPanel with image tabs - how to contribute ?
That's great! I added to the article a different approach - custom image in every tab :) Regards Vitek Stefan Simik wrote: Thank you, I added new article: http://cwiki.apache.org/confluence/display/WICKET/Tabs+with+image but the last problem is, that I copied the article from one place to another (better location), but now I want to delete the the first article, because both are the same now. (ARTICLE I WANT TO DELETE IS http://cwiki.apache.org/confluence/display/WICKET/TabbedPanel+with+image+tabs) .. and there is a problem with message: You do not have permission Who can I contact to delete the unwanted doubled article ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
possible bug in 1.2.6 / 1.3 Include
I found this while working on 1.2.6 and checked it out in 1.3 and it's the same. It appears as though Include does not pay attention to the contextpath if it is explicitly set. Line 162 (In 1.2.6) or line 233 (in 1.3b4) of Include is the following line which as I understands it builds a absolute URL from a relative path from the model: buildUrl.append(req.getContextPath()).append('/').append(url); It's using the request's context path to build the absolute URL, if this is behind a proxy it will fail, I changed my copy to this: buildUrl.append (getApplication().getApplicationSettings().getContextPath()).append('/').append(url); Am I misunderstanding this? Jeremy
Re: Examples for AjaxLazyLoadPanel?
Because I have replaced a Panel by an AjaxLazyLoadPanel, I had to replace the ids for the targets at the other ajax-components too. That was just my fault. Example: Step 1: myPanel = new MyPanel(panelName, new PropertyModel(this,searchString), version); ... someAjax ... target(myPanel); ... Step 2: replaced by myLazyPanel = new AjaxLazyLoadPanel(lazyload){ @Override public Component getLazyLoadComponent(String id){ myPanel = new MyPanel(panelName, new PropertyModel(myPage.this,searchString), version); myPanel.setOutputMarkupId(true); return myPanel; } }; ... someAjax ... target(myLazyPanel); ... Step 3: I replaced panelName by id -- View this message in context: http://www.nabble.com/Examples-for-AjaxLazyLoadPanel--tf4632483.html#a13234761 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom rendering
Thank you for your reply. The text of the label is easy to change. I cannot find a method to change the text of the anchor. That's my problem. Is there a way to do that? On 10/16/07, Swaroop Belur [EMAIL PROTECTED] wrote: I think you just have to toggle the operation (url ) and model object for label based on user is null or not. Label dynamicText = new Label(lbl , new AbstractReadOnlyModel(){ public Object getObject(){ User u = ...; if(u==null){ return in order to sign in please click; } else{ return hello u.get_name(); } } }); Similarly for link. just change the action in onClick for example -swaroop On 10/16/07, Cristi Manole [EMAIL PROTECTED] wrote: Hello, I was wondering if it is possible to do custom rendering in wicket. What i need is something like a panel in which - if the user is not logged in, there will be a text with in order to sign in please click Sign in and then the link and - if the user is logged in, the same text component would show hello user, please click Sign out in order to logout and then the link. The point is having an anchor with different text and different target through code - one panel, not having two very similar panels. I didn't manage to get this custom functionality by having a wicket:id=..span wicked:id=..//a. Thank you.
CryptedUrlWebRequestCodingStrategy breaks ajax fallback link in beta4
I updated a fairly complex app to beta4 and everythings works so far but ajaxfallbacklink does neither go to onClick via ajax nor via the fallback. the links are in a list, which is not the reason. other ajax elements on this page like onAjaxChange work ok. I traced this to the use of CryptedUrlWebRequestCodingStrategy, without CrypedUrls the app and links work ok, with axajfallbacklink fails. I can live with this for the moment, did not see any issues about this on the list yet -- View this message in context: http://www.nabble.com/CryptedUrlWebRequestCodingStrategy-breaks-ajax-fallback-link-in-beta4-tf4634981.html#a13236199 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom rendering
This is exactly what i was missing (i tried to add them both to page): *Link* l = new *Link*.. l.add(new *Label*.. the label is a child of link... tks a lot Thies! On 10/16/07, Thies Edeling [EMAIL PROTECTED] wrote: see the Link embedded in localized Label/Message? thread Cristi Manole wrote: Thank you for your reply. The text of the label is easy to change. I cannot find a method to change the text of the anchor. That's my problem. Is there a way to do that? On 10/16/07, Swaroop Belur [EMAIL PROTECTED] wrote: I think you just have to toggle the operation (url ) and model object for label based on user is null or not. Label dynamicText = new Label(lbl , new AbstractReadOnlyModel(){ public Object getObject(){ User u = ...; if(u==null){ return in order to sign in please click; } else{ return hello u.get_name(); } } }); Similarly for link. just change the action in onClick for example -swaroop On 10/16/07, Cristi Manole [EMAIL PROTECTED] wrote: Hello, I was wondering if it is possible to do custom rendering in wicket. What i need is something like a panel in which - if the user is not logged in, there will be a text with in order to sign in please click Sign in and then the link and - if the user is logged in, the same text component would show hello user, please click Sign out in order to logout and then the link. The point is having an anchor with different text and different target through code - one panel, not having two very similar panels. I didn't manage to get this custom functionality by having a wicket:id=..span wicked:id=..//a. Thank you. -- http://www.ehour.nl/ http://blog.ehour.nl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session Objects Approach
Just trying to be helpful. :-) Igor Vaynberg wrote: I think what you all are missing in this discussion is that ldms are mostly uss for read only data, not for forms. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Profiling the memory usage
On 10/16/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Well said:) Sometimes I just take a wrong turn while wanting to explain something, and get stuck in that idea. About the wicket-objectsizeof-agent, could it be used to make a small wicket diagnostics contribution..? I mean can it walk over live wicket applications and tell how much individual part were using? Or are some one already doing this? You could implement this through a custom session store. The wicket-objectsizeof-agent project only plugs in a 'IObjectsSizeOfStrategy' that is based on instrumentation rather then serialization. That strategy is used by org.apache.wicket.util.lang.Objects#sizeOf(Object). But again, using a profiler is probably much easier and gives better results. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hi questions about DateField, thanks!
Hi, I try to add a datefield to my page, accroding to the examples in http://www.wicketstuff.org/wicket13/index.html but I get a error and then I try to do it on a sperate page just for testing but getting the same error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs. However about error message doesn't tell me anything, and the code is really simple: java code: public class DateFieldTest extends WebPage{ private Date date = new Date(); public DateFieldTest(){ Form form = new Form(form); DateTextField dateTextField = new DateTextField(dateTextField, new PropertyModel(this, date), new StyleDateConverter(S-, true)); form.add(dateTextField); dateTextField.add(new DatePicker()); add(form); } } Html code: ?xml version=1.0 encoding=UTF-8? html xmlns=http://www.w3.org/1999/xhtml; head titleWicket Examples - dates/title /head body form wicket:id=form input type=text wicket:id=dateTextField / input type=submit value=submit / /form /body /html Thanks for this forum, I am getting lots help from here, many many thanks again! Ray -- View this message in context: http://www.nabble.com/hi-questions-about-DateField%2C-thanks%21-tf4635435.html#a13237803 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session Objects Approach
I found another con with detachable is that if you are constructing a complex object graph _before_ putting it in the database you would have to do something cleverer... e.g. only detach if already persisted? We just stuck with non-detachable models. But the solution to that might be easy: only use the detachable model on the top object of your complex graph, and let all other models use that model (opposed to the model object). Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: hi questions about DateField, thanks!
Your code looks fine to me. We really need to see that stack trace. Eelco On 10/16/07, raybristol [EMAIL PROTECTED] wrote: Hi, I try to add a datefield to my page, accroding to the examples in http://www.wicketstuff.org/wicket13/index.html but I get a error and then I try to do it on a sperate page just for testing but getting the same error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs. However about error message doesn't tell me anything, and the code is really simple: java code: public class DateFieldTest extends WebPage{ private Date date = new Date(); public DateFieldTest(){ Form form = new Form(form); DateTextField dateTextField = new DateTextField(dateTextField, new PropertyModel(this, date), new StyleDateConverter(S-, true)); form.add(dateTextField); dateTextField.add(new DatePicker()); add(form); } } Html code: ?xml version=1.0 encoding=UTF-8? html xmlns=http://www.w3.org/1999/xhtml; head titleWicket Examples - dates/title /head body form wicket:id=form input type=text wicket:id=dateTextField / input type=submit value=submit / /form /body /html Thanks for this forum, I am getting lots help from here, many many thanks again! Ray -- View this message in context: http://www.nabble.com/hi-questions-about-DateField%2C-thanks%21-tf4635435.html#a13237803 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AjaxTabbedPanel and wicketSerializeForm
Hi I'm able to warn the user not to leave a form if it's dirty. This compares the value of wicketSerializeForm() in the onload and onbeforeunload events and it works well. However, I also have some pages with forms in tabs, and I need to warn the user if he tries to switch tabs when a form is dirty, but I have not come up with a way to do this. I'm using AjaxTabbedPanel and Wicket 1.2.6. Any suggestions? Thanks, Julian - Julian http://javathoughts.capesugarbird.com/ My blog about Wicket and other Java stuff -- View this message in context: http://www.nabble.com/AjaxTabbedPanel-and-wicketSerializeForm-tf4635598.html#a13238434 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CryptedUrlWebRequestCodingStrategy breaks ajax fallback link in beta4
Discussed here: http://www.nabble.com/Wicket-Beta4-and-Ajax-Links-tf4616750.html -- View this message in context: http://www.nabble.com/CryptedUrlWebRequestCodingStrategy-breaks-ajax-fallback-link-in-beta4-tf4634981.html#a13238437 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CryptedUrlWebRequestCodingStrategy breaks ajax fallback link in beta4
It should be resolved shortly. -Matej On 10/16/07, Brandon Fuller [EMAIL PROTECTED] wrote: Discussed here: http://www.nabble.com/Wicket-Beta4-and-Ajax-Links-tf4616750.html -- View this message in context: http://www.nabble.com/CryptedUrlWebRequestCodingStrategy-breaks-ajax-fallback-link-in-beta4-tf4634981.html#a13238437 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting the ListItems from a ListView
Scott Sauyet wrote: There may be a much better way of doing what I'm trying to do, and if so, I'd love to hear about it. But what I thought would be simple seems to be eluding me here. I knew there had to be a better way. I found one. I have a form with a dynamic number of dropdowns. I'm populating them using a ListView, and the display is working fine. The trouble is that in my onSubmit(), I now need to get at the selections made for each, and I don't know how to get back the ListItems; the only methods which really seem to expose these are populateItem() and renderItem(), which run before onSubmit(). Is there a way to get at these? Or can you suggest another way to structure this so that I have the access needed? I wrapped the objects in the list that serves as the ListView model in a class that had a property that I could use for the model of the drop-down list. It was pretty straightforward once I stopped trying to get the ListItems back. Someday I'll have interesting questions to ask... :-( -- Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AutoCompleteTextField PostCallHandler Issue
I see it has been assigned to Eelco for Beta 5, so maybe it can get resolved this time around. :) paolo di tommaso wrote: I'be opened an issue about this months ago https://issues.apache.org/jira/browse/WICKET-310 But it is still there .. Paolo On 10/16/07, Don Hass [EMAIL PROTECTED] wrote: There seems to be an issue with the AutoCompleteTextField not calling registered postCallHandlers. I noticed there was an old submission in the old forum (link below) that was never answered for wicket-1.2.3 back in Feb 07. http://www.nabble.com/AutoCompleteTextField-issue-%28wicket-1.2.3%29-tf3267567.html Old AutoCompleteTextField Thread This still appears to happen in the yesterdays 1.3 SVN trunk. Anyone else seen this issue? Should an issue be opened? It was noticed as a result of a page level feedback indicator as described in: http://www.nabble.com/Ajax-refresh-feedback-tf2461118.html Ajax-refresh-feedback Thread -- View this message in context: http://www.nabble.com/AutoCompleteTextField-PostCallHandler-Issue-tf4635138.html#a13236702 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/AutoCompleteTextField-PostCallHandler-Issue-tf4635138.html#a13239368 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket/GWT?
I've been asked to look at possibly using the Google Web Toolkit instead of (along with??) Wicket for my project. I don't know anything about GWT, and I've only been looking at Wicket for about a week. Anyone care to comment on the pros and cons of using these two? What makes one better for a particular project than the other? Are they similar or completely unrelated? Any information, or pointers to some comparison documents would be most appreciated, thanks, nbc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using mod_proxy / mod_rewrite to hang app off root
I've having trouble getting my application behind apache hanging off the root, my application servers url are as follows: http://localhost:8080/context/servlet/bookmarkpage I'd like the URL to be: http://localhost/bookmarkpage I've set up Apache 2.2 in from of it. I can get Apache2 working so that the url is http://localhost/servlet/bookmarkpage, however I want to get rid of the servlet as well. To do that I am aware of two options, one is to write a rewrite rule which removes the servlet from the url and exclude any resources from the rule. I can't quite figure that rule out but I am sure I can given some time. The other option is to set the wicket servlet to /* which is simple and works very nicely, however then ajax calls backs fail. Is there a way to fix that? Perhaps a rewrite rule? What are other people doing? j
Re: Wicket/GWT?
fyi The dev mailing list had a thread about using GWT widgets as Wicket components: http://www.mail-archive.com/[EMAIL PROTECTED]/msg00402.html I don't think anybody has implemented this code. Sean On 10/16/07, Neil B. Cohen [EMAIL PROTECTED] wrote: I've been asked to look at possibly using the Google Web Toolkit instead of (along with??) Wicket for my project. I don't know anything about GWT, and I've only been looking at Wicket for about a week. Anyone care to comment on the pros and cons of using these two? What makes one better for a particular project than the other? Are they similar or completely unrelated? Any information, or pointers to some comparison documents would be most appreciated, thanks, nbc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket/GWT?
On 10/16/07, Neil B. Cohen [EMAIL PROTECTED] wrote: I've been asked to look at possibly using the Google Web Toolkit instead of (along with??) Wicket for my project. I don't know anything about GWT, and I've only been looking at Wicket for about a week. Anyone care to comment on the pros and cons of using these two? What makes one better for a particular project than the other? Are they similar or completely unrelated? You can use them together, though you typically want to cut the number of technologies you use. Best thing you can do is play with both and see what you like best. I think that GWT works well if you want to develop your application as one or more 'applets', have a shallow domain model and a service oriented architecture, and you can go Ajax all the way. Wicket works well for a mixed model, when you want to have control over your URLs (e.g. for bookmarkability/ indexing by search engines) and use a rich domain model. Also, with Wicket, you directly control the HTML you use, whereas with GWT you work with layout managers. There's probably a lot more to say about this, but please play around and compare for yourself. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket Meetup: 33 attendees and counting
Hi all, We're doing very well, with another 4 people signing up in the last two days for the Amsterdam meetup on November 30. This Meetup is FREE ! Free as in Beer ! Hurray ! First off, I could really use some input on the agenda. Also, I received some emails from people worried that the meetup would be committer-only. IT'S NOT! Not only do committers love talking to users (see mailinglist), it's also healthy for the community as a whole that we bring together all kinds of users, developers, committers, managers, decision makers, executives, Belgians, Germans, Brits, Americans, anyone, as long as we spread the Wicket news as far and wide as we can :-) Here's a preliminary agenda. Please get me some feedback! 12:00 Room opens, Wifi connection, power outlets and coffee available. Walk-in hackaton for whoever likes to join. 15:00 Start of the 'official' Meetup. Opening talk. 15:00-18:00 Talks / presentations / discussion / ask-a-committer sessions / TBD 18:00-21:00 Beers and snacks, continuing sessions 21:00 Wrap-up Let me know what you think. If you'd like to say something, or if you'd like to *hear* something, speak up! :) Thanks, and see you all in November, Arjé BTW - sign up somewhere soon because I need to know the number of beers to order
Wicket meetup ideas
Re: redirect request for Page A to page B without contructing A?
Why do you want to do this? dukehoops wrote: Hi, I'd like to redirect requests for page A to page B without constructing page A. Typically I'd use URL parsing in a servlet filter to accomplish this but would like to figure out an OO way to do so. In my RequestCycle I tried: @Override protected void onBeginRequest() { if(PageA.class.equals(this.getResponsePageClass()) someCondition) { this.setResponsePage(pageB); } super.onBeginRequest(); } The problem is that this.getResponsePageClass() is null in onBeginRequest. Is overriding a RequestCycle method the right way to address this problem? If so which method should I override given that: -I need to ascertain that intended request target is PageA -I'd like to avoid constructing page A thanks -nikita - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: redirect request for Page A to page B without contructing A?
If it is intercepting what you're after (like you'd do when enforcing authorization), look at IComponentInstantiationListener. What is your use case? Eelco On 10/16/07, dukehoops [EMAIL PROTECTED] wrote: Hi, I'd like to redirect requests for page A to page B without constructing page A. Typically I'd use URL parsing in a servlet filter to accomplish this but would like to figure out an OO way to do so. In my RequestCycle I tried: @Override protected void onBeginRequest() { if(PageA.class.equals(this.getResponsePageClass()) someCondition) { this.setResponsePage(pageB); } super.onBeginRequest(); } The problem is that this.getResponsePageClass() is null in onBeginRequest. Is overriding a RequestCycle method the right way to address this problem? If so which method should I override given that: -I need to ascertain that intended request target is PageA -I'd like to avoid constructing page A thanks -nikita -- View this message in context: http://www.nabble.com/redirect-request-for-Page-A-to-page-B-without-contructing-A--tf4636621.html#a13241857 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Wicket-Contrib-Scriptaculous] Effects Examples
I think this is what you're looking for: add(new AjaxLink(myLink) { protected void onClick(AjaxTarget target) { target.appendJavascript(new Effect.Fade(myPanel).toJavascript()); } }); On 10/16/07, Nick Heudecker [EMAIL PROTECTED] wrote: Hi, I'm looking for some examples using wicket-contrib-scriptaculous Effects. I looked around the examples project and didn't find anything. Specifically, I'm looking to make a panel fade out when a link inside the panel is clicked. Any help is appreciated. Thanks. -Nick
Re: Disable form validation based on which submit button used?
Two problems 1. updateFormComponentModels() is a protected method. 2. Without calling validate() first, updateFormComponentModels() updates the model with null values. The actual process of taking values from the html form and converting them into Java objects happens inside validate() call. Bruno Borges wrote: In each onSubmit button method, you call what you want, but don't forget to setDefaultFormProcessing(false) on them. This way, no validation is made nor models are updated. You have to control yourself inside onSubmit. Call form.updateFormComponentModels(); (something like that) To Save Exit And for the Finish button, call validate(); and _after_ the updateFormComponentModels... I think this is it. :) give it a shot On 10/16/07, Jesse Foster [EMAIL PROTECTED] wrote: Is there any way to enable/disable form validation based on which submit button I use? My page displays surveys, which are essentially rows of radiogroups and corresponding radios displayed in table like fashion. There are two buttons on the page, one called Finish that saves all the answers on the page and finalizes the survey so no further editing will occur. The other button is Save and Exit which just saves the current set of answers, so even if a radiogroup has no answer I still want to update my model. In one case with Finish I want to validate all radiogroups have an answer by using setRequired(true), while on the flip side with Save and Exit I don't need that validation. I thought of using setDefaultFormProcessing(false) on the Save and Exit button and then manually populating the form model but Wicket ties model populating to validation. The updateModel() call in FormComponent simply calls getConvertedInput() to populate the model object. ConvertedInput is assigned its value during validate(). Only solution I can think of is to subclass RadioGroup and override updateModel() to convert the input and then set the model object. If there is a cleaner or better way to do this please let me know. -- View this message in context: http://www.nabble.com/Disable-form-validation-based-on-which-submit-button-used--tf4636406.html#a13241117 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Bruno Borges Summa Technologies www.summa-tech.com 55 11 85657739 / 55 11 30552054 The glory of great men should always be measured by the means they have used to acquire it. - Francois de La Rochefoucauld -- View this message in context: http://www.nabble.com/Disable-form-validation-based-on-which-submit-button-used--tf4636406.html#a13243863 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dot ( . ) in the URL !
As far as I know, only : is reserved. But if you have a reproducible bug, please create an issue in JIRA. Eelco On 10/15/07, chickabee [EMAIL PROTECTED] wrote: The page was mount using HybridUrlCodingStrategy --thanks Matej Knopp-2 wrote: How did you mount the page? -Matej On 10/15/07, chickabee [EMAIL PROTECTED] wrote: Hi Guys, It seems that wicket has the special meaning of a dot ( . ) in the URL. Wicket expects anything after a dot to be a number and throws Number format exception if it is not, Is there is a way to use dots in the url?? Here is the example of the url where it is failing: https://lilo:8443/whisky/plist/c/Computers%3EComputer_Systems%3ELaptops/ps/1.00_-_1.99_GHz/ Thanks in advance.. -- View this message in context: http://www.nabble.com/Dot-%28-.-%29-in-the-URL-%21-tf4624550.html#a13206993 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Dot-%28-.-%29-in-the-URL-%21-tf4624550.html#a13224511 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: authorize - hasAny / hasAll ?
The wicket-auth project is intended more like an example then a full fledged project. Best thing you can do is just copy the things you need in your own project and tailor for your needs. Eelco On 10/10/07, Artur W. [EMAIL PROTECTED] wrote: Hi, I use MetaDataRoleAuthorizationStrategy.authorize but it authorize if user has ANY of the roles. It's ok, but sometimes I need to authorize when user has ALL the roles. It is possible? Thanks, Artur -- View this message in context: http://www.nabble.com/authorize---hasAny---hasAll---tf4600532.html#a13135051 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ModalWindow.close() results in ERROR: Exception evaluating javascript: TypeError: window.parent.setTimeout is not a function
Please open an issue in JIRA if you have this reproducible. Eelco On 10/5/07, skatz [EMAIL PROTECTED] wrote: More information. It works as expected in IE7. The problem occurs with Firefox 2.0.0.7 skatz wrote: I am trying to use the ModalWindow as a confirmation dialog and it works fine on one page but the same code on a different page produces the above error. Closing the ModalWindow with the X in the corner work fine. The error occurs when the AjaxCallbackLink onClick handler calls ModalWindow.close(); On the page that isn't working the following code is called as the last thing in the page constructor. // The delete dialog ModalWindow deleteDialog = new ModalWindow(deleteDialog); mConfirmationPanel = new ConfirmationPanel(deleteDialog.getContentId(), new WUIResourceModel(CampaignManagerPage.class, deleteDialogQuestion), this, deleteDialog); deleteDialog.setContent(mConfirmationPanel); deleteDialog.setInitialWidth(260); deleteDialog.setInitialHeight(80); deleteDialog.setResizable(false); deleteDialog.setTitle(Delete Campaign(s) Confirmation); deleteDialog.setWindowClosedCallback( new ModalWindow.WindowClosedCallback() { private static final long serialVersionUID = 1L; public void onClose(AjaxRequestTarget pRequestTarget) { ... } } } } ); add(deleteDialog); Any ideas? -- View this message in context: http://www.nabble.com/ModalWindow.close%28%29-results-in-ERROR%3A-Exception-evaluating-javascript%3A-TypeError%3A-window.parent.setTimeout-is-not-a-function-tf4573096.html#a13058356 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Disable form validation based on which submit button used?
Ok, found a way to do what I want. Both buttons for my form do setDefaultFormProcessing(false) I subclass Form and add a boolean attribute called bypassValidation with the appropriate getters and setters. I also override process() with my own method that duplicates the original method, except the if clause is now if (hasError() bypassValidation==false) In the OnSubmit() methods for my Buttons get the form and set the the bypassValidation attribute. Now I call process() and let the form update my model. Finally for the Save and Exit button I clear the FeedbackMessages since it still gets populated with any validation errors. At this point the form and model are at the same state I would get from the the normal validation process. Jesse Foster wrote: Two problems 1. updateFormComponentModels() is a protected method. 2. Without calling validate() first, updateFormComponentModels() updates the model with null values. The actual process of taking values from the html form and converting them into Java objects happens inside validate() call. Bruno Borges wrote: In each onSubmit button method, you call what you want, but don't forget to setDefaultFormProcessing(false) on them. This way, no validation is made nor models are updated. You have to control yourself inside onSubmit. Call form.updateFormComponentModels(); (something like that) To Save Exit And for the Finish button, call validate(); and _after_ the updateFormComponentModels... I think this is it. :) give it a shot On 10/16/07, Jesse Foster [EMAIL PROTECTED] wrote: Is there any way to enable/disable form validation based on which submit button I use? My page displays surveys, which are essentially rows of radiogroups and corresponding radios displayed in table like fashion. There are two buttons on the page, one called Finish that saves all the answers on the page and finalizes the survey so no further editing will occur. The other button is Save and Exit which just saves the current set of answers, so even if a radiogroup has no answer I still want to update my model. In one case with Finish I want to validate all radiogroups have an answer by using setRequired(true), while on the flip side with Save and Exit I don't need that validation. I thought of using setDefaultFormProcessing(false) on the Save and Exit button and then manually populating the form model but Wicket ties model populating to validation. The updateModel() call in FormComponent simply calls getConvertedInput() to populate the model object. ConvertedInput is assigned its value during validate(). Only solution I can think of is to subclass RadioGroup and override updateModel() to convert the input and then set the model object. If there is a cleaner or better way to do this please let me know. -- View this message in context: http://www.nabble.com/Disable-form-validation-based-on-which-submit-button-used--tf4636406.html#a13241117 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Bruno Borges Summa Technologies www.summa-tech.com 55 11 85657739 / 55 11 30552054 The glory of great men should always be measured by the means they have used to acquire it. - Francois de La Rochefoucauld -- View this message in context: http://www.nabble.com/Disable-form-validation-based-on-which-submit-button-used--tf4636406.html#a13244641 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: redirect request for Page A to page B without contructing A?
The use case is this: If an already logged-in user types in our home URL we'd like the site to redirect him/her to own profile page. If user's not logged in, they do land on home page. This is not to compel someone to sign in. So, for example below, PageA = site home page; PageB = user's own profile page -nikita Eelco Hillenius wrote: If it is intercepting what you're after (like you'd do when enforcing authorization), look at IComponentInstantiationListener. What is your use case? Eelco On 10/16/07, dukehoops [EMAIL PROTECTED] wrote: Hi, I'd like to redirect requests for page A to page B without constructing page A. Typically I'd use URL parsing in a servlet filter to accomplish this but would like to figure out an OO way to do so. In my RequestCycle I tried: @Override protected void onBeginRequest() { if(PageA.class.equals(this.getResponsePageClass()) someCondition) { this.setResponsePage(pageB); } super.onBeginRequest(); } The problem is that this.getResponsePageClass() is null in onBeginRequest. Is overriding a RequestCycle method the right way to address this problem? If so which method should I override given that: -I need to ascertain that intended request target is PageA -I'd like to avoid constructing page A thanks -nikita -- View this message in context: http://www.nabble.com/redirect-request-for-Page-A-to-page-B-without-contructing-A--tf4636621.html#a13241857 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/redirect-request-for-Page-A-to-page-B-without-contructing-A--tf4636621.html#a13244889 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: redirect request for Page A to page B without contructing A?
If an already logged-in user types in our home URL we'd like the site to redirect him/her to own profile page. If user's not logged in, they do land on home page. This is not to compel someone to sign in. So, for example below, PageA = site home page; PageB = user's own profile page Sounds like a custom authorization strategy would work great here. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: redirect request for Page A to page B without contructing A?
What I have done is to check in MyApplication.getHomePage(): public Class getHomePage() { IUser user = getMySession().getCurrentUser(); return user == null ? Index.class : UserHome.class; } -- View this message in context: http://www.nabble.com/redirect-request-for-Page-A-to-page-B-without-contructing-A--tf4636621.html#a13246212 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: redirect request for Page A to page B without contructing A?
What I have done is to check in MyApplication.getHomePage(): public Class getHomePage() { IUser user = getMySession().getCurrentUser(); return user == null ? Index.class : UserHome.class; } That's another fine solution if the home page is only what you're after. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Some help. I think I found a bug, but I am a wicket newbie anyway.
I have combine the signIn2 and the wizard for creating a new user. I have added both to my TabbedPanel. For some reason, the wizard appeared wrongly at the right when is clicked. This doesn't happen to the sigIn2. I found some strange html which I wanna share with you, div style=width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hiddeninput So I don't know how to solve it. I am using wicket 1.3 beta 3. If I remove it from the html, I can see the page accurately. I googled this line and I found this wicket link http://mail-archives.apache.org/mod_mbox/wicket-commits/200706.mbox/[EMAIL PROTECTED] this is where I add both of them in java. (it is mixed with some spanish words, I am sorry) public PaginaSignIn(final PageParameters parameters) { ListAbstractTab solapas = new ArrayListAbstractTab(); solapas.add(new AbstractTab(new Model(Entrar)){ @Override public Panel getPanel(String panelId) { return new SolapaSignIn(panelId) { public boolean signIn(String username, String password) { return ((SignIn2Session)getSession()).authenticate(username, password); } }; } }); solapas.add(new AbstractTab(new Model(Nuevo usuario)){ @Override public Panel getPanel(String panelId) { return new NewUserWizard(panelId); } }); add(new TabbedPanel(tabs, solapas)); } Part of the html rendered div class=wicketExtensionsWizard form action=?x=6-%3A0%3Atabs%3Apanel%3Aform%3A1%3AIFormSubmitListener%3A%3A wicket:id=form class=wicketExtensionsWizardForm method=post id=form7 div style=display:none input type=hidden name=form7_hf_0 id=form7_hf_0 / /div div style=width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hiddeninput type=text autocomplete=false/input type=submit onclick= var b=Wicket.$('next8'); if (typeof(b.onclick) != 'undefined') { var r = b.onclick.bind(this)(); if (r != false) b.click(); } else { b.click(); }; return false; / /div Thanks in advance -- Fernando Wermus.