Examples of BoundValue


Examples of org.apache.myfaces.trinidadinternal.ui.data.BoundValue

    UINode backButton = null;

    // set up the back button
    if (showBackButton)
    {
      BoundValue buttonTextandAccessKeyBV =
                           new SkinTranslatedBoundValue( _SINGLE_BACK_TEXT_KEY);


      Object buttonTextBV = new AccessKeyBoundValue(buttonTextandAccessKeyBV,
                                                    false);

      Object buttonAccessKeyBV = new AccessKeyBoundValue(
                                                    buttonTextandAccessKeyBV,
                                                    true);

      if (supportsScripting)
      {
        component.setRowIndex(backButtonIndex);
        boolean immediate = Boolean.TRUE.equals(
                          stamp.getAttributes().get(UIXCommand.IMMEDIATE_KEY));
        Object destination = stamp.getAttributes().get("destination");
        component.setRowIndex(currentIndex);

        backButton = createSingleItemSubmitButton(
                                true,
                                buttonTextBV,
                                buttonAccessKeyBV,
                                destination,
                                ProcessUtils.getSubmitScriptCall(
                                    context,
                                    formName,
                                    eventKey,
                                    sourceKey,
                                    nameString,
                                    valueKey,
                                    selectedIndex - 1,
                                    sizeKey,
                                    0,
                                    !immediate,
                                    null,
                                    null));
      }
      else
      {
        backButton = ProcessUtils.createSubmitButton(context,
                                                     buttonTextBV,
                                                     buttonAccessKeyBV,
                                                     null,
                                                     formName,
                                                     false,
                                                     eventKey,
                                                     sourceKey,
                                                     nameString,
                                                     valueKey,
                                                     selectedIndex - 1,
                                                     sizeKey,
                                                     0);
      }
    }

    UINode nextButton = null;

     // set up the next button
    if (showNextButton)
    {

      String buttonTextKey = ((totalItems == 2)
                              ? _SINGLE_CONTINUE_TEXT_KEY
                              : _SINGLE_NEXT_TEXT_KEY);

      BoundValue buttonTextandAccessKeyBV =
                           new SkinTranslatedBoundValue(buttonTextKey);


      Object buttonTextBV = new AccessKeyBoundValue( buttonTextandAccessKeyBV,
                                                     false);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.data.BoundValue

                  new BaseMutableUINode(UIConstants.MARLIN_NAMESPACE,
                                        UIConstants.PAGE_NAVIGATION_TREE_NAME);
    navigationTree.setAttributeValue(UIConstants.START_LEVEL_ATTR,
                              3);

    BoundValue treeRenderedBV = new HasDataBoundValue(
                                  RootBoundValue.getBoundValue(), 3, true);
    navigationTree.setAttributeValue(UIConstants.RENDERED_ATTR, treeRenderedBV);
    // for PPR, an ID is required:
    navigationTree.setAttributeValue(UIConstants.ID_ATTR, new BoundValue()
    {
      public Object getValue(UIXRenderingContext context)
      {
        UINode pageNode = context.getParentContext().getAncestorNode(0);
        UIComponent component = pageNode.getUIComponent();
        return component.getClientId(context.getFacesContext()) +
               org.apache.myfaces.trinidadinternal.renderkit.uix.PageRenderer.TREE_SUFFIX;
      }
    }
                              );


    // add the list
    MutableUINode menuList =
                  new BaseMutableUINode(UIConstants.MARLIN_NAMESPACE,
                                        UIConstants.PAGE_MENU_LIST_NAME);
    menuList.setAttributeValue(UIConstants.LEVEL_ATTR,
                              3);
    BoundValue listRenderedBV = new HasDataBoundValue(
                                  RootBoundValue.getBoundValue(), 3, false);
    menuList.setAttributeValue(UIConstants.RENDERED_ATTR, listRenderedBV);


    MarlinBean navigation3Flow = new MarlinBean(UIConstants.FLOW_LAYOUT_NAME);
    navigation3Flow.addIndexedChild(menuList);
    navigation3Flow.addIndexedChild(navigationTree);
    navigation3Flow.setAttributeValue(UIConstants.RENDERED_ATTR,
                           new OrBoundValue(treeRenderedBV,listRenderedBV));
    pageLayout.setNamedChild(UIConstants.NAVIGATION3_CHILD, navigation3Flow);



    // add the path
    MutableUINode navigationPath =
                  new BaseMutableUINode(UIConstants.MARLIN_NAMESPACE,
                                        UIConstants.PAGE_NAVIGATION_PATH_NAME);

    BoundValue hasLocation =
          XhtmlLafUtils.createIsRenderedBoundValue(UIConstants.LOCATION_CHILD);
    navigationPath.setAttributeValue(UIConstants.RENDERED_ATTR,
                               new NotBoundValue(hasLocation));

View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.data.BoundValue

  private void _setURLAttribute(
    AttributeMap attrMap,
    PropertyKey  propKey,
    AttributeKey attrKey)
  {
    BoundValue propBV = new PropertyBoundValue(this, propKey);
    attrMap.setAttribute(attrKey, new URLBoundValue(propBV));
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.data.BoundValue

    Object accessKey = null;

    if (text == null)
    {

      BoundValue buttonTextandAccessKeyBV =
        new SkinTranslatedBoundValue("PPR_TRIGGER_LABEL");


      text = new AccessKeyBoundValue( buttonTextandAccessKeyBV, false);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.data.BoundValue

                                                         
    attrMap.setAttribute(UIConstants.VALIDATORS_ATTR,
                  new EntriesBoundValue(this, 
                                        UIXEditableValue.VALIDATORS_KEY));
                         
    BoundValue unvalidatedBV = new PropertyBoundValue(this,
                                             UIXEditableValue.IMMEDIATE_KEY);
    attrMap.setAttribute(UIConstants.UNVALIDATED_ATTR, unvalidatedBV);                                
    return  attrMap;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.data.BoundValue

    MarlinBean footer = new MarlinBean(FLOW_LAYOUT_NAME);
    MarlinBean footerLine = new MarlinBean(CONTENT_FOOTER_NAME);
    footer.addIndexedChild(footerLine);
    footer.addIndexedChild(footerTable);

    BoundValue renderFooter = new OrBoundValue(new BoundValue[]{
               PdaHtmlLafUtils.createIsRenderedBoundValue(APP_PRIVACY_CHILD),
               PdaHtmlLafUtils.createIsRenderedBoundValue(APP_ABOUT_CHILD),
               PdaHtmlLafUtils.createIsRenderedBoundValue(APP_COPYRIGHT_CHILD),
               PdaHtmlLafUtils.createIsRenderedBoundValue(NAVIGATION_GLOBAL_CHILD)
                   });
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.data.BoundValue

{
  @Override
  protected AttributeMap createAttributeMap(String componentFamily)
  {
    AttributeMap attrMap = super.createAttributeMap(componentFamily);
    BoundValue unvalidatedBV = new PropertyBoundValue(this,
                                             CoreCommandButton.IMMEDIATE_KEY);

    BoundValue partialBV = new PropertyBoundValue(this,
                                CoreCommandButton.PARTIAL_SUBMIT_KEY);

    attrMap.setAttribute(UIConstants.PRIMARY_CLIENT_ACTION_ATTR,
                         new FireActionBoundValue(getUIXComponent(),
                                                  unvalidatedBV,
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.data.BoundValue

  @Override
  protected AttributeMap createAttributeMap(String componentFamily)
  {
    AttributeMap attrMap = super.createAttributeMap(componentFamily);

    BoundValue unvalidatedBV = new PropertyBoundValue(this,
                                             CoreCommandLink.IMMEDIATE_KEY);
    BoundValue partialBV = new PropertyBoundValue(this,
                                CoreCommandLink.PARTIAL_SUBMIT_KEY);                                                                

    attrMap.setAttribute(UIConstants.PRIMARY_CLIENT_ACTION_ATTR,
                         getPrimaryClientActionBoundValue(getUIXComponent(),
                                                  unvalidatedBV,
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.data.BoundValue

    UIXComponent component,
    BoundValue   unvalidatedBV,
    BoundValue   partialBV
  )
  {
    BoundValue bv = new FireActionBoundValue(component,
                                             unvalidatedBV,
                                             partialBV);
    return bv;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.data.BoundValue

   * Returns the value associated with the selected value attribute
   */
  @Override
  protected String getSelectedValue(UIXRenderingContext context, UINode node)
  {
    BoundValue bv = new MenuChoiceSelectedValueBoundValue(
      NodeUtils.getUIComponent(context, node));
    return (String) bv.getValue(context);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.