Package org.apache.myfaces.trinidadinternal.ui.data.bind

Examples of org.apache.myfaces.trinidadinternal.ui.data.bind.AndBoundValue


    // If no start child add quickSearch
    BoundValue hasNavigation3 = BaseDesktopUtils.createIsRenderedBoundValue(NAVIGATION3_CHILD);
    BoundValue hasSearch =
                      BaseDesktopUtils.createIsRenderedBoundValue(SEARCH_CHILD);
    BoundValue hasSearchAndNoNavigation3 =
                              new AndBoundValue( new NotBoundValue(hasNavigation3),
                                                 hasSearch);
    BoundValue hasNavigation3AndSearch = new AndBoundValue( hasNavigation3, hasSearch);

    MarlinBean qsNoStartFlow = new MarlinBean(FLOW_LAYOUT_NAME);
    UINode quickSearch = ContextPoppingUINode.getUINode(SEARCH_CHILD);
    qsNoStartFlow.addIndexedChild( quickSearch );
    qsNoStartFlow.setAttributeValue(RENDERED_ATTR,
                                    hasSearchAndNoNavigation3);

    MarlinBean pageHeader = _sCreatePageHeader(globalHeaders,
                                                         qsNoStartFlow);


    // @todo if there is a navigation3 child, the search should go in the sideBar,
    // however we need a search component that will lay itself out properly
    // for the reduced space of a sideBar before we do that.
    MarlinBean startRegionLayout = new MarlinBean(SIDE_BAR_NAME);
    startRegionLayout.addIndexedChild(
                                ContextPoppingUINode.getUINode(NAVIGATION3_CHILD));

    startRegionLayout.setAttributeValue(RENDERED_ATTR, hasNavigation3);

    //
    // Create the page content area
    //

    // If a start child quickSearch rendered on the top of content area
    MarlinBean qsStartStack = new MarlinBean(STACK_LAYOUT_NAME);
    MarlinBean qsSeparator = new MarlinBean(SEPARATOR_NAME);
    qsStartStack.addIndexedChild(quickSearch);
    qsStartStack.addIndexedChild(qsSeparator);
    qsStartStack.setAttributeValue(RENDERED_ATTR, hasNavigation3AndSearch);


    //
    // Create layout used for locators at the top of the page
    //
    MarlinBean locatorLayout = new MarlinBean(STACK_LAYOUT_NAME);

    MarlinBean topSpacer = new MarlinBean(SPACER_NAME);
    topSpacer.setAttributeValue(HEIGHT_ATTR,"5");

    BoundValue locatorBoundValue =
      RootChildBoundValue.getBoundValue(LOCATION_CHILD);

    BoundValue isLocatorRendered =
      BaseDesktopUtils.createIsRenderedBoundValue(locatorBoundValue);

    BoundValue isUserInfoRendered =
      BaseDesktopUtils.createIsRenderedBoundValue(INFO_USER_CHILD);

    BoundValue isEndRendered =
      BaseDesktopUtils.createIsRenderedBoundValue(INFO_SUPPLEMENTAL_CHILD);

    BoundValue hasTrainBean =
     new PageLayoutRenderer.TreeWalkerBoundValue( locatorBoundValue,
                                                  PROCESS_TRAIN_NAME );

    BoundValue isTrainRendered =
      new AndBoundValue(isLocatorRendered,
                        hasTrainBean);


    // only render the top spacer if the Locator is rendered
    topSpacer.setAttributeValue(RENDERED_ATTR, isLocatorRendered);
View Full Code Here


      new SkinTranslatedBoundValue(_SKIP_PAST_NAVIGATION);
    skipNavigationLink.setAttributeValue(DESTINATION_ATTR, "#"+skipNavigationAnchor);
    skipNavigationLink.setAttributeValue(UIConstants.TEXT_ATTR,
                                         skipNavigationText);
    skipNavigationLink.setAttributeValue(UIConstants.RENDERED_ATTR,
      new AndBoundValue(
        new PageLayoutRenderer.NetscapeBoundValue(Boolean.FALSE,
                               Boolean.TRUE),
        UseAccessibilityBoundValue.sharedInstance()));
    skipNavigationLink.setAttributeValue(STYLE_CLASS_ATTR,_ORA_HIDE_SKIP_NAVI_TEXT);
    return skipNavigationLink;
