As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<namespaces> <namespace uri="my.new.model" prefix="my"/> </namespaces> <types> <type name="my:mitipo1"> <title>Mi Tipo 1</title> <properties> <property name="my:fecha"> <title>Fecha</title> <type>d:date</type> <mandatory>true</mandatory> </property> <property name="my:nombre"> <title>Nombre</title> <type>d:text</type> <mandatory>true</mandatory> </property> </properties> </type> <types>
me gustaría que dado un nombre de propiedad, p.e. my:fecha, ver de qué tipo es
getProperty@NotAuditablePropertyDefinition getProperty(QName propertyName) Gets the definition of the property as defined by its owning Class. Parameters: propertyName - the property name Returns: the property definition (or null, if it doesn't exist)
if (miTipo.equals(DataTypeDefinition.DATE)) { // Casting a Date } if …
DictionaryService ds = Repository.getServiceRegistry( FacesContext.getCurrentInstance()).getDictionaryService();
<bean id="miBean" class="miPaquete.miClase"> <property name="dictionaryService"> <ref bean="dictionaryService"/> </property> </bean>
private DictionaryService dictionaryService; public DictionaryService getDictionaryService() { return dictionaryService; } public void setDictionaryService(DictionaryServicedictionaryService) { this.dictionaryService= dictionaryService; }
DictionaryServiceSoapBindingStub dssbs= WebServiceFactory.getDictionaryService(); PropertyDefinition[] propDefs = dssbs.getProperties(new String[] {"my:fecha", "my:nombre"}); int j=0; while (j<propDefs.length) { System.out.println(propDefs[j].getDataType()); j++; }