commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject BeanUtils/FAQ reverted to revision 7 on Commons Wiki
Date Mon, 18 Apr 2011 06:04:23 GMT
Dear wiki user,

You have subscribed to a wiki page "Commons Wiki" for change notification.

The page BeanUtils/FAQ has been reverted to revision 7 by JörgSchaible.
The comment on this change is: FAQ is not the place to ask questions, that is the user's list
for..
http://wiki.apache.org/commons/BeanUtils/FAQ?action=diff&rev1=9&rev2=10

--------------------------------------------------

  BeanUtils uses '.' as a property separator, and the second property should actually used
mapped syntax, since it is directly accessing a map now, thus the correct usage should be:
  String val = PropertyUtils.getProperty(bean, "map(key1).key2");
  
- 
- === Why does it omit some properties when call BeanUtils.describe? ===
- say you get a dto Type through wsimport tools:
- 
- package local;
- import java.io.Serializable;
- import java.util.ArrayList;
- import java.util.List;
- import javax.xml.bind.annotation.XmlAccessType;
- import javax.xml.bind.annotation.XmlAccessorType;
- import javax.xml.bind.annotation.XmlAnyElement;
- import javax.xml.bind.annotation.XmlElement;
- import javax.xml.bind.annotation.XmlType;
- import org.w3c.dom.Element;
- /**
-  *         Container for data on one listing category.
-  * 			
-  * 
-  * <p>Java class for CategoryType complex type.
-  * 
-  * <p>The following schema fragment specifies the expected content contained within
this class.
-  * 
-  * <pre>
-  * &lt;complexType name="CategoryType">
-  *   &lt;complexContent>
-  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-  *       &lt;sequence>
-  *         &lt;element name="BestOfferEnabled" type="{http://www.w3.org/2001/XMLSchema}boolean"
minOccurs="0"/>
-  *         &lt;any/>
-  *       &lt;/sequence>
-  *     &lt;/restriction>
-  *   &lt;/complexContent>
-  * &lt;/complexType>
-  * </pre>
-  */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "CategoryType", propOrder = {
-     "bestOfferEnabled"
- })
- public class CategoryType
-     implements Serializable
- {
- 
-     private final static long serialVersionUID = 12343L;
-     @XmlElement(name = "BestOfferEnabled")
-     protected Boolean bestOfferEnabled;
- 
-     /**
-      * Gets the value of the bestOfferEnabled property.
-      * 
-      * @return
-      *     possible object is
-      *     {@link Boolean }
-      *     
-      */
-     public Boolean isBestOfferEnabled() {
-         return bestOfferEnabled;
-     }
- 
-     /**
-      * Sets the value of the bestOfferEnabled property.
-      * 
-      * @param value
-      *     allowed object is
-      *     {@link Boolean }
-      *     
-      */
-     public void setBestOfferEnabled(Boolean value) {
-         this.bestOfferEnabled = value;
-     }
- 
- }
- 
- I run this main method:
- 	public static void main(String[] args){
- 		CategoryType type = new CategoryType();
- 		try{
- 			System.out.println(BeanUtils.describe(type));
- 		}catch(Exception e){
- 			e.printStackTrace();
- 		}
- 		
- 	}
- 
- get this result:
- {class=class local.CategoryType}
- 
- it omits bestOfferEnabled property.
- 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message