You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rave.apache.org by Dan Gornstein <da...@gornstein.com> on 2013/08/19 17:25:00 UTC
Question on RegionWidget vs Widget
Hey everyone,
I am currently doing some work on the angular branch, specifically creating
an angular directive which will render a given RegionWidget.
I need access to the tile of the RegionWidget and started digging into rave
trunk and noticed that in the region_widget tag there was a variable
'widget' being set to the transformation of a RegionWidget to a Widget.
Both the rest and canonical models for RegionWidgets do not have the idea
of a title.
I was hoping to understand this better if someone doesn't mind explaining.
I was wondering what the reasoning behind this was, and if it will stay set
up this way, or if we will want to add these missing properties to the
canonical and rest models?
Thanks,
Dan Gornstein
Re: Question on RegionWidget vs Widget
Posted by Matt Franklin <m....@gmail.com>.
On Tue, Aug 20, 2013 at 3:28 PM, Chris Geer <ch...@cxtsoftware.com> wrote:
> On Mon, Aug 19, 2013 at 10:01 AM, Matt Franklin <m.ben.franklin@gmail.com
> >wrote:
>
> > On Mon, Aug 19, 2013 at 12:54 PM, Erin Noe-Payne
> > <er...@gmail.com>wrote:
> >
> > > Each region widget has a widget id property that references the widget
> it
> > > is an instance of.
> > >
> > > In the jsp, the region widget is rendered and the widget is retrieved -
> > its
> > > title is used on the frame.
> > >
> > > So if you want to recreate that on the client we either need to make 2
> > API
> > > calls or update the rest model (but definitely not the canonical model)
> > to
> > > have that title property.
> > >
> >
> > In the rest model, the 2 calls makes sense. From a render standpoint, we
> > should not need to retrieve anything extra from any other endpoint to
> > render. This assumes we have a render endpoint, of course.
> >
> > I just got to this thread but already added a comment to the review. I
> agree that the render method shouldn't require two calls but maybe instead
> of added fields that aren't part of the model to the model, maybe the
> render method should return a different model?
>
That makes sense.
>
> >
> >
> > >
> > > On Monday, August 19, 2013, Matt Franklin wrote:
> > >
> > > > On Mon, Aug 19, 2013 at 11:25 AM, Dan Gornstein <dan@gornstein.com
> > > <javascript:;>>
> > > > wrote:
> > > >
> > > > > Hey everyone,
> > > > >
> > > > > I am currently doing some work on the angular branch, specifically
> > > > creating
> > > > > an angular directive which will render a given RegionWidget.
> > > > >
> > > > > I need access to the tile of the RegionWidget and started digging
> > into
> > > > rave
> > > > > trunk and noticed that in the region_widget tag there was a
> variable
> > > > > 'widget' being set to the transformation of a RegionWidget to a
> > Widget.
> > > > >
> > > > > Both the rest and canonical models for RegionWidgets do not have
> the
> > > idea
> > > > > of a title.
> > > > >
> > > > > I was hoping to understand this better if someone doesn't mind
> > > > explaining.
> > > > > I was wondering what the reasoning behind this was, and if it will
> > stay
> > > > set
> > > > > up this way, or if we will want to add these missing properties to
> > the
> > > > > canonical and rest models?
> > > > >
> > > >
> > > > RegionWidgets are instances of Widgets that have been registered with
> > the
> > > > system and should only have the properties associated with that
> > instance.
> > > > For instance, if I have a widget that displays activities, I
> register
> > > that
> > > > with Rave which creates a Widget in the database. Every time someone
> > > adds
> > > > that Widget to a page, it creates a new RegionWidget to track the
> > > specific
> > > > preferences, properties, etc for that widget.
> > > >
> > > >
> > > > >
> > > > > Thanks,
> > > > > Dan Gornstein
> > > > >
> > > >
> > >
> >
>
Re: Question on RegionWidget vs Widget
Posted by Chris Geer <ch...@cxtsoftware.com>.
On Mon, Aug 19, 2013 at 10:01 AM, Matt Franklin <m....@gmail.com>wrote:
> On Mon, Aug 19, 2013 at 12:54 PM, Erin Noe-Payne
> <er...@gmail.com>wrote:
>
> > Each region widget has a widget id property that references the widget it
> > is an instance of.
> >
> > In the jsp, the region widget is rendered and the widget is retrieved -
> its
> > title is used on the frame.
> >
> > So if you want to recreate that on the client we either need to make 2
> API
> > calls or update the rest model (but definitely not the canonical model)
> to
> > have that title property.
> >
>
> In the rest model, the 2 calls makes sense. From a render standpoint, we
> should not need to retrieve anything extra from any other endpoint to
> render. This assumes we have a render endpoint, of course.
>
> I just got to this thread but already added a comment to the review. I
agree that the render method shouldn't require two calls but maybe instead
of added fields that aren't part of the model to the model, maybe the
render method should return a different model?
>
>
> >
> > On Monday, August 19, 2013, Matt Franklin wrote:
> >
> > > On Mon, Aug 19, 2013 at 11:25 AM, Dan Gornstein <dan@gornstein.com
> > <javascript:;>>
> > > wrote:
> > >
> > > > Hey everyone,
> > > >
> > > > I am currently doing some work on the angular branch, specifically
> > > creating
> > > > an angular directive which will render a given RegionWidget.
> > > >
> > > > I need access to the tile of the RegionWidget and started digging
> into
> > > rave
> > > > trunk and noticed that in the region_widget tag there was a variable
> > > > 'widget' being set to the transformation of a RegionWidget to a
> Widget.
> > > >
> > > > Both the rest and canonical models for RegionWidgets do not have the
> > idea
> > > > of a title.
> > > >
> > > > I was hoping to understand this better if someone doesn't mind
> > > explaining.
> > > > I was wondering what the reasoning behind this was, and if it will
> stay
> > > set
> > > > up this way, or if we will want to add these missing properties to
> the
> > > > canonical and rest models?
> > > >
> > >
> > > RegionWidgets are instances of Widgets that have been registered with
> the
> > > system and should only have the properties associated with that
> instance.
> > > For instance, if I have a widget that displays activities, I register
> > that
> > > with Rave which creates a Widget in the database. Every time someone
> > adds
> > > that Widget to a page, it creates a new RegionWidget to track the
> > specific
> > > preferences, properties, etc for that widget.
> > >
> > >
> > > >
> > > > Thanks,
> > > > Dan Gornstein
> > > >
> > >
> >
>
Re: Question on RegionWidget vs Widget
Posted by Matt Franklin <m....@gmail.com>.
On Mon, Aug 19, 2013 at 12:54 PM, Erin Noe-Payne
<er...@gmail.com>wrote:
> Each region widget has a widget id property that references the widget it
> is an instance of.
>
> In the jsp, the region widget is rendered and the widget is retrieved - its
> title is used on the frame.
>
> So if you want to recreate that on the client we either need to make 2 API
> calls or update the rest model (but definitely not the canonical model) to
> have that title property.
>
In the rest model, the 2 calls makes sense. From a render standpoint, we
should not need to retrieve anything extra from any other endpoint to
render. This assumes we have a render endpoint, of course.
>
> On Monday, August 19, 2013, Matt Franklin wrote:
>
> > On Mon, Aug 19, 2013 at 11:25 AM, Dan Gornstein <dan@gornstein.com
> <javascript:;>>
> > wrote:
> >
> > > Hey everyone,
> > >
> > > I am currently doing some work on the angular branch, specifically
> > creating
> > > an angular directive which will render a given RegionWidget.
> > >
> > > I need access to the tile of the RegionWidget and started digging into
> > rave
> > > trunk and noticed that in the region_widget tag there was a variable
> > > 'widget' being set to the transformation of a RegionWidget to a Widget.
> > >
> > > Both the rest and canonical models for RegionWidgets do not have the
> idea
> > > of a title.
> > >
> > > I was hoping to understand this better if someone doesn't mind
> > explaining.
> > > I was wondering what the reasoning behind this was, and if it will stay
> > set
> > > up this way, or if we will want to add these missing properties to the
> > > canonical and rest models?
> > >
> >
> > RegionWidgets are instances of Widgets that have been registered with the
> > system and should only have the properties associated with that instance.
> > For instance, if I have a widget that displays activities, I register
> that
> > with Rave which creates a Widget in the database. Every time someone
> adds
> > that Widget to a page, it creates a new RegionWidget to track the
> specific
> > preferences, properties, etc for that widget.
> >
> >
> > >
> > > Thanks,
> > > Dan Gornstein
> > >
> >
>
Re: Question on RegionWidget vs Widget
Posted by Erin Noe-Payne <er...@gmail.com>.
Each region widget has a widget id property that references the widget it
is an instance of.
In the jsp, the region widget is rendered and the widget is retrieved - its
title is used on the frame.
So if you want to recreate that on the client we either need to make 2 API
calls or update the rest model (but definitely not the canonical model) to
have that title property.
On Monday, August 19, 2013, Matt Franklin wrote:
> On Mon, Aug 19, 2013 at 11:25 AM, Dan Gornstein <dan@gornstein.com<javascript:;>>
> wrote:
>
> > Hey everyone,
> >
> > I am currently doing some work on the angular branch, specifically
> creating
> > an angular directive which will render a given RegionWidget.
> >
> > I need access to the tile of the RegionWidget and started digging into
> rave
> > trunk and noticed that in the region_widget tag there was a variable
> > 'widget' being set to the transformation of a RegionWidget to a Widget.
> >
> > Both the rest and canonical models for RegionWidgets do not have the idea
> > of a title.
> >
> > I was hoping to understand this better if someone doesn't mind
> explaining.
> > I was wondering what the reasoning behind this was, and if it will stay
> set
> > up this way, or if we will want to add these missing properties to the
> > canonical and rest models?
> >
>
> RegionWidgets are instances of Widgets that have been registered with the
> system and should only have the properties associated with that instance.
> For instance, if I have a widget that displays activities, I register that
> with Rave which creates a Widget in the database. Every time someone adds
> that Widget to a page, it creates a new RegionWidget to track the specific
> preferences, properties, etc for that widget.
>
>
> >
> > Thanks,
> > Dan Gornstein
> >
>
Re: Question on RegionWidget vs Widget
Posted by Matt Franklin <m....@gmail.com>.
On Mon, Aug 19, 2013 at 11:25 AM, Dan Gornstein <da...@gornstein.com> wrote:
> Hey everyone,
>
> I am currently doing some work on the angular branch, specifically creating
> an angular directive which will render a given RegionWidget.
>
> I need access to the tile of the RegionWidget and started digging into rave
> trunk and noticed that in the region_widget tag there was a variable
> 'widget' being set to the transformation of a RegionWidget to a Widget.
>
> Both the rest and canonical models for RegionWidgets do not have the idea
> of a title.
>
> I was hoping to understand this better if someone doesn't mind explaining.
> I was wondering what the reasoning behind this was, and if it will stay set
> up this way, or if we will want to add these missing properties to the
> canonical and rest models?
>
RegionWidgets are instances of Widgets that have been registered with the
system and should only have the properties associated with that instance.
For instance, if I have a widget that displays activities, I register that
with Rave which creates a Widget in the database. Every time someone adds
that Widget to a page, it creates a new RegionWidget to track the specific
preferences, properties, etc for that widget.
>
> Thanks,
> Dan Gornstein
>