[Cernunnos] CernunnosPortlet and Edit mode

4 views
Skip to first unread message

argherna

unread,
May 21, 2010, 10:27:14 AM5/21/10
to Cernunnos Discussion
I've seen in the code for CernunnosPortlet that the doEdit method
delegates to doView. For uPortal, does that mean if I say in a
channel definition that Edit mode is supported that when the edit link
is clicked in the portlet chrome it will simply take me back to the
view that doView renders?

--
You received this message because you are subscribed to the Google Groups "Cernunnos Discussion" group.
To post to this group, send email to cernunnos-...@googlegroups.com.
To unsubscribe from this group, send email to cernunnos-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cernunnos-discussion?hl=en.

Andrew Wills

unread,
May 21, 2010, 11:25:29 AM5/21/10
to cernunnos-...@googlegroups.com
Andy,

Yep, that's exactly right. Of course you can take advantage of
anything that doView() does, even passing a 'view' parameter (in the
action/render URL) and thereby changing the view as you enter EDIT
mode.

But that assumes you're hand-rolling the PortletURL that takes you
into EDIT mode, and that won't be the case when you enable EDIT at
publish time, then click on Edit in the chrome.

Perhaps what we need here are a couple new entries on Settings.java:

- DEFAULT_EDIT_VIEW
- DEFAULT_HELP_VIEW

These could be nullable, and null by default. But when they're not
null, the doEdit() and doHelp() methods would take you there first
upon entering those modes, respectively.

If unspecified -- left as null -- then the portlet could do what it
has always done. This bit would ensure that any code that's actually
relying on the deEdit() --> doView() behavior won't break.

drew wills

argherna

unread,
May 24, 2010, 2:34:52 PM5/24/10
to Cernunnos Discussion
I have a rough patch here: http://code.google.com/p/cernunnos/issues/detail?id=99
along with a description of how it works. I've tested this for Edit
mode and now when I click the Edit link in the portlet chrome for
uPortal, it works.

The patch also has a solution for doHelp. Let me know what you think.


On May 21, 10:25 am, Andrew Wills <wills.d...@gmail.com> wrote:
> Andy,
>
> Yep, that's exactly right.  Of course you can take advantage of
> anything that doView() does, even passing a 'view' parameter (in the
> action/render URL) and thereby changing the view as you enter EDIT
> mode.
>
> But that assumes you're hand-rolling the PortletURL that takes you
> into EDIT mode, and that won't be the case when you enable EDIT at
> publish time, then click on Edit in the chrome.
>
> Perhaps what we need here are a couple new entries on Settings.java:
>
>   - DEFAULT_EDIT_VIEW
>   - DEFAULT_HELP_VIEW
>
> These could be nullable, and null by default.  But when they're not
> null, the doEdit() and doHelp() methods would take you there first
> upon entering those modes, respectively.
>
> If unspecified -- left as null -- then the portlet could do what it
> has always done.  This bit would ensure that any code that's actually
> relying on the deEdit() --> doView() behavior won't break.
>
> drew wills
>
> On Fri, May 21, 2010 at 7:27 AM, argherna <arghe...@gmail.com> wrote:
> > I've seen in the code for CernunnosPortlet that the doEdit method
> > delegates to doView.  For uPortal, does that mean if I say in a
> > channel definition that Edit mode is supported that when the edit link
> > is clicked in the portlet chrome it will simply take me back to the
> > view that doView renders?
>
> > --
> > You received this message because you are subscribed to the Google Groups "Cernunnos Discussion" group.
> > To post to this group, send email to cernunnos-...@googlegroups.com.
> > To unsubscribe from this group, send email to cernunnos-discus...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/cernunnos-discussion?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "Cernunnos Discussion" group.
> To post to this group, send email to cernunnos-...@googlegroups.com.
> To unsubscribe from this group, send email to cernunnos-discus...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/cernunnos-discussion?hl=en.
Reply all
Reply to author
Forward
0 new messages