private String getSystemValidator(Component comp, String attr) { final ComponentCtrl compCtrl = (ComponentCtrl) comp; final Annotation ann = AnnotationUtil.getSystemAnnotation(compCtrl, attr); if (ann != null) { final Map<String, String[]> attrs = ann.getAttributes(); //(tag, tagExpr) return AnnotationUtil.testString(attrs.get(Binder.VALIDATOR), ann); //system validator if exists } return null; }
private String getSystemConverter(Component comp, String attr) { final ComponentCtrl compCtrl = (ComponentCtrl) comp; final Annotation ann = AnnotationUtil.getSystemAnnotation(compCtrl, attr); if (ann != null) { final Map<String, String[]> attrs = ann.getAttributes(); //(tag, tagExpr) return AnnotationUtil.testString(attrs.get(Binder.CONVERTER), ann); //system converter if exists } return null; }
private Map<String, Object> getViewModelInitArgs(BindEvaluatorX evalx, Component comp) { final ComponentCtrl compCtrl = (ComponentCtrl) comp; final Collection<Annotation> anncol = compCtrl.getAnnotations(VIEW_MODEL_ATTR, INIT_ANNO); if (anncol.size() == 0) return null; final Annotation ann = anncol.iterator().next(); final Map<String, String[]> attrs = ann.getAttributes(); //(tag, tagExpr) Map<String, String[]> args = null; for (final Iterator<Entry<String, String[]>> it = attrs.entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey(); final String[] tagExpr = entry.getValue(); if ("value".equals(tag)) { //ignore } else { //other unknown tag, keep as arguments if (args == null) { args = new HashMap<String, String[]>(); } args.put(tag, tagExpr); } } return args == null ? null : BindEvaluatorXUtil.parseArgs(_binder.getEvaluatorX(), args); }
private void processReferenceBinding(Component comp, String propName, Annotation ann) { String loadExpr = null; Map<String, String[]> args = null; for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey(); final String[] tagExpr = entry.getValue(); if ("value".equals(tag)) { loadExpr = AnnotationUtil.testString(tagExpr, ann); } else { //other unknown tag, keep as arguments if (args == null) { args = new HashMap<String, String[]>(); } args.put(tag, tagExpr); } } final Map<String, Object> parsedArgs = args == null ? null : BindEvaluatorXUtil.parseArgs(_binder.getEvaluatorX(), args); try { BinderUtil.pushContext().setCurrentLocation(ann.getLocation()); _binder.addReferenceBinding(comp, propName, loadExpr, parsedArgs); } finally { BinderUtil.popContext(); } }
for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey();
for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey();
for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey();
for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey();
ExpressionAnnoInfo info = new ExpressionAnnoInfo(); Map<String, String[]> args = null; for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey();
for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey();
private void processFormInit(Component comp, String formId, Annotation ann) { String initExpr = null; Map<String, String[]> args = null; for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey(); final String[] tagExpr = entry.getValue(); if ("value".equals(tag)) { initExpr = AnnotationUtil.testString(tagExpr, ann); } else { //other unknown tag, keep as arguments if (args == null) { args = new HashMap<String, String[]>(); } args.put(tag, tagExpr); } } final Map<String, Object> parsedArgs = args == null ? null : BindEvaluatorXUtil.parseArgs(_binder.getEvaluatorX(), args); try { BinderUtil.pushContext().setCurrentLocation(ann.getLocation()); _binder.addFormInitBinding(comp, formId, initExpr, parsedArgs); } finally { BinderUtil.popContext(); } }
ExpressionAnnoInfo info = new ExpressionAnnoInfo(); Map<String, String[]> args = null; for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey();
private void processChildrenInit(Component comp, Annotation ann, ExpressionAnnoInfo converterInfo) { String initExpr = null; Map<String, String[]> args = null; for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey(); final String[] tagExpr = entry.getValue(); if ("value".equals(tag)) { initExpr = AnnotationUtil.testString(tagExpr, ann); } else { //other unknown tag, keep as arguments if (args == null) { args = new HashMap<String, String[]>(); } args.put(tag, tagExpr); } } final Map<String, Object> parsedArgs = args == null ? null : BindEvaluatorXUtil.parseArgs(_binder.getEvaluatorX(), args); try { BinderUtil.pushContext().setCurrentLocation(ann.getLocation()); _binder.addChildrenInitBinding(comp, initExpr, parsedArgs, converterInfo == null ? getDefaultChildBindingConverter() : converterInfo.expr, converterInfo == null ? null : converterInfo.args); } finally { BinderUtil.popContext(); } }
for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey();
final Map<String, String[]> attrs = ann.getAttributes(); //(tag, tagExpr) Map<String, String[]> args = null; final List<String> cmdExprs = new ArrayList<String>();
private void processPropertyInit(Component comp, String propName, Annotation ann, ExpressionAnnoInfo converterInfo) { String initExpr = null; Map<String, String[]> args = null; for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey(); final String[] tagExpr = entry.getValue(); if ("value".equals(tag)) { initExpr = AnnotationUtil.testString(tagExpr, ann); } else { //other unknown tag, keep as arguments if (args == null) { args = new HashMap<String, String[]>(); } args.put(tag, tagExpr); } } final Map<String, Object> parsedArgs = args == null ? null : BindEvaluatorXUtil.parseArgs(_binder.getEvaluatorX(), args); try { BinderUtil.pushContext().setCurrentLocation(ann.getLocation()); _binder.addPropertyInitBinding(comp, propName, initExpr, parsedArgs, converterInfo == null ? null : converterInfo.expr, converterInfo == null ? null : converterInfo.args); } finally { BinderUtil.popContext(); } }
final Map<String, String[]> attrs = ann.getAttributes(); //(tag, tagExpr) Map<String, String[]> args = null; final List<String> cmdExprs = new ArrayList<String>();
private void processChildrenPromptBindings(Component comp, Annotation ann, ExpressionAnnoInfo converterInfo) { String expr = null; Map<String, String[]> args = null; for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) { final Entry<String, String[]> entry = it.next(); final String tag = entry.getKey();
final Map<String, String[]> attrs = ann != null ? ann.getAttributes() : null; //(tag, tagExpr)
final Map<String, String[]> attrs = ann.getAttributes(); //(tag, tagExpr)