Exemplo n.º 1
0
 private View autowired(View view, AttributeSet attrs) {
   if (!(view.getClass().isAnnotationPresent(Autowired.class))) return view;
   String elStr = getScopeKey(attrs, view);
   GIntent gintent = new GIntent(view);
   Params params = new Params(el.analyzeTag(elStr == null ? "${bean}" : elStr));
   gintent.setParams(params);
   return new ViewManager(gintent).flate();
 }
Exemplo n.º 2
0
 private View rendering(View view) {
   if (view instanceof IGTextAble) {
     final IGTextAble textAble = (IGTextAble) view;
     final String eled = el.exe(textAble.getExpression());
     final Spanned spanned = new GText(eled).exe();
     textAble.setText(spanned);
     textAble.setDA(ViewManager.cacheID, cacheID++);
     final Object bean = el.getGInterpreter().getParams().getBean();
     TextAbleR textAbleR = new TextAbleR(spanned, textAble.getExpression());
     ViewManager.cache(bean, textAble, textAbleR);
     viewHolder.add(textAble);
   }
   if (view instanceof IFormElement) {
     IFormElement formElement = (IFormElement) view;
     viewHolder.add(formElement);
   }
   return view;
 }