Package org.cruxframework.crux.core.rebind.screen.widget.ViewFactoryCreator

Examples of org.cruxframework.crux.core.rebind.screen.widget.ViewFactoryCreator.WidgetConsumer


  private void generateWidgetCreationForCellByTemplate(SourcePrinter out, C context, JSONObject child, String dataObjectName)
    {
    child = ensureFirstChild(child, false, context.getWidgetId());
    String widgetClassName =  getChildWidgetClassName(child);
    JClassType widgetClassType =  getContext().getTypeOracle().findType(widgetClassName);
    WidgetConsumer widgetConsumer = new PageableWidgetConsumer(getContext(), widgetClassType, getDataObject(context), "value", getView().getId(), context.getWidgetId());
   
    out.println("public "+IsWidget.class.getCanonicalName()+" createWidget("+dataObjectName+" value){");
      String childWidget = createChildWidget(out, child, widgetConsumer, true, context);
      out.println("return "+childWidget+";");
      out.println("}");
View Full Code Here


   * @throws CruxGeneratorException
   */
  public String createChildWidget(SourcePrinter out, JSONObject metaElem, String widgetId,
      String widgetType, WidgetConsumer consumer, boolean allowWrapperForCreatedWidget, WidgetCreatorContext context) throws CruxGeneratorException
  {
    WidgetConsumer widgetConsumer = consumer != null ? consumer : context.getWidgetConsumer();
    return viewFactory.newWidget(out, metaElem, widgetId, widgetType, widgetConsumer, allowWrapperForCreatedWidget);
  }
View Full Code Here

       * @param context
       */
      private void processAnyWidgetChild(SourcePrinter out, WidgetCreatorContext context)
            {
        String childWidget;
        WidgetConsumer consumer = widgetCreator.getViewFactory().getScreenWidgetConsumer();
        if (consumer != null && consumer instanceof LazyCompatibleWidgetConsumer && lazyChecker != null && lazyChecker.isLazy(context.getWidgetElement()))
        {
          childWidget = lazyFactory.getLazyPanel(out, context.getChildElement(), context.getWidgetId(), LazyPanelWrappingType.wrapChildren);
          String lazyPanelId = ViewFactoryUtils.getLazyPanelId(context.getWidgetId(), LazyPanelWrappingType.wrapChildren);
          consumer.consume(out, lazyPanelId, childWidget, widgetCreator.getWidgetFactoryDeclaration(), context.getWidgetElement());
          ((LazyCompatibleWidgetConsumer)consumer).handleLazyWrapChildrenCreation(out, context.getWidgetId());
        }
        else
        {
          childWidget = widgetCreator.createChildWidget(out, context.getChildElement(), context);
View Full Code Here

TOP

Related Classes of org.cruxframework.crux.core.rebind.screen.widget.ViewFactoryCreator.WidgetConsumer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.