[jira] [Created] (PLUTO-688) V3.0 Portlet Hub Demo tries to call nonexistent setValue function on PortletParameters object

"Neil Griffin (JIRA)" <[email protected]>
Newsgroups gmane.comp.jakarta.pluto.devel
Message-ID <[email protected]>
Neil Griffin created PLUTO-688:
----------------------------------

             Summary: V3.0 Portlet Hub Demo tries to call nonexistent setValue function on PortletParameters object
                 Key: PLUTO-688
                 URL: https://issues.apache.org/jira/browse/PLUTO-688
             Project: Pluto
          Issue Type: Bug
          Components: demo portlets
    Affects Versions: 3.0.0
            Reporter: Neil Griffin
            Assignee: Neil Griffin
             Fix For: 3.0.1


The V3.0 Portlet Hub Demo contains the following Java scriptlet in the JSP associated with the PH-ColorSelPortlet:

{code:java|title=view-csp.jsp}
parms.setValue('action', 'send');
    ...
if (clrs.length > 0) {
    parms.setValue('<%=PARAM_FG_COLOR%>', clrs);
}
parms.setValue('<%=PARAM_MSG_INPUT%>', document.getElementById(mid).value);
hub.action(parms);
{code}

The problem is that there is no {{setValues([object Array])}} function for the {{PortletParameters}} object. For more information, see the [JSDoc for PortletParameters|https://portals.apache.org/pluto/portlet-3.0-apidocs/docfiles/jsdoc/global.html#PortletParameters].

Instead, the scriptlet should contain the following:
{code:java|title=view-csp.jsp}
parms['action'] = ['send'];
    ...
if (clrs.length > 0) {
    parms['<%=PARAM_FG_COLOR%>'] = clrs;
}
parms['<%=PARAM_MSG_INPUT%>'] = [document.getElementById(mid).value];
hub.action(parms);
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.