You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by mm...@yci.com on 2002/08/14 16:53:22 UTC
RE: org.apache.jetspeed.portal.BasePortletSet.getAttribute(String
, String, RunData)
I am assuming the PorltetInstance and PersistenceManager are new in the
latest CVS. I am not familiar with how they work.
If it will retrieve the attribute from the PSML then it is doing what I want
it to do.
marcus
-----Original Message-----
From: David Sean Taylor [mailto:david@bluesunrise.com]
Sent: Tuesday, August 13, 2002 3:43 PM
To: Jetspeed Developers List
Subject: RE:
org.apache.jetspeed.portal.BasePortletSet.getAttribute(String, String,
RunData)
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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>