Package org.openbp.core.model.item.visual

Examples of org.openbp.core.model.item.visual.VisualItem


   */
  public void executeModelObject(ModelObject mo, EngineExecutor ee)
  {
    TokenContext context = ee.getTokenContext();
    NodeSocket entrySocket = context.getCurrentSocket();
    VisualItem visual = (VisualItem) mo;

    NodeSocket nextSocket = null;

    // Check, whether we've a dynamic visual we should execute instead of this visual.
    VisualItem dynamicVisual = determineDynamicVisual(visual, context, entrySocket);

    if (dynamicVisual != this)
    {
      // Delegate execution to the dynamic visual.
      visual = dynamicVisual;
View Full Code Here


   * @param entrySocket Socket used to enter the visual
   * @return The dynamic visual to be executed or the original visual
   */
  protected VisualItem determineDynamicVisual(VisualItem visual, TokenContext context, NodeSocket entrySocket)
  {
    VisualItem result;

    // Lookup the special parameter's value.
    Object dynamicVisualName = TokenContextUtil.getParamValue(context, entrySocket, CoreConstants.DYNAMIC_VISUAL_PARAM_NAME);
    if ((dynamicVisualName != null) && (dynamicVisualName instanceof String))
    {
      // Try to find dynamic visual.
      try
      {
        result = (VisualItem) context.getExecutingModel().resolveItemRef((String) dynamicVisualName,
          ItemTypes.VISUAL);

        LogUtil.debug(getClass(), "Invoking dynamically determined visual $0.", result.getQualifier());
      }
      catch (ModelException re)
      {
        // Just fall back to the original item.
        result = visual;
View Full Code Here

TOP

Related Classes of org.openbp.core.model.item.visual.VisualItem

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.