本文整理汇总了Java中com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl.getSearchBar方法的典型用法代码示例。如果您正苦于以下问题:Java BasicApplicationConfigurationImpl.getSearchBar方法的具体用法?Java BasicApplicationConfigurationImpl.getSearchBar怎么用?Java BasicApplicationConfigurationImpl.getSearchBar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl
的用法示例。
在下文中一共展示了BasicApplicationConfigurationImpl.getSearchBar方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeBannerContent
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
@Override
protected void writeBannerContent(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration) throws IOException {
boolean hasChildren = c.getChildCount() > 0;
ITree appLinks = TreeImpl.get(configuration.getBannerApplicationLinks());
ITree utilityLinks = TreeImpl.get(configuration.getBannerUtilityLinks());
String productLogo = configuration.getProductLogo();
SearchBar searchBar = configuration.getSearchBar();
boolean bannerHasContent = hasChildren || appLinks != null || utilityLinks != null || productLogo != null || searchBar != null;
if(bannerHasContent) {
writeBannerLink(context, w, c, configuration);
}
w.startElement("div", c); // $NON-NLS-1$
w.writeAttribute("class", ExtLibUtil.concatStyleClasses((String)getProperty(PROP_BANNER_COLLAPSE_CLASS), "collapse navbar-toggleable-sm"), null); // $NON-NLS-1$ $NON-NLS-2$
writeBannerProductlogo(context, w, c, configuration);
writeBannerApplicationLinks(context, w, c, configuration);
writeBannerUtilityLinks(context, w, c, configuration);
w.endElement("div"); // $NON-NLS-1$
}
示例2: writeBreadCrumbBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
protected void writeBreadCrumbBar(final FacesContext context, final ResponseWriter w, final UIApplicationLayout layout, final BasicApplicationConfigurationImpl config) throws IOException {
// This should render if breadcrumbs or search are present
SearchBar searchBar = config.getSearchBar();
UIComponent anyOldSearchBar = layout.getFacet("SearchBar");
UIComponent breadCrumbs = layout.getFacet("BreadCrumbs");
boolean rendered = searchBar != null || anyOldSearchBar != null || breadCrumbs != null;
if(rendered) {
newLine(w);
w.startElement("div", layout);
w.writeAttribute("class", "breadcrumbs" + (isFixedLayout(layout) ? " breadcrumbs-fixed" : ""), null);
w.writeAttribute("id", "breadcrumbs", null);
if(breadCrumbs != null) {
writeBreadCrumbs(context, w, layout, config, breadCrumbs);
}
if(anyOldSearchBar != null) {
writeAnyOldSearchBar(context, w, layout, config, anyOldSearchBar);
} else if(searchBar != null) {
writeSearchBar(context, w, layout, config, searchBar);
}
newLine(w);
w.endElement("div");
w.writeComment("/.breadcrumbs");
}
}
示例3: writeSearchBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的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$
}
}
示例4: writeTitleBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的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$
}
}
示例5: writeSearchBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的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);
}
}
}
示例6: writeTitleBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的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$
}
}