Re: [uportal-dev] Spring PortletMVC
I just realized that the Second Edition of "Spring in Action" by Craig Walls was released recently. I personally find this to be an OUTSTANDING book on the Spring Framework. For some reason, he (or manning) decided to not put the chapter on portlets in the book and instead included it as a "Web Extra" (I think it should have been included in my opinion). Anyway, its available here: http://www.manning.com/walls3/ by clicking the "Web Extras" link, or directly http://www.manning.com/walls3/WebXtras.pdf I haven't read the whole thing yet but so far its doing an awesome job of explaining the Spring Portlet MVC and I HIGHLY suggest anyone interested in Spring Portlet MVC development should read it. On 9/7/07, Cris J Holdorph <[EMAIL PROTECTED]> wrote: > > The simplest way to do this is to set the "EDIT" mode on the portlet url > , that you use for the target of the form. So, if edit mode has a form > to fill in certain settings, you need a portlet action url to be the > target for the html form. on that portlet action url, simply have the > portlet mode set to 'VIEW', then when th user submits the form, after > the Action processing is done they will go to the VIEW mode for render. > > It's also possible to "set" the portlet mode to view programatically in > the action processing. There might be good reasons to do it either way. > I just view doing it in the PortletURL as less code to write. > > Cris J H > > Jennifer Bourey wrote: > > How do you handle sending the portlet back to view mode? Does this > > happen automatically, or are you manually setting the mode? > > > > Thanks! > > > > - Jen > > > > > > On Sep 7, 2007, at 11:50 AM, Parker Grimes wrote: > > > >> Here are some screenshots of one of our portlets. One in "view" mode > >> and the other in "edit" mode. When you click "Save" or "Cancel" in > >> edit mode it returns you to view mode. > >> > >> -Parker > >> > > > > > > - > > Jennifer Bourey > > Technology and Planning > > Yale University ITS > > 203.432.5718 > > > > > > > > > > -- > > You are currently subscribed to uportal-dev@lists.ja-sig.org as: > [EMAIL PROTECTED] > > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/uportal-dev > > > > -- > You are currently subscribed to uportal-dev@lists.ja-sig.org as: > [EMAIL PROTECTED] > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/uportal-dev > -- You are currently subscribed to uportal-dev@lists.ja-sig.org as: [EMAIL PROTECTED] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev
Re: [uportal-dev] Spring PortletMVC
The simplest way to do this is to set the "EDIT" mode on the portlet url , that you use for the target of the form. So, if edit mode has a form to fill in certain settings, you need a portlet action url to be the target for the html form. on that portlet action url, simply have the portlet mode set to 'VIEW', then when th user submits the form, after the Action processing is done they will go to the VIEW mode for render. It's also possible to "set" the portlet mode to view programatically in the action processing. There might be good reasons to do it either way. I just view doing it in the PortletURL as less code to write. Cris J H Jennifer Bourey wrote: How do you handle sending the portlet back to view mode? Does this happen automatically, or are you manually setting the mode? Thanks! - Jen On Sep 7, 2007, at 11:50 AM, Parker Grimes wrote: Here are some screenshots of one of our portlets. One in "view" mode and the other in "edit" mode. When you click "Save" or "Cancel" in edit mode it returns you to view mode. -Parker - Jennifer Bourey Technology and Planning Yale University ITS 203.432.5718 -- You are currently subscribed to uportal-dev@lists.ja-sig.org as: [EMAIL PROTECTED] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev -- You are currently subscribed to uportal-dev@lists.ja-sig.org as: [EMAIL PROTECTED] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev
Re: [uportal-dev] Spring PortletMVC
Ack. OK, so it looks like I'm actually doing everything right, but I'm bumping up against the weird portlet problems Parker started a thread about a couple days ago (http://www.nabble.com/Spring-Portlet- MVC---uPortal-Error-t4251226.html). I'm glad I haven't misinterpreted how spring portletmvc works, but the unreliable behavior is a little concerning. I'm seeing both the ""Could not obtain command object from portlet session" and blank view problems mentioned in the thread, although I can't consistently trigger either one. - Jen On Sep 7, 2007, at 1:32 PM, Dustin S. wrote: > Jen, > > We set the mode in the onSubmitAction method: > > protected void onSubmitAction(ActionRequest request, > ActionResponse response, Object command, BindException > bind) > throws Exception { > //Logic here to save preferences or whatever. > response.setPortletMode(PortletMode.VIEW); > } > > On 9/7/07, Jennifer Bourey <[EMAIL PROTECTED]> wrote: > How do you handle sending the portlet back to view mode? Does this > happen automatically, or are you manually setting the mode? > > Thanks! > > - Jen > > > On Sep 7, 2007, at 11:50 AM, Parker Grimes wrote: > >> Here are some screenshots of one of our portlets. One in "view" >> mode and the other in "edit" mode. When you click "Save" or >> "Cancel" in edit mode it returns you to view mode. >> >> -Parker >> > > > - > Jennifer Bourey > Technology and Planning > Yale University ITS > 203.432.5718 > > > > > -- > You are currently subscribed to uportal-dev@lists.ja-sig.org as: > [EMAIL PROTECTED] > To unsubscribe, change settings or access archives, see http:// > www.ja-sig.org/wiki/display/JSG/uportal-dev > > -- > You are currently subscribed to uportal-dev@lists.ja-sig.org as: > [EMAIL PROTECTED] > To unsubscribe, change settings or access archives, see http:// > www.ja-sig.org/wiki/display/JSG/uportal-dev - Jennifer Bourey Technology and Planning Yale University ITS 203.432.5718 -- You are currently subscribed to uportal-dev@lists.ja-sig.org as: [EMAIL PROTECTED] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev
Re: [uportal-dev] Spring PortletMVC
You can also do ">Return to View or "> in the JSP page. On 9/7/07, Dustin S. <[EMAIL PROTECTED]> wrote: > > Jen, > > We set the mode in the onSubmitAction method: > > protected void onSubmitAction(ActionRequest request, > ActionResponse response, Object command, BindException bind) > throws Exception { > //Logic here to save preferences or whatever. > response.setPortletMode(PortletMode.VIEW); > } > > On 9/7/07, Jennifer Bourey <[EMAIL PROTECTED]> wrote: > > > > How do you handle sending the portlet back to view mode? Does this > > happen automatically, or are you manually setting the mode? > > > > Thanks! > > > > - Jen > > > > > > On Sep 7, 2007, at 11:50 AM, Parker Grimes wrote: > > > > Here are some screenshots of one of our portlets. One in "view" mode and > > the other in "edit" mode. When you click "Save" or "Cancel" in edit mode it > > returns you to view mode. > > > > -Parker > > > > > > > > - > > Jennifer Bourey > > Technology and Planning > > Yale University ITS > > 203.432.5718 > > > > > > > > > > -- > > You are currently subscribed to uportal-dev@lists.ja-sig.org as: > > [EMAIL PROTECTED] > > To unsubscribe, change settings or access archives, see > > http://www.ja-sig.org/wiki/display/JSG/uportal-dev > > > > > -- You are currently subscribed to uportal-dev@lists.ja-sig.org as: [EMAIL PROTECTED] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev
Re: [uportal-dev] Spring PortletMVC
Jen, We set the mode in the onSubmitAction method: protected void onSubmitAction(ActionRequest request, ActionResponse response, Object command, BindException bind) throws Exception { //Logic here to save preferences or whatever. response.setPortletMode(PortletMode.VIEW); } On 9/7/07, Jennifer Bourey <[EMAIL PROTECTED]> wrote: > > How do you handle sending the portlet back to view mode? Does this happen > automatically, or are you manually setting the mode? > > Thanks! > > - Jen > > > On Sep 7, 2007, at 11:50 AM, Parker Grimes wrote: > > Here are some screenshots of one of our portlets. One in "view" mode and > the other in "edit" mode. When you click "Save" or "Cancel" in edit mode it > returns you to view mode. > > -Parker > > > > - > Jennifer Bourey > Technology and Planning > Yale University ITS > 203.432.5718 > > > > > -- > You are currently subscribed to uportal-dev@lists.ja-sig.org as: [EMAIL > PROTECTED] > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/uportal-dev > > -- You are currently subscribed to uportal-dev@lists.ja-sig.org as: [EMAIL PROTECTED] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev
Re: [uportal-dev] Spring PortletMVC
How do you handle sending the portlet back to view mode? Does this happen automatically, or are you manually setting the mode? Thanks! - Jen On Sep 7, 2007, at 11:50 AM, Parker Grimes wrote: > Here are some screenshots of one of our portlets. One in "view" > mode and the other in "edit" mode. When you click "Save" or > "Cancel" in edit mode it returns you to view mode. > > -Parker > - Jennifer Bourey Technology and Planning Yale University ITS 203.432.5718 -- You are currently subscribed to uportal-dev@lists.ja-sig.org as: [EMAIL PROTECTED] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev
Re: [uportal-dev] Spring PortletMVC
Here are some screenshots of one of our portlets. One in "view" mode and the other in "edit" mode. When you click "Save" or "Cancel" in edit mode it returns you to view mode. -Parker On 9/7/07, Parker Grimes <[EMAIL PROTECTED]> wrote: > > Jen, > > We have written a several portlets using Spring portlet MVC utilizing the > portlet edit mode. It is pretty simple to do, just use the > PortletModeHandlerMapping for "view" and "edit" modes. > > Here is a snippet from our weather.xml Spring config file: > > > > > > > bean="weatherViewController"/> > bean="weatherEditController"/> > > > > > Let me know if you would like more detail. > > Parker > Programmer / Systems Analyst > Southern Utah University > > On 9/7/07, Jennifer Bourey <[EMAIL PROTECTED] > wrote: > > > > Hi all, > > I was wondering if anyone had some good examples of portlets that use > > Spring portletMVC in conjunction with edit mode. It seems like a lot of the > > spring portlets I've seen bypass the built-in uportal edit button in favor > > of a configuration link produced by the portlet itself. I guess I'm > > specifically looking to be able to use the uportal channel/portlet edit > > button to enter edit mode, then have the code automatically set the portlet > > back to normal mode after a successful preferences update. > > > > - Jen > > > > > > - > > Jennifer Bourey > > Technology and Planning > > Yale University ITS > > 203.432.5718 > > > > > > > > > > -- > > You are currently subscribed to uportal-dev@lists.ja-sig.org as: > > [EMAIL PROTECTED] > > To unsubscribe, change settings or access archives, see > > http://www.ja-sig.org/wiki/display/JSG/uportal-dev > > > > > -- You are currently subscribed to uportal-dev@lists.ja-sig.org as: [EMAIL PROTECTED] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev<><>
Re: [uportal-dev] Spring PortletMVC
Jen, We have written a several portlets using Spring portlet MVC utilizing the portlet edit mode. It is pretty simple to do, just use the PortletModeHandlerMapping for "view" and "edit" modes. Here is a snippet from our weather.xml Spring config file: Let me know if you would like more detail. Parker Programmer / Systems Analyst Southern Utah University On 9/7/07, Jennifer Bourey <[EMAIL PROTECTED]> wrote: > > Hi all, > I was wondering if anyone had some good examples of portlets that use > Spring portletMVC in conjunction with edit mode. It seems like a lot of the > spring portlets I've seen bypass the built-in uportal edit button in favor > of a configuration link produced by the portlet itself. I guess I'm > specifically looking to be able to use the uportal channel/portlet edit > button to enter edit mode, then have the code automatically set the portlet > back to normal mode after a successful preferences update. > > - Jen > > > - > Jennifer Bourey > Technology and Planning > Yale University ITS > 203.432.5718 > > > > > -- > You are currently subscribed to uportal-dev@lists.ja-sig.org as: [EMAIL > PROTECTED] > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/uportal-dev > > -- You are currently subscribed to uportal-dev@lists.ja-sig.org as: [EMAIL PROTECTED] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev
[uportal-dev] Spring PortletMVC
Hi all, I was wondering if anyone had some good examples of portlets that use Spring portletMVC in conjunction with edit mode. It seems like a lot of the spring portlets I've seen bypass the built-in uportal edit button in favor of a configuration link produced by the portlet itself. I guess I'm specifically looking to be able to use the uportal channel/portlet edit button to enter edit mode, then have the code automatically set the portlet back to normal mode after a successful preferences update. - Jen - Jennifer Bourey Technology and Planning Yale University ITS 203.432.5718 -- You are currently subscribed to uportal-dev@lists.ja-sig.org as: [EMAIL PROTECTED] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev