You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bridges-dev@portals.apache.org by "James Schopp (JIRA)" <br...@portals.apache.org> on 2005/09/30 16:32:48 UTC

[jira] Created: (PB-11) Impossible to set "prefix" attribute in RenderContextAttributes

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


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: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Resolved: (PB-11) Impossible to set "prefix" attribute in RenderContextAttributes

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
     [ 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: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Updated: (PB-11) Impossible to set "prefix" attribute in RenderContextAttributes

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/PB-11?page=all ]

Ate Douma updated PB-11:
------------------------

    Fix Version: 0.4
        Version: 0.4

> Impossible to set "prefix" attribute in RenderContextAttributes
> ---------------------------------------------------------------
>
>          Key: PB-11
>          URL: http://issues.apache.org/jira/browse/PB-11
>      Project: Portals Bridges
>         Type: Bug
>   Components: struts
>     Versions: 0.4
>     Reporter: James Schopp
>     Assignee: Ate Douma
>      Fix For: 0.4

>
> 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: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Updated: (PB-11) Impossible to set "prefix" attribute in RenderContextAttributes

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/PB-11?page=all ]

Ate Douma updated PB-11:
------------------------

    Component: struts

> Impossible to set "prefix" attribute in RenderContextAttributes
> ---------------------------------------------------------------
>
>          Key: PB-11
>          URL: http://issues.apache.org/jira/browse/PB-11
>      Project: Portals Bridges
>         Type: Bug
>   Components: struts
>     Versions: 0.4
>     Reporter: James Schopp
>     Assignee: Ate Douma
>      Fix For: 0.4

>
> 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: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Assigned: (PB-11) Impossible to set "prefix" attribute in RenderContextAttributes

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/PB-11?page=all ]

Ate Douma reassigned PB-11:
---------------------------

    Assign To: Ate Douma

> 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: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org