Re: Openid integration?
Looks pretty empty, doesn't it? :-) Nino.Martinez wrote: > > Hmm just saw this : > > http://code.google.com/p/wicket-auth-openid/ > > Nino Saturnino Martinez Vazquez Wael wrote: >> Hi Guys >> >> Have any of you tried to do a openid integration ? >> > > -- > -Wicket for love > > Nino Martinez Wael > Java Specialist @ Jayway DK > http://www.jayway.dk > +45 2936 7684 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Openid-integration--tp20778841p20790787.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create custom UrlCodingStrategy
sorry for the misunderstanding, I never made a url coding strategy so I won't be able to help you, anybody else? On Tue, Dec 2, 2008 at 2:31 PM, Mathias P.W Nilsson <[EMAIL PROTECTED]> wrote: > > Nope this is not what I mean! > > What if I want to mount "/events" to Event.class and 100 customers needs to > use the same page with different variation? > > when the user attempts http://localhost/myapp/test/events/ ( test is the > customer name ) then it should invoke /events. > http://localhost/myapp/test2/events should invoke the same page but with the > test2 customers variation. I do not want to mount test2/events , test/events > since there could be 100 customers that uses this. ( imaging doing this for > all classes and all customers ) I need a way to check the customer name set > variation in the session. > > > -- > View this message in context: > http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20792180.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://www.somatik.be Microsoft gives you windows, Linux gives you the whole house. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default Focus Behavior?
Why not put this code into Wicket? jwcarman wrote: > > On 3/11/08, Martijn Dashorst <[EMAIL PROTECTED]> wrote: >> I suggest wiki. >> > > Done: > > http://cwiki.apache.org/confluence/display/WICKET/Request+Focus+on+a+Specific+Form+Component > > I'm happy now. My work (no matter how trivial) may help someone > someday! :) I don't have time to do so now, but I might add in some > examples on how to do focus on errors, etc. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - ___ http://stubbisms.wordpress.com http://stubbisms.wordpress.com -- View this message in context: http://www.nabble.com/Default-Focus-Behavior--tp15934889p20790155.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Openid integration?
yeah:( I have something working only partially though, cant get email and name attribute back from the openid provider properly.. Seems to work with openid.org, but not claimid.com or myopenid.com But I do not think it has anything todo with wicket: Wicket sign in panel, sender of request: public class OpenIdSignInPanel extends SignInPanel { public OpenIdSignInPanel(String id) { super(id); } @Override public boolean signIn(String username, String password) { try { OpenIdHelper openIdHelper = new OpenIdHelper(); ServletWebRequest swr = (ServletWebRequest) this.getRequestCycle() .getRequest(); BufferedWebResponse bwr = (BufferedWebResponse) this .getRequestCycle().getResponse(); String returnPage = urlFor(OpenIdSignInPage.class, new PageParameters()) .toString(); returnPage=RequestUtils.toAbsolutePath(returnPage); openIdHelper.authRequest(username, swr.getHttpServletRequest(), bwr .getHttpServletResponse(),returnPage); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } throw new AbortException() { }; } } // server endpoint public class OpenIdSignInPage extends AbstractHasRepositoryPage { private static final long serialVersionUID = 1L; public static final String MOUNTPATH = "/openid"; public OpenIdSignInPage(PageParameters pageParameters) { super(pageParameters); try { OpenIdHelper oih = new OpenIdHelper(); ServletWebRequest swr = (ServletWebRequest) this.getRequestCycle() .getRequest(); User openIdUser = oih.verifyResponse(swr.getHttpServletRequest()); User user = userRepository.getUserByEmail(openIdUser.getEmail()); if (user!=null && user.getPassword() != null) { error("You cannot have both a openid user acount and local account either, you can only log on with open id now"); user.setPassword(null); } SocratesSession socratesSession = (SocratesSession) getSession(); if (user == null) { user = new User(); user.setEmail(openIdUser.getEmail()); user.setName(openIdUser.getEmail()); userRepository.add(user); } // userwasthere socratesSession.setUserId(user.getId()); socratesSession.setAuthorized(true); setResponsePage(MyEventsPage.class); } catch (ConsumerException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } // helper class using openid4java public class OpenIdHelper { public ConsumerManager manager; public static final String OPENID_NS_SREG1_1 = "http://openid.net/extensions/sreg/1.1";; private static org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(OpenIdHelper.class); public OpenIdHelper() throws ConsumerException { // instantiate a ConsumerManager object manager = WicketApplication.consumerManager; } // --- placing the authentication request --- public String authRequest(String userSuppliedString, HttpServletRequest httpReq, HttpServletResponse httpResp, String returnToUrl) throws IOException, ServletException { try { // configure the return_to URL where your application will receive // the authentication responses from the OpenID provider // perform discovery on the user-supplied identifier List discoveries = manager.discover(userSuppliedString); // attempt to associate with the OpenID provider // and retrieve one service endpoint for authentication DiscoveryInformation discovered = manager.associate(discoveries); // store the discovery information in the user's session httpReq.getSession().setAttribute("openid-disc", discovered); // obtain a AuthRequest message to be sent to the OpenID provider AuthRequest authReq = manager.authenticate(discovered, returnToUrl); FetchRequest fetch = FetchRequest.createFetchRequest(); // // SRegRequest sregReq = SRegRequest.createFetchRequest(); // // sregReq.addAttribute("fullname", true); // sregReq.addAttribute("nickname", true); // sregReq.addAttribute("email", true); fetch.addAttribute("Fullname", "http://axschema.org/namePerson/";, true); fetch.addAttribute("Email", "http://axschema.org/contact/email";, true); // wants up to three email addresses fetch.setCount("Email", 1); AuthRequest req = manager.authenticate(discovered, returnToUrl); req.addExte
Unable to instantiate Web session class Error:::Wicket1.3.5 Help
App Server: Glassfish V2 Wicket Version:: Wicket 1.3.5 JVM: Java 6u10 IDE: Netbeans6.5 This error does not occur when using Wicket 1.3.1. Any tips? thanks Unable to instantiate web session class com.dabarobjects.fme.FMEWebSession StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception org.apache.wicket.WicketRuntimeException: Unable to instantiate web session class com.dabarobjects.fme.FMEWebSession at org.apache.wicket.authentication.AuthenticatedWebApplication.newSession(AuthenticatedWebApplication.java:119) at org.apache.wicket.Session.findOrCreate(Session.java:228) at org.apache.wicket.Session.findOrCreate(Session.java:211) at org.apache.wicket.Session.get(Session.java:250) at org.apache.wicket.Application$1.onInstantiation(Application.java:276) at org.apache.wicket.Application.notifyComponentInstantiationListeners(Application.java:974) at org.apache.wicket.Component.(Component.java:873) at org.apache.wicket.MarkupContainer.(MarkupContainer.java:105) at org.apache.wicket.Page.(Page.java:235) at org.apache.wicket.markup.html.WebPage.(WebPage.java:184) at org.apache.wicket.markup.html.pages.ExceptionErrorPage.(ExceptionErrorPage.java:55) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(Abst -- Aladejebi Ayodeji A., DabarObjects Solutions Phone: +234 9 481 7 156 Mobile: +234 803 589 1780 Email: [EMAIL PROTECTED] Web: www.dabarobjects.com Blog: blog.dabarobjects.com Participate, Collaborate, Innovate Join Community: http://www.cowblock.net/ Get A Free Blog: http://blogs.cowblock.net/
Re: Create custom UrlCodingStrategy
Basically, just implement IRequestTargetUrlCodingStrategy. :) What is precise question? 2008/11/24 Mathias P.W Nilsson <[EMAIL PROTECTED]>: > > Hi, > > I need some info in how to create my own UrlCodingStrategy > > This is the preconditions. > I have a database with 20 - 100 customers that needs to access this > application. Every customer has it's own properties files and css variation. > > What I want is that let's say Edgesoft wants to use the application. Then > the user will access > http://localhost/app/edgesoft > > If I want to mount Base.class I do not want to do /edgesoft/base only base > and the UrlCodingStrategy will handle the rest for me. Check if the customer > exists, set variation and then continue with the request. > > An example. > http://localhost/edgesoft/order/order/13 > http://localhost/another/order/order/14 > mount( MyStrategy( "/order/" , ); > > This should go to the exact same page but with different variation and > properties. How can this be achieved. What classes do I need to subclass to > make this happen? > -- > View this message in context: > http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20660813.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- WBR, kan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: backbutton with AjaxFallbackDefaultDataTable
On Tue, 02 Dec 2008, Kamil Hark wrote: > Hi, I have a problem with browser's backbutton and > AjaxFallbackDefaultDataTable, I have button that adds new rows into table (I > put new objects into table's model and udate table with ajax). when I click > some link to other page and after redirect I click browser's backbutton then > my table is empty until I refresh the browser. > How to fix it? I think the reason of above is that after back onRender is > not invoked Try disabling all caching with HTTP headers and proper browser settings. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oyhttp://www.ri.fi/ > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Inmethod DataGrid
On Tue, 02 Dec 2008, ulrik wrote: > I'm using the Inmethod DataGrid in my application. > I would like to test it's functionality with WicketTester. I have run into > some problems though. How do I simulate clicking on a row in the DataGrid > from the WicketTester? I'm not familiar with DataGrid, but if it has Wicket Ajax behaviours bound to "onclick" javascript event, probably with wicketTester.executeAjaxEvent(wicketComponentOfRow, "onclick"); See the DataGrid source code to find out to which components the ajax behaviours are bound. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oyhttp://www.ri.fi/ > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create custom UrlCodingStrategy
I only afraid, you cannot mount to "root". So, it will be "http://localhost/company/edgesoft/something";, "http://localhost/company/another/something"; Maybe easier and much more flexible for you will be UrlRewriteFilter. 2008/12/2 kan <[EMAIL PROTECTED]>: > Basically, just implement IRequestTargetUrlCodingStrategy. :) > What is precise question? > > 2008/11/24 Mathias P.W Nilsson <[EMAIL PROTECTED]>: >> >> Hi, >> >> I need some info in how to create my own UrlCodingStrategy >> >> This is the preconditions. >> I have a database with 20 - 100 customers that needs to access this >> application. Every customer has it's own properties files and css variation. >> >> What I want is that let's say Edgesoft wants to use the application. Then >> the user will access >> http://localhost/app/edgesoft >> >> If I want to mount Base.class I do not want to do /edgesoft/base only base >> and the UrlCodingStrategy will handle the rest for me. Check if the customer >> exists, set variation and then continue with the request. >> >> An example. >> http://localhost/edgesoft/order/order/13 >> http://localhost/another/order/order/14 >> mount( MyStrategy( "/order/" , ); >> >> This should go to the exact same page but with different variation and >> properties. How can this be achieved. What classes do I need to subclass to >> make this happen? >> -- >> View this message in context: >> http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20660813.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > -- > WBR, kan. > -- WBR, kan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to instantiate Web session class Error:::Wicket1.3.5 Help
On Tue, 02 Dec 2008, Ayodeji Aladejebi wrote: > App Server: Glassfish V2 > Wicket Version:: Wicket 1.3.5 > JVM: Java 6u10 > IDE: Netbeans6.5 > > This error does not occur when using Wicket 1.3.1. > > Any tips? thanks > > Unable to instantiate web session class com.dabarobjects.fme.FMEWebSession I think that the real problem is wrapped inside the exception whose stack trace you sent. Could you send the whole stack trace please? See AuthenticatedWebApplication source code for more hints, you could put a breakpoint there in newSession and see what exactly is going on. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oyhttp://www.ri.fi/ > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create custom UrlCodingStrategy
Nope this is not what I mean! What if I want to mount "/events" to Event.class and 100 customers needs to use the same page with different variation? when the user attempts http://localhost/myapp/test/events/ ( test is the customer name ) then it should invoke /events. http://localhost/myapp/test2/events should invoke the same page but with the test2 customers variation. I do not want to mount test2/events , test/events since there could be 100 customers that uses this. ( imaging doing this for all classes and all customers ) I need a way to check the customer name set variation in the session. -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20792180.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create custom UrlCodingStrategy
Ok Is there any topic on UrlRewriteFilter and Wicket. I still need to set variation and locale even when I use UrlRewriteFilter. -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20793471.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create custom UrlCodingStrategy
> http://localhost/test/hello > http://localhost/test2/hello > > Can this be done with wicket? Yes, this is called mounting pages or resources see here: http://cwiki.apache.org/WICKET/url-coding-strategies.html http://www.javalobby.org/java/forums/t68753.html > > -- > View this message in context: > http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20791796.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://www.somatik.be Microsoft gives you windows, Linux gives you the whole house. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to instantiate Web session class Error:::Wicket1.3.5 Help
Yeah I think the problem is in Wicket-auth-roles jarthe AuthtenticatedWebApplication.newSession class is throwing the error cuz down down the stack trace org.apache.wicket.WicketRuntimeException: Unable to instantiate web session class com.dabarobjects.fme.FMEWebSession at org.apache.wicket.authentication.AuthenticatedWebApplication.newSession(AuthenticatedWebApplication.java:119) at org.apache.wicket.Session.findOrCreate(Session.java:225) at org.apache.wicket.Session.findOrCreate(Session.java:208) at org.apache.wicket.Session.get(Session.java:244) at org.apache.wicket.Application$1.onInstantiation(Application.java:276) at org.apache.wicket.Application.notifyComponentInstantiationListeners(Application.java:973) at org.apache.wicket.Component.(Component.java:866) at org.apache.wicket.MarkupContainer.(MarkupContainer.java:104) at org.apache.wicket.Page.(Page.java:231) at org.apache.wicket.markup.html.WebPage.(WebPage.java:184) at org.apache.wicket.markup.html.pages.ExceptionErrorPage.(ExceptionErrorPage.java:55) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:162) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1206) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245) at org.apache.wicket.RequestCycle.request(RequestCycle.java:489) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Caused by: java.lang.NoSuchMethodException: com.dabarobjects.fme.FMEWebSession.(org.apache.wicket.Request) at java.lang.Class.getConstructor0(Class.java:2706) at java.lang.Class.getDeclaredConstructor(Class.java:1985) at org.apache.wicket.authentication.AuthenticatedWebApplication.newSession(AuthenticatedWebApplication.java:114) ... 44 more On Tue, Dec 2, 2008 at 2:34 PM, Timo Rantalaiho <[EMAIL PROTECTED]>wrote: > On Tue, 02 Dec 2008, Ayodeji Aladejebi wrote: > > App Server: Glassfish V2 > > Wicket Version:: Wicket 1.3.5 > > JVM: Java 6u10 > > IDE: Netbeans6.5 > > > > This error does not occur when using Wicket 1.3.1. > > > > Any tips? thanks > > > > Unable t
Re: Unable to instantiate Web session class Error:::Wicket1.3.5 Help
On Tue, 02 Dec 2008, Ayodeji Aladejebi wrote: > org.apache.wicket.WicketRuntimeException: Unable to instantiate web session > class com.dabarobjects.fme.FMEWebSession ... > Caused by: java.lang.NoSuchMethodException: > com.dabarobjects.fme.FMEWebSession.(org.apache.wicket.Request) > at java.lang.Class.getConstructor0(Class.java:2706) > at java.lang.Class.getDeclaredConstructor(Class.java:1985) > at > org.apache.wicket.authentication.AuthenticatedWebApplication.newSession(AuthenticatedWebApplication.java:114) Is there a constructor com.dabarobjects.fme.FMEWebSession(org.apache.wicket.Request) and is it public? Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oyhttp://www.ri.fi/ > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create custom UrlCodingStrategy
RTFS :) If you look at any implementation, say BookmarkablePageRequestTargetUrlCodingStrategy.decode, you'll see how RequestParameters are turning in IRequestTarget, and encode does opposite - IRequestTarget is turning in url. You can set page a parameter (say "variation") from desired part of url and override in your page class the method: @Override public String getVariation() { return getPageParameters().getAsString("variation"); } It's just thoughts, I never tried it myself. :) 2008/12/2 Mathias P.W Nilsson <[EMAIL PROTECTED]>: > > Ok > > Is there any topic on UrlRewriteFilter and Wicket. I still need to set > variation and locale even when I use UrlRewriteFilter. > -- > View this message in context: > http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20793471.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- WBR, kan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create custom UrlCodingStrategy
Can url rewrite be used for this. I guess there are alot of people that want custom made css and so on based on a url http://localhost/test/hello http://localhost/test2/hello Can this be done with wicket? -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20791796.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Inmethod DataGrid
Hello! I'm using the Inmethod DataGrid in my application. I would like to test it's functionality with WicketTester. I have run into some problems though. How do I simulate clicking on a row in the DataGrid from the WicketTester? // Ulrik -- View this message in context: http://www.nabble.com/Inmethod-DataGrid-tp20792106p20792106.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
backbutton with AjaxFallbackDefaultDataTable
Hi, I have a problem with browser's backbutton and AjaxFallbackDefaultDataTable, I have button that adds new rows into table (I put new objects into table's model and udate table with ajax). when I click some link to other page and after redirect I click browser's backbutton then my table is empty until I refresh the browser. How to fix it? I think the reason of above is that after back onRender is not invoked Regards Kamil. -- View this message in context: http://www.nabble.com/backbutton-with-AjaxFallbackDefaultDataTable-tp20791685p20791685.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create custom UrlCodingStrategy
Thanks! I will look at this and maybe come back on the subject. One problem that I saw was that the request didn't get printed in the UrlCodingStrategy because it was not mounted in init. Maybe I'm wrong about this and need to look it over again. -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20794183.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Javascript Wicket wrapper (like ExtGwt and SmartGWT) ?
Hi, Yes I was thinking about something like this but with more complete Javascript frameworks (but I don't know very well JQuery in fact). Ext-JS and SmartClient offer lots of nice widgets with a sharp design. Pure Wicket also offer built-in "widgets" but not as rich/sharp as these frameworks... I know that adding a layer on top of Wicket will complexify stuff and it will be harder to debug but it seems to bring a new dimension to the user experience... I will follow your project with JQuery :-) Cedric On Mon, Dec 1, 2008 at 10:39 AM, jWeekend <[EMAIL PROTECTED]>wrote: > > Cedric, > > I have just started looking at http://www.wickext.org Wickext . > Is this the sort of thing you're thinking about? > For version 1.0 we hope to bind widget state back to Wicket as well. > > Regards - Cemal > http://www.jWeekend.co.uk http://jWeekend.co.uk > > > > thiebal wrote: > > > > Why don't we have some nice Javascript frameworks on top of Wicket > > like what exists for wrapping GWT ? > > http://extjs.com/explorer > > http://www.smartclient.com/smartgwt/showcase > > > > Is there a reason why people implements these wrappers for GWT and not > > for Wicket ? > > We should be able to do exactly the same thing with Wicket no? > > > > Cedric > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/Javascript-Wicket-wrapper-%28like-ExtGwt-and-SmartGWT%29---tp20773877p20774308.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Create custom UrlCodingStrategy
Nope! I'm lost here. How can I create my own IRequestTargetUrlCodingStrategy when I need to add a mount path. The mount path is not the same as the page requested. Let me explain this more in detail. I wan't to mount Base.class to /login. But I need to access the /login thru /Customer1/login and /Customer2/login. I can't mount every possible customer reference in init(). -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20794194.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create custom UrlCodingStrategy
Oh sorry, I thought you want use it with mount. In this case you have to deal with IRequestCodingStrategy, not with IRequestTargetUrlCodingStrategy. Seems you can make your implementation which proxies given rcu (usually it will be WebRequestCodingStrategy or crypted), it passes encode/decode to it adding/cutting "variance" part of url. Then you have to override WebApplication.newRequestCycleProcessor WebRequestCycleProcessor.newRequestCodingStrategy and which will return your strategy. Maybe it's not best way to do it, but I don't see any better. 2008/12/2 Mathias P.W Nilsson <[EMAIL PROTECTED]>: > > Thanks! > > I will look at this and maybe come back on the subject. One problem that I > saw was that the request didn't get printed in the UrlCodingStrategy because > it was not mounted in init. Maybe I'm wrong about this and need to look it > over again. > -- > View this message in context: > http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20794183.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- WBR, kan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create custom UrlCodingStrategy
[I'm sending again slightly modified because the first response got spam-blocked - dunno why - hopefully you're not getting this twice] I did something similar to this a while back and came up with the following solution. It may not be the best way, but what I do is extend WicketFilter and catch the path there, checking it for style, and then stripping the style part and passing it to Wicket. The problem with this solution is that you must then front-end the app with something like Apache, and do ProxyPass /app http://{your localhost : your port }/app/yourstyleforthisdomain - and do that for each domain. This wasn't a problem for me because I was already using Apache on the frontend. But it makes testing at regular old localhost port 8081 (or whatever port) practically impossible - you have to set up Apache on your test machines, too. Again, this was something I already do anyway, but I want to mention the drawbacks of this. Also notice that my ProxyPass passes from one folder depth to two - because in the filter I'm going to strip one folder depth off - this will become important with your cookie handling - so that they end up being set on the same path as you're really displaying the app. public class SiteDifferentiatingFilter extends WicketFilter { private static final Logger LOGGER = Logger.getLogger(SiteDifferentiatingFilter.class); @Override public String getRelativePath(HttpServletRequest request) { String path = super.getRelativePath(request); // Site is an enum of all sites for (Site site : Site.values()) { if (path.startsWith(site.getKey())) { if (RequestCycle.get() != null && Session.get() != null) { Session.get().setStyle(site.getStyleName()); // this is a variation of what I did... I actually created //my own site-aware session and set the Site on it so //that I could see what site they were on in their session //and I also used this to switch which application context //I was using so that I could have different service settings //per site. Here's the code I used if you're interested: /* ((SiteDifferentiatingWebSession) Session.get()).setSite(site); ApplicationContextFactory.getFactory().setSite(site); */ } path = path.substring(site.getKey().length()); if (path.startsWith("/")) { path = path.substring(1); } return path; } } return path; } } Hope this helps - it works, but it is probably not the cleanest solution out there. I've had it in production on this group of sites for quite a while and have not had a bug appear because of it. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Dec 2, 2008 at 7:09 AM, Mathias P.W Nilsson <[EMAIL PROTECTED]> wrote: > > Can url rewrite be used for this. I guess there are alot of people that want > custom made css and so on based on a url > > http://localhost/test/hello > http://localhost/test2/hello > > Can this be done with wicket? > > -- > View this message in context: > http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20791796.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WebMarkupContainer within WebMarkupContainer not updated when Ajax update
My WebPage consists of two WebMarkupContainer: one is the parent of the other. The two WebMarkupContainer are encapsulated within a div tag as the following: ... ... ... In Java file, I added wmc2 as a child of wmc1 ("wmc1.add(wmc2)" ) as the following: final WebMarkupContainer wmc1 = new WebMarkupContainer("wmc1"); wmc1.setOutputMarkupId( true ); ... WebMarkupContainer wmc2 = new WebMarkupContainer("wmc2", new SomeInnerModel()); wmc2.setOutputMarkupId( true ); wmc1.add(wmc2); ( The problem: wmc1 is updates while Ajaxing it (wmc1 was added as a target for some ajax component), while wmc2 not!! I thought that wmc2 should be updated too since it is a child of a wmc1. Even if I adding wmc2 to the target of an Ajax component (as done with wmc1) - it is not updated! The model attached to wmc2 is derived from LoadableDetachableModel and implements the load() method. I'm quite frustrated while making some works around that issue. Does Wicket supports that behavior at all? Any idea? THANKS for ADVANCE! -- View this message in context: http://www.nabble.com/WebMarkupContainer-within-WebMarkupContainer-not-updated-when-Ajax-update-tp20796182p20796182.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Openid integration?
Hi Nino, > I have something working only partially though, cant get email and name > attribute back from the openid provider properly.. Seems to work with > openid.org, but not claimid.com or myopenid.com why not using spring-security and don't have any more hassle at all? Best regards, --- Jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebMarkupContainer within WebMarkupContainer not updated when Ajax update
On Tue, 02 Dec 2008, simonm wrote: > > ... > The problem: wmc1 is updates while Ajaxing it (wmc1 was added as a target > for some ajax component), while wmc2 not!! > I thought that wmc2 should be updated too since it is a child of a wmc1. Exactly. You can check out the exact behavior from the Ajax debug console (visible when running with -Dwicket.configuration=development ), but because updating wmc1 with Ajax means replacing the corresponding div entirely, it definitely replaces all of its contents as well. Most probably your problem is due to a model of wmc2 which still makes it display old data on the next render. Other possibility is an error in the Ajax update; that should be visible in the Ajax debug console. If you want others to investigate further, you should make a quickstart that demonstrates the problem. It's also a good exercise as you'll probably solve this issue while preparing the quickstart ;) Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oyhttp://www.ri.fi/ > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session invalidation - 1.4-rc1
Hi! After upgrade from m3 to rc1, a problem with session invalidation appeared. I have a "Exit" menu, using Ajax (AbstractDefaultAjaxBehavior). On its respond, it does: getSession().invalidate(); setResponsePage(HomePage.class); This worked with m3, but now nothing happens, and in the next request a session expired error happens. The Ajax debug shows: INFO: Using XMLHttpRequest transport INFO: INFO: Initiating Ajax GET request on ?wicket:interface=:1:toolbar::IBehaviorListener:1:&item=3&random=0.36475325857545937 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (1 characters) INFO: ERROR: Error while parsing response: Could not find root element INFO: Invoking post-call handler(s)... INFO: Invoking failure handler(s)... Any clue? Adriano - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session invalidation - 1.4-rc1
Oops, problem a bit different, and solved, but I don't know why this worked before and not now. HomePage has only one constructor: HomePage(PageParameters parameters) Creating a instance now works: setResponsePage(new HomePage(new PageParameters())); I believe, in 1.4-m3 a empty PageParameters has being passed... Adriano Adriano dos Santos Fernandes escreveu: Hi! After upgrade from m3 to rc1, a problem with session invalidation appeared. I have a "Exit" menu, using Ajax (AbstractDefaultAjaxBehavior). On its respond, it does: getSession().invalidate(); setResponsePage(HomePage.class); This worked with m3, but now nothing happens, and in the next request a session expired error happens. The Ajax debug shows: INFO: Using XMLHttpRequest transport INFO: INFO: Initiating Ajax GET request on ?wicket:interface=:1:toolbar::IBehaviorListener:1:&item=3&random=0.36475325857545937 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (1 characters) INFO: ERROR: Error while parsing response: Could not find root element INFO: Invoking post-call handler(s)... INFO: Invoking failure handler(s)... Any clue? Adriano - 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: Javascript Wicket wrapper (like ExtGwt and SmartGWT) ?
For integration between Ext JS and Wicket, check out: http://code.google.com/p/wicket-ext/ http://www.wickettools.org/index.php/extjs-integration -Richard On Tue, Dec 2, 2008 at 10:35 AM, Cédric Thiébault < [EMAIL PROTECTED]> wrote: > Hi, > Yes I was thinking about something like this but with more complete > Javascript frameworks (but I don't know very well JQuery in fact). > Ext-JS and SmartClient offer lots of nice widgets with a sharp design. > > Pure Wicket also offer built-in "widgets" but not as rich/sharp as these > frameworks... > I know that adding a layer on top of Wicket will complexify stuff and it > will be harder to debug but it seems to bring a new dimension to the user > experience... > > I will follow your project with JQuery :-) > > Cedric > > > > On Mon, Dec 1, 2008 at 10:39 AM, jWeekend <[EMAIL PROTECTED] > >wrote: > > > > > Cedric, > > > > I have just started looking at http://www.wickext.org Wickext . > > Is this the sort of thing you're thinking about? > > For version 1.0 we hope to bind widget state back to Wicket as well. > > > > Regards - Cemal > > http://www.jWeekend.co.uk http://jWeekend.co.uk > > > > > > > > thiebal wrote: > > > > > > Why don't we have some nice Javascript frameworks on top of Wicket > > > like what exists for wrapping GWT ? > > > http://extjs.com/explorer > > > http://www.smartclient.com/smartgwt/showcase > > > > > > Is there a reason why people implements these wrappers for GWT and not > > > for Wicket ? > > > We should be able to do exactly the same thing with Wicket no? > > > > > > Cedric > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > -- > > View this message in context: > > > http://www.nabble.com/Javascript-Wicket-wrapper-%28like-ExtGwt-and-SmartGWT%29---tp20773877p20774308.html > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >
Re: Create custom UrlCodingStrategy
Thank you very much but I'm afraid I can't use apache as a front end due to the server setup. I need a way to do this in wicket. -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20801209.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket Session grows too big real fast
LDM is a LoadableDetachableModel Flavius wrote: > > > > Martijn Dashorst wrote: >> >> With Wicket 1.3 only one page should be stored in session. You should >> check if you don't keep references between pages -> that would result >> in 1+N pages (with N being the number of pages you reference in your >> page). >> >> Other than that: using LDM's and DataView/DataProvider instead of >> ListView will help considerably. >> >> Martijn >> > > May I ask what LDM is? Is that Lightweight Data Model? > > -- View this message in context: http://www.nabble.com/Wicket-Session-grows-too-big-real-fast-tp20697077p20802687.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket Session grows too big real fast
For remoting could have a sense to make DTO for the sake of Singe Responsibility Principle. 2008/11/26 James Carman <[EMAIL PROTECTED]>: > Not exactly. It might be okay for web projects like this, but if you need > to do any remoting, this won't work. Our domain entities have to be > serializable. > > On Wed, Nov 26, 2008 at 11:22 AM, Bruno Cesar Borges < > [EMAIL PROTECTED]> wrote: > >> Now that is a really good advice. :-) >> >> -Mensagem original- >> De: kan [mailto:[EMAIL PROTECTED] >> Enviada em: quarta-feira, 26 de novembro de 2008 14:19 >> Para: users@wicket.apache.org >> Assunto: Re: Wicket Session grows too big real fast >> >> >> I am not sure if it always applicable, but usually I do not do >> "implements Serializable" for domain objects (it works well with >> Hibernated POJOs). In this case the Wicket cannot serialize a >> component, and if it was a link to any such object - wicket just >> reports about it into log, so you can see right away which component >> has tried to "steal" a reference to an object (like in your situation >> with inner class). >> >> 2008/11/26 jhp <[EMAIL PROTECTED]>: >> > >> > Removing references pointing to previous pages solved a lot, very good >> point. >> > Also making sure that individual domain objects don't get stored to >> session >> > makes a difference. I have still a lot of code to go through to make >> sure >> > that all unnecessary references don't get stored to session, but making a >> > few changes in the most important pages makes already a big difference. >> > >> > I noticed that this is a problem that others have experienced too. I >> guess >> > it is pretty easy unintentionally stuff the session with domain objects >> ,and >> > if using modern day persistence framework, those domain objects can be >> quite >> > large if they have collections etc. >> > >> > I think there is a need for small document outlining the common pitfalls >> and >> > remedies for them. I haven't seen such. Wicket reference of course tells >> > about LoadableDetachableModel, but this thread has info that I haven't >> found >> > anywhere else. I might try compose such a document, if I just have the >> time >> > and energy in the near future. >> > >> > Thanks to Martijn, Johan and John for your responses! >> > >> > BR, >> > Jukka >> > >> > >> > >> > >> > Martijn Dashorst wrote: >> >> >> >> With Wicket 1.3 only one page should be stored in session. You should >> >> check if you don't keep references between pages -> that would result >> >> in 1+N pages (with N being the number of pages you reference in your >> >> page). >> >> >> >> Other than that: using LDM's and DataView/DataProvider instead of >> >> ListView will help considerably. >> >> >> >> Martijn >> >> >> > >> > -- >> > View this message in context: >> http://www.nabble.com/Wicket-Session-grows-too-big-real-fast-tp20697077p20702093.html >> > Sent from the Wicket - User mailing list archive at Nabble.com. >> > >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> >> >> >> -- >> WBR, kan. >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> *** >> "Atenção: Esta mensagem foi enviada para uso exclusivo do(s) >> destinatários(s) acima identificado(s), >> podendo conter informações e/ou documentos confidencias/privilegiados e seu >> sigilo é protegido por >> lei. Caso você tenha recebido por engano, por favor, informe o remetente e >> apague-a de seu sistema. >> Notificamos que é proibido por lei a sua retenção, disseminação, >> distribuição, cópia ou uso sem >> expressa autorização do remetente. Opiniões pessoais do remetente não >> refletem, necessariamente, >> o ponto de vista da CETIP, o qual é divulgado somente por pessoas >> autorizadas." >> >> >> "Warning: This message was sent for exclusive use of the addressees above >> identified, possibly >> containing information and or privileged/confidential documents whose >> content is protected by law. >> In case you have mistakenly received it, please notify the sender and >> delete it from your system. >> Be noticed that the law forbids the retention, dissemination, distribution, >> copy or use without >> express authorization from the sender. Personal opinions of the sender do >> not necessarily reflect >> CETIP's point of view, which is only divulged by authorized personnel." >> >> *** >> > -- WBR, kan.
Re: Create custom UrlCodingStrategy
To clarify things. It's something like in this post that I'm after. Get the customer from db See Dmitry Kandalov post http://www.nabble.com/mounting-large-number-of-url-td13972929.html#a14010271 http://www.nabble.com/mounting-large-number-of-url-td13972929.html#a14010271 -- View this message in context: http://www.nabble.com/Create-custom-UrlCodingStrategy-tp20660813p20804484.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
examples of Wizard and working back button
Hi, I'm looking for a code example of writing a wizard in wicket with a working back button. The code at http://cwiki.apache.org/WICKET/building-wizard-functionality.html is no longer available and I was wondering if it was an old example anyway. Any help is greatly appreciated! Thanks, Jason -- View this message in context: http://www.nabble.com/examples-of-Wizard-and-working-back-button-tp20805386p20805386.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IMG SRC URL in iframe.
Hi, I would like to use an iframe on my page that contains IMG tags. I would like the IMG tag SRC to point back to the server to load up the image. What would be the best way to construct the URLs in Wicket? Many thanks for any advice, Graeme. -- View this message in context: http://www.nabble.com/IMG-SRC-URL-in-iframe.-tp20805408p20805408.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: examples of Wizard and working back button
If by back button you mean a previous button, here's a regular old wizard example, as easy as 1-2-3: 1 - http://www.google.com/search?q=wicket+examples 2 - http://www.wicket-library.com/wicket-examples/ 3 - http://www.wicket-library.com/wicket-examples/wizard/ Hope this helps. On Tue, Dec 2, 2008 at 8:09 PM, novotny <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm looking for a code example of writing a wizard in wicket with a working > back button. The code at > http://cwiki.apache.org/WICKET/building-wizard-functionality.html is no > longer available and I was wondering if it was an old example anyway. Any > help is greatly appreciated! > > Thanks, Jason > > > > -- > View this message in context: > http://www.nabble.com/examples-of-Wizard-and-working-back-button-tp20805386p20805386.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jeremy Thomerson http://www.wickettraining.com
Why can't I initialize PasswordTextField?
I'm trying to implement credentials memory functionality for a login form using cookies. I know there's an official example (http://wicketstuff.org/wicket13/signin2/?x=7*:org.apache.wicket.examples.signin2.SignIn2) however it simply delegates to some panel which is not available as source on the page. So anyway, it should be simple, and all works great except that I can not get the password field to get filled out upon page load. In my constructor of my panel I do the following: Cookie credentials = ((WebRequest)getRequestCycle().getRequest()).getCookie("credentials"); remember = credentials != null; if(remember){ String[] credentialParts = credentials.getValue().split(":"); username = credentialParts[0]; password = credentialParts[1]; } The fields username and password of the panel are bound to the form using a CompoundPropertyModel. When I sniff request and response headers, I can see that indeed the cookie info is sent around fine. I guess it has to do with security somehow, but shouldn't this be possible even if I am using a PasswordTextField? Thanks in advance, Casper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why can't I initialize PasswordTextField?
May I answer your question with a question? Why would you want your password field to have the value pre-filled on the page? Then the password is in plain text available to the user (and assuming you're not on https, anyone in between). I've never seen an instance where this was a good idea. If you're trying to do an auto-login, you shouldn't show the login page at all. Pseudo code would be: if (getYourSession().isSignedIn() == false) { String token = getCookie(someCookieID); if (token not null and not empty) { User user = lookupUser(token); if (user != null) { getYourSession().signIn(user); } else { // only here would you show login page, without anything pre-filled because // they're not already signed in and they don't have a cookie to sign them in setResponsePage(YourLoginPage.class); } } } On Tue, Dec 2, 2008 at 9:26 PM, Casper Bang <[EMAIL PROTECTED]> wrote: > I'm trying to implement credentials memory functionality for a login form > using cookies. I know there's an official example ( > http://wicketstuff.org/wicket13/signin2/?x=7*:org.apache.wicket.examples.signin2.SignIn2) > however it simply delegates to some panel which is not available as source > on the page. So anyway, it should be simple, and all works great except that > I can not get the password field to get filled out upon page load. In my > constructor of my panel I do the following: > > Cookie credentials = > ((WebRequest)getRequestCycle().getRequest()).getCookie("credentials"); > remember = credentials != null; > if(remember){ > String[] credentialParts = credentials.getValue().split(":"); > username = credentialParts[0]; > password = credentialParts[1]; > } > > The fields username and password of the panel are bound to the form using a > CompoundPropertyModel. When I sniff request and response headers, I can see > that indeed the cookie info is sent around fine. I guess it has to do with > security somehow, but shouldn't this be possible even if I am using a > PasswordTextField? > > Thanks in advance, > Casper > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jeremy Thomerson http://www.wickettraining.com
Re: Why can't I initialize PasswordTextField?
On Wed, 03 Dec 2008, Casper Bang wrote: > on the page. So anyway, it should be simple, and all works great except > that I can not get the password field to get filled out upon page load. HTML just works that way, "Note that the current value is the text entered by the user, not the text rendered by the user agent." http://www.w3.org/TR/html401/interact/forms.html#h-17.4.1 you'll have to bypass the password check for autologin. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oyhttp://www.ri.fi/ > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Openid integration?
Hmm, i'll dig into it.. Thanks.. Jan Kriesten wrote: Hi Nino, I have something working only partially though, cant get email and name attribute back from the openid provider properly.. Seems to work with openid.org, but not claimid.com or myopenid.com why not using spring-security and don't have any more hassle at all? Best regards, --- Jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Switch db connection when Local <> Remote
Hello Wicket users, I test my app on local Tomcat and update it frequently on remote. They have different MySQL DB connection params. What is the easiest way to decide which params to choose depending on where Tomcat is running without editing of xml-files? I need to know it during init() of Application because I must run upgrades of db tables / data when new version of app is uploaded. Tomcat thinks it is running on "localhost" on remote server (configured as Proxy Pass). Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Switch db connection when Local <> Remote
There are a myriad of ways, but most are going to include something like: - read them from a properties file - configure them in web.xml or tomcat config It doesn't sound like you're using Spring or similar to configure your database access, but since I do, I typically use a properties file for the app that configures various server-or-deployment-specific settings, and Spring has a mechanism for interpolating those into your Spring config. I know this is off-topic, but it sounds like you are possibly doing raw JDBC? If so, I'd highly recommend NOT doing that. Hope this helps. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Dec 3, 2008 at 12:37 AM, Anton Veretennikov < [EMAIL PROTECTED]> wrote: > Hello Wicket users, > > I test my app on local Tomcat and update it frequently on remote. They > have different MySQL DB connection params. > What is the easiest way to decide which params to choose depending on > where Tomcat is running without editing of xml-files? > > I need to know it during init() of Application because I must run > upgrades of db tables / data when new version of app is uploaded. > Tomcat thinks it is running on "localhost" on remote server > (configured as Proxy Pass). > > Thank you > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Inmethod DataGrid
Yes, you were right! I looked at the sourcecode for the AbstractGrid and saw that an onclick event was added to each row item. So all I had to do was _tester.executeAjaxEvent("table:form:bodyContainer:body:row:1","onclick"); to simulate a click on row 1 Timo Rantalaiho wrote: > > On Tue, 02 Dec 2008, ulrik wrote: >> I'm using the Inmethod DataGrid in my application. >> I would like to test it's functionality with WicketTester. I have run >> into >> some problems though. How do I simulate clicking on a row in the DataGrid >> from the WicketTester? > > I'm not familiar with DataGrid, but if it has Wicket Ajax behaviours > bound to "onclick" javascript event, probably with > > wicketTester.executeAjaxEvent(wicketComponentOfRow, "onclick"); > > See the DataGrid source code to find out to which components > the ajax behaviours are bound. > > Best wishes, > Timo > > -- > Timo Rantalaiho > Reaktor Innovations Oyhttp://www.ri.fi/ > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Inmethod-DataGrid-tp20792106p20807960.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Openid integration?
Hmm Im using auth roles now.. Are there an way to integrate the two..? Another thing though, I need to either use sreg or AX to pull some values (only email and name) to my system is that possible with the spring security thing( I know this should probably go to the spring forum)? Jan Kriesten wrote: Hi Nino, I have something working only partially though, cant get email and name attribute back from the openid provider properly.. Seems to work with openid.org, but not claimid.com or myopenid.com why not using spring-security and don't have any more hassle at all? Best regards, --- Jan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]