[ 
https://issues.apache.org/jira/browse/RAVE-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13750229#comment-13750229
 ] 

Chris Geer commented on RAVE-1047:
----------------------------------

Ok, I know I probably sound like a broken record, but I'm not a fan of 
continuing to structure the data model this way, especially on the REST side. 
If I'm creating a RegionWidget at this URL POST /<pageid>/<regionid>/ why 
should my RegionWidget have to have the pageid and regionid as attributes? 
Also, that just opens up room for error by using this url /1/1 but having a 
RegionWidget with pageid of 2 and regionid of 4. 

If an object is a child object (which RegionWidget is), I don't believe the 
child object should have a reference to it's parent in the model, that should 
be inferred by what parent object it came from. I know the backend data model 
is this way however I think it needs to change there also. 

I realize the underlying desire here is to be able to move a RegionWidget 
between regions/pages but I don't think this is the right way. One alternative 
would be to simply allow the RegionWidget to be posted to another page/region, 
then we could make the backend smart enough to see if that RegionWidget already 
exists and update it's reference in the backend. Probably requires a bit more 
thought but it's an idea.
                
> RegionWidget model should have a pageId field
> ---------------------------------------------
>
>                 Key: RAVE-1047
>                 URL: https://issues.apache.org/jira/browse/RAVE-1047
>             Project: Rave
>          Issue Type: Improvement
>            Reporter: Erin Noe-Payne
>             Fix For: 0.23
>
>
> A regionWidget is uniquely defined by its page, region and widget id's. The 
> regionWidget model should have a reference to make operations involving 
> moving or deleting on the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to