Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UP-4065: Portlet Manager -- Detect config/edit/help/about mode support ... #323

Merged
merged 2 commits into from May 16, 2014

Conversation

@drewwills
Copy link
Member

drewwills commented May 15, 2014

...as defined in portlet.xml for portlets published with CPDs

…t as defined in portlet.xml for portlets published with CPDs
@@ -41,16 +41,15 @@
value="personManager.getPerson(servletRequest)"/>
<set name="flowScope.portletTypes"
value="portletAdministrationHelper.getAllowableChannelPublishingDefinitions(person)"/>
<set name="flowScope.completed"
value="portlet.id != null and portlet.id != '-1'"/>
<set name="flowScope.completed" value="!portlet.isNew()"/>

This comment has been minimized.

Copy link
@apetro

apetro May 15, 2014

Member

❤️ the moving logic about detecting new-ness to the form object rather than programming inline in the web flow definition.

<!-- BASIC INFO view (title, fname, etc.) -->
<view-state id="basicInfo" model="portlet">
<on-entry>
<evaluate expression="portletAdministrationHelper.prepopulatePortletIfNew(portlet)"/>

This comment has been minimized.

Copy link
@apetro

apetro May 15, 2014

Member

Would it be clearer to predicate this call on the new-ness of the portlet, rather than relying on the prepopulatePortlet...() method to condition its behavior on new-ness?

This comment has been minimized.

Copy link
@drewwills

drewwills May 15, 2014

Author Member

I think it would be -- that was my original desire. I don't know SWF as well as maybe I could, but my research suggested that making this call conditionally would involve adding a <decision-state>, which I felt was a noisy solution.

This comment has been minimized.

Copy link
@apetro

apetro May 15, 2014

Member

Maybe? Maybe branching the flow depending on whether the portlet is new or existing would be a healthy way to represent the differences between, well, the workflow when new vs existing? diverged flows could merge back together to complete the path for the part where they're the same?

This comment has been minimized.

Copy link
@drewwills

drewwills May 16, 2014

Author Member

It's already branched new vs. existing... but at at a point where we're not ready to make this choice. We would need to re-branch and re-merge.


if (!form.isNew()) {
// Get out; we only prepopulate new portlets
return;

This comment has been minimized.

Copy link
@apetro

apetro May 15, 2014

Member

Should this method have the responsibility of nuancing its behavior depending on new-ness, or should the caller not call this method if the portlet is new?

This comment has been minimized.

Copy link
@drewwills

drewwills May 15, 2014

Author Member

As above. The (one-and-only) caller is Web Flow, and getting ti to follow nuance is tougher than it sounds.

* @param form
*/
public void prepopulatePortlet(String application, String portlet, PortletDefinitionForm form) {
public void prepopulatePortletIfNew(PortletDefinitionForm form) {

This comment has been minimized.

Copy link
@apetro

apetro May 15, 2014

Member

Thinking about what this method is doing, what its scope and responsibility is, and so what it should be called. Is this more informPortletFormFromPortletType() in that what it's doing is, now that we know the portlet type, binding what is implied by that type into the form representing the publication of an instance of that type?

drewwills added a commit that referenced this pull request May 16, 2014
UP-4065:  Portlet Manager -- Detect config/edit/help/about mode support ...
@drewwills drewwills merged commit 2b9504a into Jasig:master May 16, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@drewwills drewwills deleted the drewwills:UP-4065 branch May 16, 2014
@drewwills
Copy link
Member Author

drewwills commented May 16, 2014

@apetro -- Very happy for this flow to continue to evolve, but I think it's time for the existing enhancement to make its way in.

apetro added a commit that referenced this pull request Jul 8, 2015
MUMUP-1711 : Upgrade to weather portlet 1.1.3; add widget config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.