当前位置: 首页>>代码示例>>Java>>正文


Java SearchBar.isRendered方法代码示例

本文整理汇总了Java中com.ibm.xsp.extlib.component.layout.impl.SearchBar.isRendered方法的典型用法代码示例。如果您正苦于以下问题:Java SearchBar.isRendered方法的具体用法?Java SearchBar.isRendered怎么用?Java SearchBar.isRendered使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.ibm.xsp.extlib.component.layout.impl.SearchBar的用法示例。


在下文中一共展示了SearchBar.isRendered方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeNavbarLink

import com.ibm.xsp.extlib.component.layout.impl.SearchBar; //导入方法依赖的package包/类
protected void writeNavbarLink(FacesContext context, ResponseWriter w, UIApplicationLayout c, SimpleResponsiveApplicationConfiguration configuration) throws IOException {
    List<ITreeNode> utilLinks = configuration.getNavbarUtilityLinks();
    List<ITreeNode> appLinks  = configuration.getNavbarAppLinks();
    SearchBar searchBar       = configuration.getSearchBar();
    
    if((utilLinks != null && utilLinks.size() > 0) || (appLinks != null && appLinks.size() > 0) || (searchBar != null && searchBar.isRendered())) {
        w.startElement("button", c); // $NON-NLS-1$
        w.writeAttribute("type", "button",  null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("aria-label",(String)getProperty(PROP_BANNER_COLLAPSE_BUTTON_ARIALABEL),  null); // $NON-NLS-1$
        w.writeAttribute("class", "navbar-toggle", null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("data-toggle", "collapse", null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("data-target", "." + getProperty(PROP_BANNER_COLLAPSE_CLASS), null); // $NON-NLS-1$
        
        w.startElement("span", c); // $NON-NLS-1$
        w.writeAttribute("class", "sr-only", null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeText((String)getProperty(PROP_BANNER_COLLAPSE_BUTTON_ARIALABEL),  null); // $NON-NLS-1$
        w.endElement("span"); // $NON-NLS-1$
        
        w.startElement("span", c); // $NON-NLS-1$
        w.writeAttribute("class", "icon-bar", null); // $NON-NLS-1$ $NON-NLS-2$
        w.endElement("span"); // $NON-NLS-1$
        w.startElement("span", c); // $NON-NLS-1$
        w.writeAttribute("class", "icon-bar", null); // $NON-NLS-1$ $NON-NLS-2$
        w.endElement("span"); // $NON-NLS-1$
        w.startElement("span", c); // $NON-NLS-1$
        w.writeAttribute("class", "icon-bar", null); // $NON-NLS-1$ $NON-NLS-2$
        w.endElement("span"); // $NON-NLS-1$
        
        w.endElement("button"); // $NON-NLS-1$
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:32,代码来源:SimpleResponsiveLayoutRenderer.java

示例2: writeNavbarLink

import com.ibm.xsp.extlib.component.layout.impl.SearchBar; //导入方法依赖的package包/类
@Override
protected void writeNavbarLink(FacesContext context, ResponseWriter w, UIApplicationLayout c, SimpleResponsiveApplicationConfiguration configuration) throws IOException {
    List<ITreeNode> utilLinks = configuration.getNavbarUtilityLinks();
    List<ITreeNode> appLinks  = configuration.getNavbarAppLinks();
    SearchBar searchBar       = configuration.getSearchBar();
    String navbarLogo         = configuration.getNavbarLogo();
    String navbarText         = configuration.getNavbarText();
    
    if( (navbarLogo != null && navbarLogo.length() > 0) ||
        (navbarText != null && navbarText.length() > 0) ||
        (utilLinks != null && utilLinks.size() > 0)     || 
        (appLinks != null && appLinks.size() > 0)       || 
        (searchBar != null && searchBar.isRendered())) {
        
        w.startElement("button", c); // $NON-NLS-1$
        w.writeAttribute("type",  "button",  null); // $NON-NLS-1$ $NON-NLS-2$
        
        //Add the necessary attributes to the button to make it a Bootstrap dropdown menu button
        w.writeAttribute("class", "navbar-toggler hidden-md-up", null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("data-toggle", "collapse", null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("data-target", "." + getProperty(PROP_BANNER_COLLAPSE_CLASS), null); // $NON-NLS-1$ $NON-NLS-2$

        //Add the unicode character for the 3 horizontal lines that make the button
        w.writeText('\u2630', null); // $NON-NLS-1$
        w.endElement("button"); // $NON-NLS-1$
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtLibX,代码行数:28,代码来源:SimpleResponsiveLayoutRenderer.java

示例3: writeSearchBar

import com.ibm.xsp.extlib.component.layout.impl.SearchBar; //导入方法依赖的package包/类
@Override
protected void writeSearchBar(FacesContext context, ResponseWriter w, UIApplicationLayout c, SimpleResponsiveApplicationConfiguration configuration) throws IOException {
    UIComponent cSearchBar = c.getSearchBar();
    if (!isEmptyComponent(cSearchBar)) {
        w.startElement("div", c); // $NON-NLS-1$
        w.writeAttribute("class","form-inline navbar-form pull-xs-right applayout-searchbar",null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("role", "search", null); // $NON-NLS-1$ $NON-NLS-2$
        FacesUtil.renderComponent(context, cSearchBar);
        w.endElement("div"); // $NON-NLS-1$
        return;
    }

    SearchBar searchBar = configuration.getSearchBar();
    if (searchBar != null && searchBar.isRendered()) {
        w.startElement("div", c); // $NON-NLS-1$
        w.writeAttribute("class","form-inline navbar-form pull-xs-right applayout-searchbar",null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("role", "search", null); // $NON-NLS-1$ $NON-NLS-2$
        
        w.startElement("div", c); // $NON-NLS-1$
        w.writeAttribute("class","input-group",null); // $NON-NLS-1$ $NON-NLS-2$
        
        boolean searchOptions = false;
        ITree tree = TreeImpl.get(searchBar.getOptions());
        if (tree != null) {
            searchOptions = true;
        }

        // Write the search options
        if (searchOptions) {
            writeSearchOptions(context, w, c, configuration, searchBar, tree);
        }
        
        // Write the search box
        writeSearchBox(context, w, c, configuration, searchBar, tree, searchOptions);
        writeSearchButton(context, w, c, configuration, searchBar, tree, searchOptions);

        w.endElement("div"); // $NON-NLS-1$
        w.endElement("div"); // $NON-NLS-1$
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtLibX,代码行数:41,代码来源:SimpleResponsiveLayoutRenderer.java

示例4: writeSearchBar

import com.ibm.xsp.extlib.component.layout.impl.SearchBar; //导入方法依赖的package包/类
@Override
protected void writeSearchBar(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration) throws IOException {
    UIComponent cSearchBar = c.getSearchBar();
    if (!isEmptyComponent(cSearchBar)) {
        w.startElement("div", c); // $NON-NLS-1$
        w.writeAttribute("class","form-inline navbar-form pull-right applayout-searchbar",null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("role", "search", null); // $NON-NLS-1$ $NON-NLS-2$
        FacesUtil.renderComponent(context, cSearchBar);
        w.endElement("div"); // $NON-NLS-1$
        return;
    }

    SearchBar searchBar = configuration.getSearchBar();
    if (searchBar != null && searchBar.isRendered()) {
        w.startElement("div", c); // $NON-NLS-1$
        w.writeAttribute("class","form-inline navbar-form pull-right applayout-searchbar",null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("role", "search", null); // $NON-NLS-1$ $NON-NLS-2$

        w.startElement("div", c); // $NON-NLS-1$
        w.writeAttribute("class","input-group",null); // $NON-NLS-1$ $NON-NLS-2$
      
        boolean searchOptions = false;
        ITree tree = TreeImpl.get(searchBar.getOptions());
        if (tree != null) {
            searchOptions = true;
        }

        // Write the search options
        if (searchOptions) {
            writeSearchOptions(context, w, c, configuration, searchBar, tree);
        }
        
        // Write the search box
        writeSearchBox(context, w, c, configuration, searchBar, tree, searchOptions);
        writeSearchButton(context, w, c, configuration, searchBar, tree, searchOptions);
        
        w.endElement("div"); // $NON-NLS-1$
        w.endElement("div"); // $NON-NLS-1$
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtLibX,代码行数:41,代码来源:ResponsiveAppLayoutRenderer.java

示例5: writeSearchBar

import com.ibm.xsp.extlib.component.layout.impl.SearchBar; //导入方法依赖的package包/类
protected void writeSearchBar(FacesContext context, ResponseWriter w, UIApplicationLayout c, SimpleResponsiveApplicationConfiguration configuration) throws IOException {
    UIComponent cSearchBar = c.getSearchBar();
    if (!isEmptyComponent(cSearchBar)) {
        if (DEBUG) {
            w.writeComment("Start SearchBar Facet"); // $NON-NLS-1$
            newLine(w);
        }
        w.startElement("div", c); // $NON-NLS-1$
        w.writeAttribute("class","col-sm-2 col-md-2 navbar-search navbar-right applayout-searchbar",null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("role", "search", null); // $NON-NLS-1$ $NON-NLS-2$
        FacesUtil.renderComponent(context, cSearchBar);
        w.endElement("div"); // $NON-NLS-1$
        if (DEBUG) {
            w.writeComment("End SearchBar Facet"); // $NON-NLS-1$
            newLine(w);
        }
        return;
    }

    SearchBar searchBar = configuration.getSearchBar();
    if (searchBar != null && searchBar.isRendered()) {
        w.startElement("div", c); // $NON-NLS-1$
        w.writeAttribute("class","col-sm-3 col-md-2 navbar-search navbar-right input-group applayout-searchbar",null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("role", "search", null); // $NON-NLS-1$ $NON-NLS-2$
        newLine(w);

        boolean searchOptions = false;
        ITree tree = TreeImpl.get(searchBar.getOptions());
        if (tree != null) {
            searchOptions = true;
        }

        // Write the search options
        if (searchOptions) {
            writeSearchOptions(context, w, c, configuration, searchBar, tree);
        }
        
        // Write the search box
        writeSearchBox(context, w, c, configuration, searchBar, tree, searchOptions);
        writeSearchButton(context, w, c, configuration, searchBar, tree, searchOptions);
        
        w.endElement("div"); // $NON-NLS-1$
        newLine(w);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:46,代码来源:SimpleResponsiveLayoutRenderer.java

示例6: writeTitleBar

import com.ibm.xsp.extlib.component.layout.impl.SearchBar; //导入方法依赖的package包/类
protected void writeTitleBar(FacesContext context, ResponseWriter w, UIApplicationLayout c, 
        BasicApplicationConfigurationImpl configuration, String pageWidthClass) throws IOException {
    ITree tree = TreeImpl.get(configuration.getTitleBarTabs());
    SearchBar searchBar = configuration.getSearchBar();
    UIComponent searchBarFacet = c.getSearchBar();
    String titleBarName = configuration.getTitleBarName();
    
    //If there is no titleBarName, seachbar or tabs to be displayed, dont render the titleBar
    if (StringUtil.isNotEmpty(titleBarName) || tree != null || (searchBar != null && searchBar.isRendered()) || null != searchBarFacet) {
        String titleBarTag = (String)getProperty(PROP_TITLEBARTAG);
        w.startElement(titleBarTag,c); // $NON-NLS-1$
        w.writeAttribute("role", "region", null); // $NON-NLS-1$ $NON-NLS-2$
        
        // Set A11y properties for the title bar
        String tbName_id = StringUtil.format("{0}_tbName", c.getClientId(context)); // $NON-NLS-1$
        if( StringUtil.isNotEmpty(titleBarName) ) {
            // if titleBarName has been set = add aria-labelledby prop with id of titleBarName
            w.writeAttribute("aria-labelledby", tbName_id, null); // $NON-NLS-1$
        }
        
        String titleBarLabel = configuration.getTitleBarLabel();
        // if aria label has been set on title bar = add aria-label prop
        // if no aria label set, but titleBarName is set = add aria-label prop with titleBarName text value
        // if no aira label set, and no titleBarName set = add aria-label prop with default value
        String titleBarAriaLabel = (StringUtil.isNotEmpty(titleBarLabel) ? titleBarLabel 
                                      : (StringUtil.isNotEmpty(titleBarName) ? ""
                                          : (String)getProperty(PROP_TITLEBARARIALABEL)));
        if( StringUtil.isNotEmpty(titleBarAriaLabel)) {
            w.writeAttribute("aria-label", titleBarAriaLabel, null); // $NON-NLS-1$
        }
        
        //Check if the titlebar has tabs. If none, add bottom border
        String titleBarClass = (String)getProperty(PROP_TITLEBARCLASS);
        if(tree == null){
            titleBarClass = ExtLibUtil.concatStyleClasses((String)getProperty(PROP_TITLEBARCLASS), "applayout-titlebar-border"); // $NON-NLS-1$
        }
        if( StringUtil.isNotEmpty(titleBarClass) ){
            w.writeAttribute("class",titleBarClass,null); // $NON-NLS-1$
        }
        
        //container div
        w.startElement("div", c); // $NON-NLS-1$
        String titleClass = ExtLibUtil.concatStyleClasses(pageWidthClass, "applayout-titlebar-inner"); // $NON-NLS-1$
        w.writeAttribute("class", titleClass , null); // $NON-NLS-1$
        
        writeSearchBar(context, w, c, configuration);
        
        if( StringUtil.isNotEmpty(titleBarName)) {
            w.startElement("h4",c); //$NON-NLS-1$
            w.writeAttribute("id", tbName_id, null); // $NON-NLS-1$
            if (tree != null) {
                w.writeAttribute("class","applayout-titlebar-name",null); // $NON-NLS-1$ $NON-NLS-2$
            }else{
                w.writeAttribute("class","applayout-titlebar-name applayout-titlebar-name-padding",null); // $NON-NLS-1$ $NON-NLS-2$
            }
            
            w.writeAttribute("title",titleBarName,null); // $NON-NLS-1$
            w.write(titleBarName);
            w.endElement("h4"); //$NON-NLS-1$
            newLine(w);
        }

        writeTitleBarTabsArea(context, w, c, configuration);

        // Close the banner
        w.endElement("div"); // $NON-NLS-1$
        w.endElement("div"); // $NON-NLS-1$
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:70,代码来源:ResponsiveAppLayoutRenderer.java

示例7: writeSearchBar

import com.ibm.xsp.extlib.component.layout.impl.SearchBar; //导入方法依赖的package包/类
protected void writeSearchBar(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration) throws IOException {
    UIComponent cSearchBar = c.getSearchBar();
    if (!isEmptyComponent(cSearchBar)) {
        if (DEBUG) {
            w.writeComment("Start SearchBar Facet"); // $NON-NLS-1$
            newLine(w);
        }
        w.startElement("div", c); // $NON-NLS-1$
        w.writeAttribute("class","col-md-4 navbar-search navbar-right applayout-searchbar",null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("role", "search", null); // $NON-NLS-1$ $NON-NLS-2$
        FacesUtil.renderComponent(context, cSearchBar);
        w.endElement("div"); // $NON-NLS-1$
        if (DEBUG) {
            w.writeComment("End SearchBar Facet"); // $NON-NLS-1$
            newLine(w);
        }
        return;
    }

    SearchBar searchBar = configuration.getSearchBar();
    if (searchBar != null && searchBar.isRendered()) {
        if (DEBUG) {
            w.writeComment("Start Search Bar"); // $NON-NLS-1$
            newLine(w);
        }
        w.startElement("div", c); // $NON-NLS-1$
        w.writeAttribute("class","col-md-4 navbar-search navbar-right input-group applayout-searchbar",null); // $NON-NLS-1$ $NON-NLS-2$
        w.writeAttribute("role", "search", null); // $NON-NLS-1$ $NON-NLS-2$
        newLine(w);

        boolean searchOptions = false;
        ITree tree = TreeImpl.get(searchBar.getOptions());
        if (tree != null) {
            searchOptions = true;
        }

        // Write the search options
        if (searchOptions) {
            writeSearchOptions(context, w, c, configuration, searchBar, tree);
        }
        
        // Write the search box
        writeSearchBox(context, w, c, configuration, searchBar, tree, searchOptions);
        writeSearchButton(context, w, c, configuration, searchBar, tree, searchOptions);
        
        w.endElement("div"); // $NON-NLS-1$
        newLine(w);
        if (DEBUG) {
            w.writeComment("End Search Bar"); // $NON-NLS-1$
            newLine(w);
        }
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:54,代码来源:ResponsiveAppLayoutRenderer.java

示例8: writeTitleBar

import com.ibm.xsp.extlib.component.layout.impl.SearchBar; //导入方法依赖的package包/类
@Override
protected void writeTitleBar(FacesContext context, ResponseWriter w, UIApplicationLayout c, 
        BasicApplicationConfigurationImpl configuration, String pageWidthClass) throws IOException {
    ITree tree = TreeImpl.get(configuration.getTitleBarTabs());
    SearchBar searchBar = configuration.getSearchBar();
    String titleBarName = configuration.getTitleBarName();
    
    //If there is no titleBarName, seachbar or tabs to be displayed, dont render the titleBar
    if (StringUtil.isNotEmpty(titleBarName) || tree != null || (searchBar != null && searchBar.isRendered())) {
        w.startElement("div", c); // $NON-NLS-1$
        
        //Check if the titlebar has tabs. If none, add bottom border
        if (tree != null) {
            w.writeAttribute("class", "navbar navbar-static-top applayout-titlebar", null); // $NON-NLS-1$ $NON-NLS-2$
        }else{
            w.writeAttribute("class", "navbar navbar-static-top applayout-titlebar applayout-titlebar-border", null); // $NON-NLS-1$ $NON-NLS-2$
        }
        newLine(w);
        
        //container div
        w.startElement("div", c); // $NON-NLS-1$
        String titleClass = ExtLibUtil.concatStyleClasses(pageWidthClass, "applayout-titlebar-inner"); // $NON-NLS-1$
        w.writeAttribute("class", titleClass , null); // $NON-NLS-1$
        
        writeSearchBar(context, w, c, configuration);
        
        if( StringUtil.isNotEmpty(titleBarName)) {
            // #Bootstrap4 Add navbar-brand div around TitleBarName
            w.startElement("div", c); // $NON-NLS-1$
            w.writeAttribute("class","navbar-brand",null); // $NON-NLS-1$ $NON-NLS-2$
            
            w.startElement("h4",c); //$NON-NLS-1$
            if (tree != null) {
                w.writeAttribute("class","applayout-titlebar-name",null); // $NON-NLS-1$ $NON-NLS-2$
            }else{
                w.writeAttribute("class","applayout-titlebar-name applayout-titlebar-name-padding",null); // $NON-NLS-1$ $NON-NLS-2$
            }
            
            w.writeAttribute("title",titleBarName,null); // $NON-NLS-1$
            w.write(titleBarName);
            w.endElement("h4"); //$NON-NLS-1$
            w.endElement("div"); // $NON-NLS-1$
        }

        writeTitleBarTabsArea(context, w, c, configuration);

        // Close the banner
        w.endElement("div"); // $NON-NLS-1$
        w.endElement("div"); // $NON-NLS-1$
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtLibX,代码行数:52,代码来源:ResponsiveAppLayoutRenderer.java


注:本文中的com.ibm.xsp.extlib.component.layout.impl.SearchBar.isRendered方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。