You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Andreas Sachs (Jira)" <ji...@apache.org> on 2021/11/23 10:51:00 UTC

[jira] [Comment Edited] (WW-5149) labelposition and 2.5.27

    [ https://issues.apache.org/jira/browse/WW-5149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17447916#comment-17447916 ] 

Andreas Sachs edited comment on WW-5149 at 11/23/21, 10:50 AM:
---------------------------------------------------------------

I can confirm that it is working now. But i think there are two more problems now:

 

if (labelposition != null)

{ LOG.warn("\"labelposition\" attribute is deprecated, please use \"labelPosition\" instead!"); uiBean.setLabelPosition(labelposition); }

 

Will this ever be executed because? (the setter uses the new property):

setLabelposition(String labelPosition) \{ this.labelPosition = labelPosition;}

 

2.5.28 also adds a new property LOG in AbstractUITag:

private static final Logger LOG = LogManager.getLogger(AbstractUITag.class);

 

This leads to an exception in AbstractUITagBeanInfo:

11:34:36,021 ERROR [http-nio-8080-exec-1] AbstractUITagBeanInfo:69 - Could not construct bean info for AbstractUITag. This is very bad.
java.lang.NoSuchMethodException: org.apache.struts2.views.jsp.ui.AbstractUITag.setLOG(java.lang.String)
    at java.lang.Class.getMethod(Class.java:1786)
    at org.apache.struts2.views.jsp.ui.AbstractUITagBeanInfo.getPropertyDescriptors(AbstractUITagBeanInfo.java:60)
    at java.beans.Introspector.getPropertyDescriptors(Introspector.java:620)
    at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:462)
    at java.beans.Introspector.getBeanInfo(Introspector.java:428)
    at java.beans.Introspector.getBeanInfo(Introspector.java:173)
    at java.beans.Introspector.getBeanInfo(Introspector.java:260)
    at java.beans.Introspector.<init>(Introspector.java:407)
    at java.beans.Introspector.getBeanInfo(Introspector.java:173)

 


was (Author: JIRAUSER280628):
I can confirm that it is working now. But i think there are two more problems now:

 

if (labelposition != null) {
LOG.warn("\"labelposition\" attribute is deprecated, please use \"labelPosition\" instead!");
uiBean.setLabelPosition(labelposition);
}

 

Will this ever be executed because? (the setter uses the new property):

setLabelposition(String labelPosition) \{ this.labelPosition = labelPosition;}

 

2.5.28 also adds a new property LOG in AbstractUITag ( i did not find the commit):

private static final Logger LOG = LogManager.getLogger(AbstractUITag.class);

 

This leads to an exception in AbstractUITagBeanInfo:

11:34:36,021 ERROR [http-nio-8080-exec-1] AbstractUITagBeanInfo:69 - Could not construct bean info for AbstractUITag. This is very bad.
java.lang.NoSuchMethodException: org.apache.struts2.views.jsp.ui.AbstractUITag.setLOG(java.lang.String)
    at java.lang.Class.getMethod(Class.java:1786)
    at org.apache.struts2.views.jsp.ui.AbstractUITagBeanInfo.getPropertyDescriptors(AbstractUITagBeanInfo.java:60)
    at java.beans.Introspector.getPropertyDescriptors(Introspector.java:620)
    at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:462)
    at java.beans.Introspector.getBeanInfo(Introspector.java:428)
    at java.beans.Introspector.getBeanInfo(Introspector.java:173)
    at java.beans.Introspector.getBeanInfo(Introspector.java:260)
    at java.beans.Introspector.<init>(Introspector.java:407)
    at java.beans.Introspector.getBeanInfo(Introspector.java:173)

 

> labelposition and 2.5.27
> ------------------------
>
>                 Key: WW-5149
>                 URL: https://issues.apache.org/jira/browse/WW-5149
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Tags, Plugin - Tiles
>    Affects Versions: 2.5.27
>            Reporter: Andreas Sachs
>            Priority: Major
>             Fix For: 2.5.28
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Hello,
> according to WW-5132 labelposition should be deprecated. But i get an error. 
>  
> With 2.5.26:
> checkbox with unknown attribute: ignored
> checkbox with labelposition:  ok
> checkbox with labelPosition: ignored
>  
> With 2.5.27:
> checkbox with unknown attribute: ignored
> checkbox with labelposition:  JasperException
> checkbox with labelPosition: ok
>  
> org.apache.jasper.JasperException: <file> (Zeile: [13], Spalte: [4]) Keine Setter Methode für das Attribut [labelposition] gefunden.
> (Setter not found)
>  
> I'm using tiles.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)