@Override protected void processEntity( Map<String, String> attributes, UIMetawidget metawidget, Object toInspect, String type, String... names ) { FacesContext context = FacesContext.getCurrentInstance(); if ( context == null ) { throw InspectionResultProcessorException.newException( "FacesContext not available to FacesInspectionResultProcessor" ); } Map<String, Object> requestMap = null; try { if ( mInjectThis != null ) { requestMap = context.getExternalContext().getRequestMap(); requestMap.put( UNDERSCORE_THIS_ATTRIBUTE, mInjectThis.traverse( toInspect, type, true, names ).getValue() ); } super.processEntity( attributes, metawidget, toInspect, type, names ); } finally { // UNDERSCORE_THIS_ATTRIBUTE should not be available outside of our particular // evaluation if ( requestMap != null ) { requestMap.remove( UNDERSCORE_THIS_ATTRIBUTE ); } } }
@Override protected void processTraits( Element entity, UIMetawidget metawidget, Object toInspect, String type, String... names ) { FacesContext context = FacesContext.getCurrentInstance(); if ( context == null ) { throw InspectionResultProcessorException.newException( "FacesContext not available to FacesInspectionResultProcessor" ); } Map<String, Object> requestMap = null; try { if ( mInjectThis != null ) { requestMap = context.getExternalContext().getRequestMap(); requestMap.put( UNDERSCORE_THIS_ATTRIBUTE, mInjectThis.traverse( toInspect, type, false, names ).getValue() ); } super.processTraits( entity, metawidget, toInspect, type, names ); } finally { // UNDERSCORE_THIS_ATTRIBUTE should not be available outside of our particular // evaluation if ( requestMap != null ) { requestMap.remove( UNDERSCORE_THIS_ATTRIBUTE ); } } }
@Override protected void processEntity( Map<String, String> attributes, UIMetawidget metawidget, Object toInspect, String type, String... names ) { FacesContext context = FacesContext.getCurrentInstance(); if ( context == null ) { throw InspectionResultProcessorException.newException( "FacesContext not available to FacesInspectionResultProcessor" ); } Map<String, Object> requestMap = null; try { if ( mInjectThis != null ) { requestMap = context.getExternalContext().getRequestMap(); requestMap.put( UNDERSCORE_THIS_ATTRIBUTE, mInjectThis.traverse( toInspect, type, true, names ).getValue() ); } super.processEntity( attributes, metawidget, toInspect, type, names ); } finally { // UNDERSCORE_THIS_ATTRIBUTE should not be available outside of our particular // evaluation if ( requestMap != null ) { requestMap.remove( UNDERSCORE_THIS_ATTRIBUTE ); } } }
@Override protected void processTraits( Element entity, UIMetawidget metawidget, Object toInspect, String type, String... names ) { FacesContext context = FacesContext.getCurrentInstance(); if ( context == null ) { throw InspectionResultProcessorException.newException( "FacesContext not available to FacesInspectionResultProcessor" ); } Map<String, Object> requestMap = null; try { if ( mInjectThis != null ) { requestMap = context.getExternalContext().getRequestMap(); requestMap.put( UNDERSCORE_THIS_ATTRIBUTE, mInjectThis.traverse( toInspect, type, false, names ).getValue() ); } super.processTraits( entity, metawidget, toInspect, type, names ); } finally { // UNDERSCORE_THIS_ATTRIBUTE should not be available outside of our particular // evaluation if ( requestMap != null ) { requestMap.remove( UNDERSCORE_THIS_ATTRIBUTE ); } } }
@Override protected void processEntity( Map<String, String> attributes, M metawidget, Object toInspect, String type, String... names ) { JexlContext context = LOCAL_CONTEXT.get(); try { context.set( THIS_ATTRIBUTE, mInjectThis.traverse( toInspect, type, true, names ).getValue() ); super.processEntity( attributes, metawidget, toInspect, type, names ); } finally { // THIS_ATTRIBUTE should not be available outside of our particular evaluation context.set( THIS_ATTRIBUTE, null ); } }
@Override protected void processTraits( Element entity, M metawidget, Object toInspect, String type, String... names ) { JexlContext context = LOCAL_CONTEXT.get(); try { context.set( THIS_ATTRIBUTE, mInjectThis.traverse( toInspect, type, false, names ).getValue() ); super.processTraits( entity, metawidget, toInspect, type, names ); } finally { // THIS_ATTRIBUTE should not be available outside of our particular evaluation context.set( THIS_ATTRIBUTE, null ); } }
/** * Inspect the <code>toInspect</code> for properties and actions. * <p> * This method can be overridden by clients wishing to modify the inspection process. Most * clients will find it easier to override one of the sub-methods, such as * <code>inspectTrait</code> or <code>inspectProperty</code>. */ protected void inspectTraits( Element toInspect, Element toAddTo ) { if ( toInspect == null ) { return; } Document document = toAddTo.getOwnerDocument(); // Do 'extends' attribute first String extendsAttribute = getExtendsAttribute(); if ( extendsAttribute != null ) { if ( toInspect.hasAttribute( extendsAttribute ) ) { inspectTraits( (Element) traverse( null, toInspect.getAttribute( extendsAttribute ), false ).getValue(), toAddTo ); } } // Next, inspect each child... Element element = document.createElementNS( NAMESPACE, ENTITY ); inspectTraitSiblings( element, XmlUtils.getFirstChildElement( toInspect ) ); // ...and combine them all. Note the element may already exist from the superclass, // and its attributes will get overridden by the subclass XmlUtils.combineElements( toAddTo, element, NAME, NAME ); }
/** * Inspect the <code>toInspect</code> for properties and actions. * <p> * This method can be overridden by clients wishing to modify the inspection process. Most * clients will find it easier to override one of the sub-methods, such as * <code>inspectTrait</code> or <code>inspectProperty</code>. */ protected void inspectTraits( Element toInspect, Element toAddTo ) { if ( toInspect == null ) { return; } Document document = toAddTo.getOwnerDocument(); // Do 'extends' attribute first String extendsAttribute = getExtendsAttribute(); if ( extendsAttribute != null ) { if ( toInspect.hasAttribute( extendsAttribute ) ) { inspectTraits( (Element) traverse( null, toInspect.getAttribute( extendsAttribute ), false ).getValue(), toAddTo ); } } // Next, inspect each child... Element element = document.createElementNS( NAMESPACE, ENTITY ); inspectTraitSiblings( element, XmlUtils.getFirstChildElement( toInspect ) ); // ...and combine them all. Note the element may already exist from the superclass, // and its attributes will get overridden by the subclass XmlUtils.combineElements( toAddTo, element, NAME, NAME ); }
Object parent = mPropertyStyle.traverse( source, source.getClass().getName(), true, namesAsArray ).getValue();
Object toInspect = mPropertyStyle.traverse( metawidget.getToInspect(), typeAndNames.getType(), false, typeAndNames.getNamesAsArray() ).getValue();
Object toInspect = mPropertyStyle.traverse( metawidget.getToInspect(), typeAndNames.getType(), false, typeAndNames.getNamesAsArray() ).getValue();
saveValueToWidget( binding, valueAndDeclaredType.getValue() );
Object sourceValue = mPropertyStyle.traverse( metawidget.getToInspect(), typeAndNames.getType(), false, typeAndNames.getNamesAsArray() ).getValue();
Object parent = valueAndDeclaredType.getValue();
Object parent = valueAndDeclaredType.getValue();
traverseAgainstObject = valueAndDeclaredType.getValue();
traverseAgainstObject = valueAndDeclaredType.getValue();