You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rave.apache.org by mf...@apache.org on 2012/05/03 18:31:07 UTC
Re: Review Request: Refactor common navbar into header.tag
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4930/#review7504
-----------------------------------------------------------
Thanks a lot for the patch. I have a couple of comments, but I like where this is headed. One big blocker is that I am getting an error when running the following unit test:
Tests in error:
viewPerson_ShouldAddAttributeForUser(org.apache.rave.portal.web.controller.ProfileControllerTest)
/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java
<https://reviews.apache.org/r/4930/#comment16608>
Just a note, we will want to make this more dynamic in the future. Can you put a ticket in JIRA to expand on this concept? I don't think it should prevent application of this patch, but we need to make sure we track it.
/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java
<https://reviews.apache.org/r/4930/#comment16609>
Why starts with instead of equals?
/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java
<https://reviews.apache.org/r/4930/#comment16610>
You might just want to make the default URL / instead of /index.html.
/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java
<https://reviews.apache.org/r/4930/#comment16611>
seems like there is duplication of the same logic. consider abstracting into a private helper.
/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationItem.java
<https://reviews.apache.org/r/4930/#comment16612>
Please add JavaDoc for the new attribute
/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/header.tag
<https://reviews.apache.org/r/4930/#comment16613>
We need to define a better way of trimming navigation items based on security. Maybe associate specific nav items with roles.
Since URL testing was the model we were using before, I am OK with applying this so long as a ticket is created to update the NavigationItem & corresponding checks here to use roles or other permission structures.
- mfranklin
On 2012-04-29 22:36:46, Chris Geer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4930/
> -----------------------------------------------------------
>
> (Updated 2012-04-29 22:36:46)
>
>
> Review request for rave.
>
>
> Summary
> -------
>
> Refactored the common navbar components to the header.tag file and included that in all relevant jsp files (except mobile). I also expanded the NavigationItem code to handle parameters for the navigation item text. Moved menu generation code to the ControllerUtils class. This should eventually be loaded from a DB per ticket RAVE-589
>
>
> This addresses bug RAVE-586.
> https://issues.apache.org/jira/browse/RAVE-586
>
>
> Diffs
> -----
>
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/PageController.java 1331506
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/ProfileController.java 1331506
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/WidgetStoreController.java 1331506
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/admin/AdminControllerUtil.java 1331506
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java 1331506
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationItem.java 1331506
> /trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationItemTest.java 1331506
> /trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationMenuTest.java 1331506
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/addwidget.jsp 1331506
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp 1331506
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp 1331506
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/store.jsp 1331506
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp 1331506
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/header.tag 1331506
>
> Diff: https://reviews.apache.org/r/4930/diff
>
>
> Testing
> -------
>
> Went through all screens to verify items showed as expected and had the correct links.
>
>
> Thanks,
>
> Chris
>
>
Re: Review Request: Refactor common navbar into header.tag
Posted by Chris Geer <ch...@cxtsoftware.com>.
> On 2012-05-03 16:31:07, mfranklin wrote:
> > Thanks a lot for the patch. I have a couple of comments, but I like where this is headed. One big blocker is that I am getting an error when running the following unit test:
> >
> > Tests in error:
> > viewPerson_ShouldAddAttributeForUser(org.apache.rave.portal.web.controller.ProfileControllerTest)
> >
Fixed
> On 2012-05-03 16:31:07, mfranklin wrote:
> > /trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/header.tag, line 40
> > <https://reviews.apache.org/r/4930/diff/2/?file=105471#file105471line40>
> >
> > We need to define a better way of trimming navigation items based on security. Maybe associate specific nav items with roles.
> >
> > Since URL testing was the model we were using before, I am OK with applying this so long as a ticket is created to update the NavigationItem & corresponding checks here to use roles or other permission structures.
I agree, I'd prefer to keep that for the future because that will affect more than just this piece.
> On 2012-05-03 16:31:07, mfranklin wrote:
> > /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java, line 68
> > <https://reviews.apache.org/r/4930/diff/2/?file=105462#file105462line68>
> >
> > Just a note, we will want to make this more dynamic in the future. Can you put a ticket in JIRA to expand on this concept? I don't think it should prevent application of this patch, but we need to make sure we track it.
I'm assuming you mean it can't be hardcoded? I agree completely and I created that ticket at the same time when I did this patch. RAVE-589
> On 2012-05-03 16:31:07, mfranklin wrote:
> > /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java, line 71
> > <https://reviews.apache.org/r/4930/diff/2/?file=105462#file105462line71>
> >
> > Why starts with instead of equals?
This was because the view name actually turns out to be something like template.user.page.layoutXXX so the last part is dynamic.
> On 2012-05-03 16:31:07, mfranklin wrote:
> > /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java, line 104
> > <https://reviews.apache.org/r/4930/diff/2/?file=105462#file105462line104>
> >
> > seems like there is duplication of the same logic. consider abstracting into a private helper.
Fixed
> On 2012-05-03 16:31:07, mfranklin wrote:
> > /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java, line 92
> > <https://reviews.apache.org/r/4930/diff/2/?file=105462#file105462line92>
> >
> > You might just want to make the default URL / instead of /index.html.
Fixed
> On 2012-05-03 16:31:07, mfranklin wrote:
> > /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationItem.java, line 67
> > <https://reviews.apache.org/r/4930/diff/2/?file=105463#file105463line67>
> >
> > Please add JavaDoc for the new attribute
Fixed
- Chris
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4930/#review7504
-----------------------------------------------------------
On 2012-04-29 22:36:46, Chris Geer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4930/
> -----------------------------------------------------------
>
> (Updated 2012-04-29 22:36:46)
>
>
> Review request for rave.
>
>
> Summary
> -------
>
> Refactored the common navbar components to the header.tag file and included that in all relevant jsp files (except mobile). I also expanded the NavigationItem code to handle parameters for the navigation item text. Moved menu generation code to the ControllerUtils class. This should eventually be loaded from a DB per ticket RAVE-589
>
>
> This addresses bug RAVE-586.
> https://issues.apache.org/jira/browse/RAVE-586
>
>
> Diffs
> -----
>
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/PageController.java 1331506
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/ProfileController.java 1331506
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/WidgetStoreController.java 1331506
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/admin/AdminControllerUtil.java 1331506
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java 1331506
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationItem.java 1331506
> /trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationItemTest.java 1331506
> /trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationMenuTest.java 1331506
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/addwidget.jsp 1331506
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp 1331506
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp 1331506
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/store.jsp 1331506
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp 1331506
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/header.tag 1331506
>
> Diff: https://reviews.apache.org/r/4930/diff
>
>
> Testing
> -------
>
> Went through all screens to verify items showed as expected and had the correct links.
>
>
> Thanks,
>
> Chris
>
>
Re: Review Request: Refactor common navbar into header.tag
Posted by mf...@apache.org.
> On 2012-05-03 16:31:07, mfranklin wrote:
> > /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java, line 68
> > <https://reviews.apache.org/r/4930/diff/2/?file=105462#file105462line68>
> >
> > Just a note, we will want to make this more dynamic in the future. Can you put a ticket in JIRA to expand on this concept? I don't think it should prevent application of this patch, but we need to make sure we track it.
>
> Chris Geer wrote:
> I'm assuming you mean it can't be hardcoded? I agree completely and I created that ticket at the same time when I did this patch. RAVE-589
Great. Didn't see that ticket before
> On 2012-05-03 16:31:07, mfranklin wrote:
> > /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java, line 71
> > <https://reviews.apache.org/r/4930/diff/2/?file=105462#file105462line71>
> >
> > Why starts with instead of equals?
>
> Chris Geer wrote:
> This was because the view name actually turns out to be something like template.user.page.layoutXXX so the last part is dynamic.
Ahh, forgot someone added that bit.
- mfranklin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4930/#review7504
-----------------------------------------------------------
On 2012-05-03 17:40:45, Chris Geer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4930/
> -----------------------------------------------------------
>
> (Updated 2012-05-03 17:40:45)
>
>
> Review request for rave.
>
>
> Summary
> -------
>
> Refactored the common navbar components to the header.tag file and included that in all relevant jsp files (except mobile). I also expanded the NavigationItem code to handle parameters for the navigation item text. Moved menu generation code to the ControllerUtils class. This should eventually be loaded from a DB per ticket RAVE-589
>
>
> This addresses bug RAVE-586.
> https://issues.apache.org/jira/browse/RAVE-586
>
>
> Diffs
> -----
>
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/PageController.java 1333570
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/ProfileController.java 1333570
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/WidgetStoreController.java 1333570
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/admin/AdminControllerUtil.java 1333570
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/util/ControllerUtils.java 1333570
> /trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationItem.java 1333570
> /trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/ProfileControllerTest.java 1333570
> /trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationItemTest.java 1333570
> /trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationMenuTest.java 1333570
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/addwidget.jsp 1333570
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp 1333570
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp 1333570
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/store.jsp 1333570
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp 1333570
> /trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/header.tag 1333570
>
> Diff: https://reviews.apache.org/r/4930/diff
>
>
> Testing
> -------
>
> Went through all screens to verify items showed as expected and had the correct links.
>
>
> Thanks,
>
> Chris
>
>