portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Sean Taylor" <da...@bluesunrise.com>
Subject RE: org.apache.jetspeed.portal.BasePortletSet.getAttribute(String, String, RunData)
Date Tue, 13 Aug 2002 22:42:43 GMT
What about this solution:

    public String getAttribute( String attrName, String attrDefValue,
RunData rundata )
    {
        String attrValue = null;

        PortletInstance instance = PersistenceManager.getInstance(this,
rundata);
        attrValue = instance.getAttribute(attrName, attrDefValue);

        return attrValue;

    }

It was commented out, but I don't know why....

> -----Original Message-----
> From: mmosttler@yci.com [mailto:mmosttler@yci.com]
> Sent: Wednesday, July 10, 2002 1:16 PM
> To: jetspeed-dev@jakarta.apache.org
> Subject: org.apache.jetspeed.portal.BasePortletSet.getAttribute(String,
> String, RunData)
>
>
> Hello,
> This method seems to have not been finished.
>
>     /**
>     Retrieve a portlet attribute from persistent storage
>
>     @param attrName The attribute to retrieve
>     @parm attrDefValue The value if the attr doesn't exists
>     @param rundata A RunData object
>     @return The attribute value
>     */
>     public String getAttribute( String attrName, String attrDefValue,
> RunData rundata )
>     {
>         // TODO: figure out if we can get an attribute for a
> portlet set...
>         return attrDefValue;
>     }
>
> I have stepped through the code have found that the parameter set in the
> psml for <portlets> appears in the PortletConfig for the BasePortletSet.
> The following code allows this method to return the value for the
> parameter
> from the PSML.
>
>     /**
>     Retrieve a portlet attribute from persistent storage
>
>     @param attrName The attribute to retrieve
>     @parm attrDefValue The value if the attr doesn't exists
>     @param rundata A RunData object
>     @return The attribute value
>     */
>     public String getAttribute( String attrName, String attrDefValue,
> RunData rundata )
>     {
> 	    return getPortletConfig().getInitParameter(attrName,
> attrDefValue);
>     }
>
> Is there a different solution for this?  If not could someone commit this
> change to CVS?
>
> thank you,
> marcus
>
> --
> To unsubscribe, e-mail:
<mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:jetspeed-dev-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message