[Wicket-user] Sending Emails Via Wicket?
I DID search in the forums, and couldn't find reference to sending emails from within the framework. I did find a post where someone mentioned writing there own class for doing this. Does that mean there isn't any built-in classes that handle sending of emails from within Wicket? If not, can someone provide a solution or example of how I might accomplish this? I am a newbie to Wicket, and even a little to Java in general, so any help or reference points would be very much appreciated. Specifically, I need to send an email from within Wicket, where the email contains some dynamic data I would insert before sending. Thanks! -- View this message in context: http://www.nabble.com/Sending-Emails-Via-Wicket--tf3639601.html#a10164083 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Sending Emails Via Wicket?
I understand. I'm using the wicket-contrib-velocity package for some page generation, but I am unsure how I would generate a template /just/ for an email. Would you have an example of that? Or be able to point me to a tutorial, etc.? Much appreciated. Eelco Hillenius wrote: For the actual sending, you need to use Java's normal mail API (http://java.sun.com/products/javamail/) or e.g. Spring's mail module. If you want to create emails based on templates with some variable substibution, I'd recommend you use e.g. Velocity for that. Eelco I DID search in the forums, and couldn't find reference to sending emails from within the framework. I did find a post where someone mentioned writing there own class for doing this. Does that mean there isn't any built-in classes that handle sending of emails from within Wicket? If not, can someone provide a solution or example of how I might accomplish this? I am a newbie to Wicket, and even a little to Java in general, so any help or reference points would be very much appreciated. Specifically, I need to send an email from within Wicket, where the email contains some dynamic data I would insert before sending. Thanks! -- View this message in context: http://www.nabble.com/Sending-Emails-Via-Wicket--tf3639601.html#a10164083 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- View this message in context: http://www.nabble.com/Sending-Emails-Via-Wicket--tf3639601.html#a10164511 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Strange Popup Behavior After Logout/Session.invalidate()
So... someone comes to my app and logs in. The get a page which includes a popup link to AppPage. The link is constructed like so In StartPage.java: PopupSettings popupSettings = new PopupSettings(PageMap.forName(popuppagemap)); add(new BookmarkablePageLink(app-page, AppPage.class).setPopupSettings(popupSettings)); The AppPage class is a page which is also behind authentication. Normally, if you go to its bookmarked URL without having logged in, you get my login page, login, and then are redirected to the AppPage. This is all handled by the built-in wicket authentication scheme. I'm not doing anything fancy. In the scenario described above, when the popup opens, you aren't asked to login because you already logged in on the parent page. So far so good. The parent page also contains a link to logout. Clicking this link gets you the SignOutPage which does this: In SignOutPage.java: protected void onEndRequest() { AuthenticatedWebSession awSession = (AuthenticatedWebSession) getSession(); awSession.invalidate(); try { getWebRequestCycle().getWebResponse().getHttpServletResponse().sendRedirect(app); } catch (Exception e) { e.printStackTrace(); } } You are logged out and brought back to the home page (this is all in the parent window). Still Ok. Here is the bad part... If I reload/refresh the pop-up window (which is still open, and still showing the AppPage - we haven't done anything in this window), I correctly get the login page (because I have logged out), but when I submit the login form I am brought the home page, not the AppPage! The reload/refresh makes the identical request as if I tried to go straight to the AppPage (which normally lets me login and present the AppPage) - but in this scenario , with the pop-up, and after a log out from the parent, it does not work. I am at my wits end, so any help or advice, or suggestions would be much appreciated. Please let me know if I can provide more code to help. Thanks -- View this message in context: http://www.nabble.com/Strange-Popup-Behavior-After-Logout-Session.invalidate%28%29-tf3620694.html#a10110484 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strange Popup Behavior After Logout/Session.invalidate()
This doesn't really help me, but it might help someone to help me When I logout in the parent window, and end up on the login screen, the URL I am at ends with /app?wicket:bookmarkablePage=:com.it.ediscovery.client.authentication.AdminSignInPage while the URL I end up with in the pop-up once I refresh is /app?wicket:bookmarkablePage=wicket-0:com.it.ediscovery.client.authentication.AdminSignInPage (notice the pagemap addition) Perhaps this has something to do with it? fattymelt wrote: So... someone comes to my app and logs in. The get a page which includes a popup link to AppPage. The link is constructed like so: In StartPage.java: PopupSettings popupSettings = new PopupSettings(PageMap.forName(popuppagemap)); add(new BookmarkablePageLink(app-page, AppPage.class).setPopupSettings(popupSettings)); The AppPage class is a page which is also behind authentication. Normally, if you go to its bookmarked URL without having logged in, you get my login page, login, and then are redirected to the AppPage. This is all handled by the built-in wicket authentication scheme. I'm not doing anything fancy. In the scenario described above, when the popup opens, you aren't asked to login because you already logged in on the parent page. So far so good. The parent page also contains a link to logout. Clicking this link gets you the SignOutPage which does this: In SignOutPage.java: protected void onEndRequest() { AuthenticatedWebSession awSession = (AuthenticatedWebSession) getSession(); awSession.invalidate(); try { getWebRequestCycle().getWebResponse().getHttpServletResponse().sendRedirect(app); } catch (Exception e) { e.printStackTrace(); } } You are logged out and brought back to the home page (this is all in the parent window). Still Ok. Here is the bad part... If I reload/refresh the pop-up window (which is still open, and still showing the AppPage - we haven't done anything in this window), I correctly get the login page (because I have logged out), but when I submit the login form I am brought the home page, not the AppPage! The reload/refresh makes the identical request as if I tried to go straight to the AppPage (which normally lets me login and present the AppPage) - but in this scenario , with the pop-up, and after a log out from the parent, it does not work. I am at my wits end, so any help or advice, or suggestions would be much appreciated. Please let me know if I can provide more code to help. Thanks -- View this message in context: http://www.nabble.com/Strange-Popup-Behavior-After-Logout-Session.invalidate%28%29-tf3620694.html#a10110733 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] VelocityPanel Example
I know there are posts suggesting links to the wicket-contrib-examples cdApp example, but it does not use the VelocityPanel as far as I can tell. Does anyone know if there is an actual example of the VelocityPanel package up somewhere? -- View this message in context: http://www.nabble.com/VelocityPanel-Example-tf3602804.html#a10064844 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] VelocityPanel Error
I'm running the velocity panel example and getting this error. Anyone familiar with this? java.lang.NoSuchMethodError: wicket.contrib.markup.html.velocity.VelocityPanel.replaceComponentTagBody(Lwicket/markup/MarkupStream;Lwicket/markup/ComponentTag;Ljava/lang/String;)V at wicket.contrib.markup.html.velocity.VelocityPanel.onComponentTagBody(VelocityPanel.java:180) at wicket.Component.renderComponent(Component.java:1712) at wicket.markup.html.WebComponent.onRender(WebComponent.java:61) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917) at wicket.Component.renderComponent(Component.java:1712) at wicket.MarkupContainer.onRender(MarkupContainer.java:927) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderAll(MarkupContainer.java:944) at wicket.Page.onRender(Page.java:864) at wicket.Component.render(Component.java:1526) at wicket.Page.renderPage(Page.java:413) at wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:226) at wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66) at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:902) at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:929) at wicket.RequestCycle.step(RequestCycle.java:1010) at wicket.RequestCycle.steps(RequestCycle.java:1084) at wicket.RequestCycle.request(RequestCycle.java:454) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219) at javax.servlet.http.HttpServlet.service(HttpServlet.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:92) at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:178) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268) at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389) at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:492) at com.caucho.util.ThreadPool.run(ThreadPool.java:425) at java.lang.Thread.run(Thread.java:613) -- View this message in context: http://www.nabble.com/VelocityPanel-Error-tf3603232.html#a10066440 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] VelocityPanel Error
USER ERROR! I must have had an old build. I build from the latest and things are working fine. sorry. fattymelt wrote: I'm running the velocity panel example and getting this error. Anyone familiar with this? java.lang.NoSuchMethodError: wicket.contrib.markup.html.velocity.VelocityPanel.replaceComponentTagBody(Lwicket/markup/MarkupStream;Lwicket/markup/ComponentTag;Ljava/lang/String;)V at wicket.contrib.markup.html.velocity.VelocityPanel.onComponentTagBody(VelocityPanel.java:180) at wicket.Component.renderComponent(Component.java:1712) at wicket.markup.html.WebComponent.onRender(WebComponent.java:61) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:982) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:917) at wicket.Component.renderComponent(Component.java:1712) at wicket.MarkupContainer.onRender(MarkupContainer.java:927) at wicket.Component.render(Component.java:1526) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1334) at wicket.MarkupContainer.renderAll(MarkupContainer.java:944) at wicket.Page.onRender(Page.java:864) at wicket.Component.render(Component.java:1526) at wicket.Page.renderPage(Page.java:413) at wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:226) at wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66) at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:902) at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:929) at wicket.RequestCycle.step(RequestCycle.java:1010) at wicket.RequestCycle.steps(RequestCycle.java:1084) at wicket.RequestCycle.request(RequestCycle.java:454) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219) at javax.servlet.http.HttpServlet.service(HttpServlet.java:115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:92) at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:178) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268) at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389) at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:492) at com.caucho.util.ThreadPool.run(ThreadPool.java:425) at java.lang.Thread.run(Thread.java:613) -- View this message in context: http://www.nabble.com/VelocityPanel-Error-tf3603232.html#a10066452 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user