[ http://issues.apache.org/jira/browse/PB-11?page=all ]
Ate Douma resolved PB-11:
-------------------------
Resolution: Fixed
Thanks for finding this one James.
As you said, this is still an "experimental" and not fully tested feature.
I once refactored some of the method names and as result the Digester didn't
accepts the prefix setter anymore as it sees unbalanced setter and getter
methods which is not according to the JavaBeans specs.
I quickly fixed this by renaming the isPrefix() method to isPrefixAttr(). Now
the digester properly loads the attribute.
I myself prefer shortest possible xml notation and using a prefix boolean as
attribute on the element requires more typing :-)
So, you should now be able to define attributes in these two ways:
<attribute name="myname"/>
<attribute prefix="myprefix"/>
> Impossible to set "prefix" attribute in RenderContextAttributes
> ---------------------------------------------------------------
>
> Key: PB-11
> URL: http://issues.apache.org/jira/browse/PB-11
> Project: Portals Bridges
> Type: Bug
> Reporter: James Schopp
> Assignee: Ate Douma
>
> There is an undocumented feature, which implies being able to specify a
> "prefix" for an attribute in RenderContextAttributes
> (struts-portlet-config.xml), instead of just the complete attribute name.
> However, I have not been able to actually specify a "prefix"-type attribute.
> In the definition of the object that represents the configuration entry, the
> "prefix" property of the Attribute class has a boolean getter (boolean
> isPrefix()) and String setter (void setPrefix(String value)), and I think
> this is stopping me from being able to actually create a "prefix" attribute.
> What I mean is, I have not been able to create an attribute node in the
> config file representing a "prefix"-type attribute. When the digester is
> adding attributes to the configuration, it skips my node, and I think it
> might be due to this. (It probably encounters some BeanProperties exception,
> and moves on...)
> I have tried:
> <attribute prefix="I" />
> and
> <attribute name="I" prefix="true" />
> both of which fail. (My node is simply skipped alltogether.)
> I would recommend: making the "prefix" property boolean (both the getter and
> the setter), and using the "name" property for the name (or name-prefix).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]