View Full Code Here

  {
    // render table only if both user info and end region
    MarlinBean userEndTable = _sCreateUserInfoEndTable();
    userEndTable.setAttributeValue(
                      RENDERED_ATTR,
                      new AndBoundValue(isEndRendered, isUserInfoRendered));

    // render end region only if no user info
    MarlinBean endOnlyLayout = new MarlinBean(STACK_LAYOUT_NAME);
    MarlinBean spacer = new MarlinBean(SPACER_NAME);
    spacer.setAttributeValue(HEIGHT_ATTR,"5");
    endOnlyLayout.addIndexedChild(spacer);
    endOnlyLayout.addIndexedChild(ContextPoppingUINode.getUINode(INFO_SUPPLEMENTAL_CHILD));
    endOnlyLayout.setAttributeValue(RENDERED_ATTR,
                            new AndBoundValue(isEndRendered,
                              new NotBoundValue(isUserInfoRendered)));

    // place these two possibilities in a flowLayoutBean
    // one or the other child will be rendered if an end is rendered
    MarlinBean endLayout = new MarlinBean(FLOW_LAYOUT_NAME);
View Full Code Here

    BoundValue isUserInfoRendered
    )
  {
    // render table only if userInfo and no end region
    MarlinBean locatorUserTable = _sCreateLocatorUserInfoTable();
    BoundValue isUserInfoAndNoEnd = new AndBoundValue(isUserInfoRendered,
                                    new NotBoundValue(isEndRendered));
    locatorUserTable.setAttributeValue(RENDERED_ATTR, isUserInfoAndNoEnd);

    // render only the locator if locator and (no userInfo or end)
    MarlinBean locatorOnlyLayout = new MarlinBean(FLOW_LAYOUT_NAME);
    locatorOnlyLayout.addIndexedChild(
                        ContextPoppingUINode.getUINode(LOCATION_CHILD));
    BoundValue isEndOrNoUserInfo =
                    new OrBoundValue(isEndRendered,
                      new NotBoundValue(isUserInfoRendered));
    locatorOnlyLayout.setAttributeValue(
                        RENDERED_ATTR,
                          new AndBoundValue(isLocatorRendered,
                                              isEndOrNoUserInfo));
    // place these two possibilities in a flowLayoutBean
    // one or the other child will be rendered
    MarlinBean locatorUserLayout = new MarlinBean(FLOW_LAYOUT_NAME);
    locatorUserLayout.addIndexedChild(locatorUserTable);
View Full Code Here

   */
  public static BoundValue createIsRenderedBoundValue(
    BoundValue targetUINodeValue
    )
  {
    return new AndBoundValue
               (
                 ComparisonBoundValue.createExistsValue(targetUINodeValue),
                 new DefaultingBoundValue
                 (
                   new PoppedAttributeBoundValue(targetUINodeValue,
View Full Code Here

    // If no start child add quickSearch
    BoundValue hasNavigation3 = BaseDesktopUtils.createIsRenderedBoundValue(NAVIGATION3_CHILD);
    BoundValue hasSearch =
                      BaseDesktopUtils.createIsRenderedBoundValue(SEARCH_CHILD);
    BoundValue hasSearchAndNoNavigation3 =
                              new AndBoundValue( new NotBoundValue(hasNavigation3),
                                                 hasSearch);
    BoundValue hasNavigation3AndSearch = new AndBoundValue( hasNavigation3, hasSearch);

    MarlinBean qsNoStartFlow = new MarlinBean(FLOW_LAYOUT_NAME);
    UINode quickSearch = ContextPoppingUINode.getUINode(SEARCH_CHILD);
    qsNoStartFlow.addIndexedChild( quickSearch );
    qsNoStartFlow.setAttributeValue(RENDERED_ATTR,
                                    hasSearchAndNoNavigation3);

    MarlinBean pageHeader = _sCreatePageHeader(globalHeaders,
                                                         qsNoStartFlow);


    // @todo if there is a navigation3 child, the search should go in the sideBar,
    // however we need a search component that will lay itself out properly
    // for the reduced space of a sideBar before we do that.
    MarlinBean startRegionLayout = new MarlinBean(SIDE_BAR_NAME);
    startRegionLayout.addIndexedChild(
                                ContextPoppingUINode.getUINode(NAVIGATION3_CHILD));

    startRegionLayout.setAttributeValue(RENDERED_ATTR, hasNavigation3);

    //
    // Create the page content area
    //

    // If a start child quickSearch rendered on the top of content area
    MarlinBean qsStartStack = new MarlinBean(STACK_LAYOUT_NAME);
    MarlinBean qsSeparator = new MarlinBean(SEPARATOR_NAME);
    qsStartStack.addIndexedChild(quickSearch);
    qsStartStack.addIndexedChild(qsSeparator);
    qsStartStack.setAttributeValue(RENDERED_ATTR, hasNavigation3AndSearch);


    //
    // Create layout used for locators at the top of the page
    //
    MarlinBean locatorLayout = new MarlinBean(STACK_LAYOUT_NAME);

    MarlinBean topSpacer = new MarlinBean(SPACER_NAME);
    topSpacer.setAttributeValue(HEIGHT_ATTR,"5");

    BoundValue locatorBoundValue =
      RootChildBoundValue.getBoundValue(LOCATION_CHILD);

    BoundValue isLocatorRendered =
      BaseDesktopUtils.createIsRenderedBoundValue(locatorBoundValue);

    BoundValue isUserInfoRendered =
      BaseDesktopUtils.createIsRenderedBoundValue(INFO_USER_CHILD);

    BoundValue isEndRendered =
      BaseDesktopUtils.createIsRenderedBoundValue(INFO_SUPPLEMENTAL_CHILD);

    BoundValue hasTrainBean =
     new PageLayoutRenderer.TreeWalkerBoundValue( locatorBoundValue,
                                                  PROCESS_TRAIN_NAME );

    BoundValue isTrainRendered =
      new AndBoundValue(isLocatorRendered,
                        hasTrainBean);


    // only render the top spacer if the Locator is rendered
    topSpacer.setAttributeValue(RENDERED_ATTR, isLocatorRendered);
View Full Code Here

      new SkinTranslatedBoundValue(_SKIP_PAST_NAVIGATION);
    skipNavigationLink.setAttributeValue(DESTINATION_ATTR, "#"+skipNavigationAnchor);
    skipNavigationLink.setAttributeValue(UIConstants.TEXT_ATTR,
                                         skipNavigationText);
    skipNavigationLink.setAttributeValue(UIConstants.RENDERED_ATTR,
      new AndBoundValue(
        new PageLayoutRenderer.NetscapeBoundValue(Boolean.FALSE,
                               Boolean.TRUE),
        UseAccessibilityBoundValue.sharedInstance()));
    skipNavigationLink.setAttributeValue(STYLE_CLASS_ATTR,_ORA_HIDE_SKIP_NAVI_TEXT);
    return skipNavigationLink;
View Full Code Here

  {
    // render table only if both user info and end region
    MarlinBean userEndTable = _sCreateUserInfoEndTable();
    userEndTable.setAttributeValue(
                      RENDERED_ATTR,
                      new AndBoundValue(isEndRendered, isUserInfoRendered));

    // render end region only if no user info
    MarlinBean endOnlyLayout = new MarlinBean(STACK_LAYOUT_NAME);
    MarlinBean spacer = new MarlinBean(SPACER_NAME);
    spacer.setAttributeValue(HEIGHT_ATTR,"5");
    endOnlyLayout.addIndexedChild(spacer);
    endOnlyLayout.addIndexedChild(ContextPoppingUINode.getUINode(INFO_SUPPLEMENTAL_CHILD));
    endOnlyLayout.setAttributeValue(RENDERED_ATTR,
                            new AndBoundValue(isEndRendered,
                              new NotBoundValue(isUserInfoRendered)));

    // place these two possibilities in a flowLayoutBean
    // one or the other child will be rendered if an end is rendered
    MarlinBean endLayout = new MarlinBean(FLOW_LAYOUT_NAME);
View Full Code Here

    BoundValue isUserInfoRendered
    )
  {
    // render table only if userInfo and no end region
    MarlinBean locatorUserTable = _sCreateLocatorUserInfoTable();
    BoundValue isUserInfoAndNoEnd = new AndBoundValue(isUserInfoRendered,
                                    new NotBoundValue(isEndRendered));
    locatorUserTable.setAttributeValue(RENDERED_ATTR, isUserInfoAndNoEnd);

    // render only the locator if locator and (no userInfo or end)
    MarlinBean locatorOnlyLayout = new MarlinBean(FLOW_LAYOUT_NAME);
    locatorOnlyLayout.addIndexedChild(
                        ContextPoppingUINode.getUINode(LOCATION_CHILD));
    BoundValue isEndOrNoUserInfo =
                    new OrBoundValue(isEndRendered,
                      new NotBoundValue(isUserInfoRendered));
    locatorOnlyLayout.setAttributeValue(
                        RENDERED_ATTR,
                          new AndBoundValue(isLocatorRendered,
                                              isEndOrNoUserInfo));
    // place these two possibilities in a flowLayoutBean
    // one or the other child will be rendered
    MarlinBean locatorUserLayout = new MarlinBean(FLOW_LAYOUT_NAME);
    locatorUserLayout.addIndexedChild(locatorUserTable);
View Full Code Here

   */
  public static BoundValue createIsRenderedBoundValue(
    BoundValue targetUINodeValue
    )
  {
    return new AndBoundValue
               (
                 ComparisonBoundValue.createExistsValue(targetUINodeValue),
                 new DefaultingBoundValue
                 (
                   new PoppedAttributeBoundValue(targetUINodeValue,
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.ui.data.bind.AndBoundValue

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.