Object toInspect = mPropertyStyle.traverse( metawidget.getToInspect(), typeAndNames.getType(), false, typeAndNames.getNamesAsArray() ).getValue();
Object sourceValue = mPropertyStyle.traverse( metawidget.getToInspect(), typeAndNames.getType(), false, typeAndNames.getNamesAsArray() ).getValue(); String names = typeAndNames.getNames().replace( StringUtils.SEPARATOR_FORWARD_SLASH_CHAR, StringUtils.SEPARATOR_DOT_CHAR ); SavedBinding binding = new SavedBinding( componentToBind, componentProperty, names, TRUE.equals( attributes.get( NO_SETTER ) ) ); saveValueToWidget( binding, sourceValue );
String[] names = PathUtils.parsePath( path ).getNamesAsArray();
( (GwtRemoteInspectorProxy) inspector ).inspect( mToInspect, typeAndNames.getType(), typeAndNames.getNamesAsArray(), new AsyncCallback<String>() { mLastInspection = mPipeline.inspectAsDom( mToInspect, typeAndNames.getType(), typeAndNames.getNamesAsArray() );
final String[] names = PathUtils.parsePath( path ).getNamesAsArray();
String[] names = PathUtils.parsePath( path ).getNamesAsArray();
Object toInspect = mPropertyStyle.traverse( metawidget.getToInspect(), typeAndNames.getType(), false, typeAndNames.getNamesAsArray() ).getValue();
String[] names = PathUtils.parsePath( metawidget.getInspectionPath() ).getNamesAsArray();
String[] names = PathUtils.parsePath( metawidget.getPath() ).getNamesAsArray();
String propertyName = PathUtils.parsePath( metawidget.getInspectionPath() ).getNames().replace( StringUtils.SEPARATOR_FORWARD_SLASH_CHAR, StringUtils.SEPARATOR_DOT_CHAR );
final String[] names = PathUtils.parsePath( path ).getNamesAsArray();
String sourceProperty = PathUtils.parsePath( metawidget.getPath() ).getNames().replace( StringUtils.SEPARATOR_FORWARD_SLASH_CHAR, StringUtils.SEPARATOR_DOT_CHAR );
String[] names = PathUtils.parsePath( metawidgetToUse.getPath() ).getNamesAsArray();
String[] names = PathUtils.parsePath( metawidgetToUse.getPath() ).getNamesAsArray();
protected Element inspect() { TypeAndNames typeAndNames = PathUtils.parsePath( mPath, StringUtils.SEPARATOR_DOT_CHAR ); String type = typeAndNames.getType(); // Inspect using the 'raw' type (eg. contactForm) Element inspectionResult = mPipeline.inspectAsDom( null, type, typeAndNames.getNamesAsArray() ); // (pageContext may be null in unit tests) if ( pageContext != null ) { // Try to locate the runtime bean. This allows some Inspectors // to act on it polymorphically. Object obj = pageContext.findAttribute( type ); if ( obj != null ) { Element additionalInspectionResult = mPipeline.inspectAsDom( obj, obj.getClass().getName(), typeAndNames.getNamesAsArray() ); // Combine the subtrees // // Note the top-level types attribute will be different, because one is the 'raw' // type (eg. contactForm) and one the runtime bean (eg. // org.metawidget.example.struts.addressbook.form.BusinessContactForm) if ( inspectionResult == null ) { inspectionResult = additionalInspectionResult; } else if ( additionalInspectionResult != null ) { Element inspectionResultEntity = XmlUtils.getFirstChildElement( inspectionResult ); Element additionalInspectionResultEntity = XmlUtils.getFirstChildElement( additionalInspectionResult ); XmlUtils.combineElements( inspectionResultEntity, additionalInspectionResultEntity, NAME, null ); } } } return inspectionResult; }
public BoundAction( String actionName, Object bindTo, String path, String name ) { super( actionName ); mBindTo = bindTo; if ( path == null ) { return; } mNames = PathUtils.parsePath( path ).getNamesAsArray(); // Traverse to the last Object Object traverse = mBindTo; for ( String subName : mNames ) { if ( traverse == null ) { return; } traverse = ClassUtils.getProperty( traverse, subName ); } try { // Parameterless methods mAction = traverse.getClass().getMethod( name, (Class[]) null ); } catch ( NoSuchMethodException e1 ) { try { // ActionEvent-parameter based methods mAction = traverse.getClass().getMethod( name, ActionEvent.class ); } catch ( NoSuchMethodException e2 ) { throw WidgetProcessorException.newException( e2 ); } } }
public BoundAction( String actionName, Object bindTo, String path, String name ) { super( actionName ); mBindTo = bindTo; if ( path == null ) { return; } mNames = PathUtils.parsePath( path ).getNamesAsArray(); // Traverse to the last Object Object traverse = mBindTo; for ( String subName : mNames ) { if ( traverse == null ) { return; } traverse = ClassUtils.getProperty( traverse, subName ); } try { // Parameterless methods mAction = traverse.getClass().getMethod( name, (Class[]) null ); } catch ( NoSuchMethodException e1 ) { try { // ActionEvent-parameter based methods mAction = traverse.getClass().getMethod( name, ActionEvent.class ); } catch ( NoSuchMethodException e2 ) { throw WidgetProcessorException.newException( e2 ); } } }
public BoundAction( Object bindTo, String path, String name ) { mBindTo = bindTo; if ( path == null ) { return; } mNames = PathUtils.parsePath( path ).getNamesAsArray(); // Traverse to the last Object Object traverse = mBindTo; for ( String subName : mNames ) { if ( traverse == null ) { return; } traverse = ClassUtils.getProperty( traverse, subName ); } try { mAction = traverse.getClass().getMethod( name, (Class[]) null ); } catch ( Exception e ) { throw WidgetProcessorException.newException( e ); } }
public static TypeAndNames parsePath( String path ) { return new TypeAndNames( path, StringUtils.SEPARATOR_FORWARD_SLASH_CHAR ); }
public static TypeAndNames parsePath( String path, char separator ) { return new TypeAndNames( path, separator ); }