本文整理汇总了Java中com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl.getPlaceBarName方法的典型用法代码示例。如果您正苦于以下问题:Java BasicApplicationConfigurationImpl.getPlaceBarName方法的具体用法?Java BasicApplicationConfigurationImpl.getPlaceBarName怎么用?Java BasicApplicationConfigurationImpl.getPlaceBarName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl
的用法示例。
在下文中一共展示了BasicApplicationConfigurationImpl.getPlaceBarName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writePlaceBarName
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
protected void writePlaceBarName(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration) throws IOException {
String placeName = configuration.getPlaceBarName();
if(StringUtil.isNotEmpty(placeName)) {
String placeBarNameTag = (String)getProperty(PROP_PLACEBARNAMETAG);
boolean isPlaceBarTag = StringUtil.isNotEmpty(placeBarNameTag);
if( isPlaceBarTag ){
w.startElement(placeBarNameTag,c);
String id = StringUtil.format("{0}_pbName", c.getClientId(context)); // $NON-NLS-1$
w.writeAttribute("id", id, null); // $NON-NLS-1$
String placeBarNameStyle = (String)getProperty(PROP_PLACEBARNAMESTYLE);
if( StringUtil.isNotEmpty(placeBarNameStyle) ){
w.writeAttribute("style",placeBarNameStyle,null); // $NON-NLS-1$
}
String placeBarNameClass = (String)getProperty(PROP_PLACEBARNAMECLASS);
if( StringUtil.isNotEmpty(placeBarNameClass) ){
w.writeAttribute("class", placeBarNameClass, null); //$NON-NLS-1$
}
}
w.writeText(placeName,null);
if( isPlaceBarTag ){
w.endElement(placeBarNameTag);
}
newLine(w);
}
}
示例2: writePlaceBarName
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
protected void writePlaceBarName(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration) throws IOException {
String placeName = configuration.getPlaceBarName();
if (StringUtil.isNotEmpty(placeName)) {
String placeBarNameTag = (String)getProperty(PROP_PLACEBARNAMETAG);
w.startElement(placeBarNameTag, c);
String id = StringUtil.format("{0}_pbName", c.getClientId(context)); // $NON-NLS-1$
w.writeAttribute("id", id, null); // $NON-NLS-1$
w.writeText(placeName, null);
w.endElement(placeBarNameTag);
newLine(w);
}
}
示例3: writePlaceBarName
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
@Override
protected void writePlaceBarName(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration) throws IOException {
String placeName = configuration.getPlaceBarName();
if (StringUtil.isNotEmpty(placeName)) {
String placeBarNameTag = "h4"; // $NON-NLS-1$
w.startElement(placeBarNameTag, c);
w.writeText(placeName, null);
w.endElement(placeBarNameTag);
newLine(w);
}
}
示例4: writeTitleBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
protected void writeTitleBar(final FacesContext context, final ResponseWriter w, final UIApplicationLayout layout, final BasicApplicationConfigurationImpl config) throws IOException {
List<ITreeNode> placeBarActions = config.getPlaceBarActions();
String title = config.getTitleBarName();
String subtitle = config.getPlaceBarName();
if(!(placeBarActions == null || placeBarActions.isEmpty()) || StringUtil.isNotEmpty(title) || StringUtil.isNotEmpty(subtitle)) {
w.startElement("div", layout);
w.writeAttribute("class", "page-header", null);
// Write out any placebar actions
ITree tree = TreeImpl.get(placeBarActions);
if(tree != null) {
newLine(w);
w.startElement("div", layout);
w.writeAttribute("class", "pull-right", null);
newLine(w);
AbstractTreeRenderer renderer = new AcePlaceBarLinksRenderer();
renderer.render(context, layout, "al", tree, w);
newLine(w);
w.endElement("div");
}
// Write out the titles
if(StringUtil.isNotEmpty(title) || StringUtil.isNotEmpty(subtitle)) {
w.startElement("h1", layout);
if(StringUtil.isNotEmpty(title)) {
w.writeText(title, null);
}
if(StringUtil.isNotEmpty(subtitle)) {
newLine(w);
w.startElement("small", null);
newLine(w);
w.startElement("i", null);
w.writeAttribute("class", "ace-icon fa fa-double-angle-right", null);
w.endElement("i");
newLine(w);
w.writeText(subtitle, null);
w.endElement("small");
}
w.endElement("h1");
}
w.endElement("div");
}
}
示例5: writePlaceBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
protected void writePlaceBar(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration) throws IOException {
w.startElement("div",c); // $NON-NLS-1$
w.writeAttribute("role", "region", null); // $NON-NLS-1$ $NON-NLS-2$
String placeBarName = configuration.getPlaceBarName();
if(StringUtil.isNotEmpty(placeBarName)) {
String placeBarNameTag = (String)getProperty(PROP_PLACEBARNAMETAG);
boolean isPlaceBarTag = StringUtil.isNotEmpty(placeBarNameTag);
if( isPlaceBarTag ){
String pbName_id = StringUtil.format("{0}_pbName", c.getClientId(context)); // $NON-NLS-1$
w.writeAttribute("aria-labelledby", pbName_id, null); // $NON-NLS-1$
}
}
String placeBarLabel = configuration.getPlaceBarLabel();
if (StringUtil.isNotEmpty(placeBarLabel)) {
w.writeAttribute("aria-label", placeBarLabel, null); // $NON-NLS-1$
}
String placeBarClass = (String)getProperty(PROP_PLACEBARCLASS);
if( StringUtil.isNotEmpty(placeBarClass) ){
w.writeAttribute("class",placeBarClass,null); // $NON-NLS-1$
}
newLine(w);
w.startElement("div",c); // $NON-NLS-1$
String placeBarTrailingCornerClass = (String)getProperty(PROP_PLACEBARTRAILINGCORNERCLASS);
if( StringUtil.isNotEmpty(placeBarTrailingCornerClass) ){
w.writeAttribute("class",placeBarTrailingCornerClass,null); // $NON-NLS-1$
}
newLine(w);
w.startElement("div",c); // $NON-NLS-1$
String placeBarInnerClass = (String)getProperty(PROP_PLACEBARINNERCLASS);
if( StringUtil.isNotEmpty(placeBarInnerClass) ){
w.writeAttribute("class",placeBarInnerClass,null); // $NON-NLS-1$
}
newLine(w);
writePlaceBarName(context, w, c, configuration);
UIComponent cPlaceBarName = c.getPlaceBarName();
if(!isEmptyComponent(cPlaceBarName)) {
if(DEBUG) {
w.writeComment("Start PlaceBarName Facet"); // $NON-NLS-1$
newLine(w);
}
FacesUtil.renderComponent(context, cPlaceBarName);
}
writePlaceBarActions(context, w, c, configuration);
UIComponent cPlaceBarActions = c.getPlaceBarActions();
if(!isEmptyComponent(cPlaceBarActions)) {
if(DEBUG) {
w.writeComment("Start PlaceBarActions Facet"); // $NON-NLS-1$
newLine(w);
}
w.startElement("div",c); // $NON-NLS-1$
w.writeAttribute("class", "lotusBtnContainer", null); //$NON-NLS-1$ $NON-NLS-2$
FacesUtil.renderComponent(context, cPlaceBarActions);
w.endElement("div"); // $NON-NLS-1$
}
// Close the place bar
w.endElement("div"); newLine(w,placeBarInnerClass); // $NON-NLS-1$
w.endElement("div"); newLine(w,placeBarTrailingCornerClass); // $NON-NLS-1$
w.endElement("div"); newLine(w,placeBarClass); // $NON-NLS-1$
}
示例6: writePlaceBar
import com.ibm.xsp.extlib.component.layout.impl.BasicApplicationConfigurationImpl; //导入方法依赖的package包/类
protected void writePlaceBar(FacesContext context, ResponseWriter w, UIApplicationLayout c, BasicApplicationConfigurationImpl configuration, String pageWidthClass) throws IOException {
w.startElement("div", c); // $NON-NLS-1$
w.writeAttribute("class", (String)getProperty(PROP_PLACEBARCLASS), null); // $NON-NLS-1$ $NON-NLS-2$
// Set A11y properties for the title bar
w.writeAttribute("role", "region", null); // $NON-NLS-1$ $NON-NLS-2$
String placeBarName = configuration.getPlaceBarName();
if(StringUtil.isNotEmpty(placeBarName)) {
// if titleBarName has been set = add aria-labelledby prop with id of titleBarName
String pbName_id = StringUtil.format("{0}_pbName", c.getClientId(context)); // $NON-NLS-1$
w.writeAttribute("aria-labelledby", pbName_id, null); // $NON-NLS-1$
}
String placeBarLabel = configuration.getPlaceBarLabel();
// if aria label has been set on place bar = add aria-label prop
// if no aria label set, but placeBarName is set = add aria-label prop with placeBarName value
// if no aria label set, and no placeBarName set = add aria-label prop with default value
String placeBarAriaLabel = (StringUtil.isNotEmpty(placeBarLabel) ? placeBarLabel
: (StringUtil.isNotEmpty(placeBarName) ? ""
: (String)getProperty(PROP_PLACEBARARIALABEL)));
if (StringUtil.isNotEmpty(placeBarAriaLabel)) {
w.writeAttribute("aria-label", placeBarAriaLabel, null); // $NON-NLS-1$
}
//container div
w.startElement("div", c); // $NON-NLS-1$
if(StringUtil.isNotEmpty(pageWidthClass)) {
w.writeAttribute("class", pageWidthClass, null); // $NON-NLS-1$
}
w.startElement("div", c); // $NON-NLS-1$
w.writeAttribute("class", "applayout-placebar-title", null); // $NON-NLS-1$ $NON-NLS-2$
writePlaceBarName(context, w, c, configuration);
UIComponent cPlaceBarName = c.getPlaceBarName();
if (!isEmptyComponent(cPlaceBarName)) {
if (DEBUG) {
w.writeComment("Start PlaceBarName Facet"); // $NON-NLS-1$
newLine(w);
}
FacesUtil.renderComponent(context, cPlaceBarName);
}
w.endElement("div"); // $NON-NLS-1$
w.startElement("div", c); // $NON-NLS-1$
w.writeAttribute("class", "navbar navbar-right applayout-placebar-actions", null); // $NON-NLS-1$ $NON-NLS-2$
String placeBarNavAriaLabel = (String)getProperty(PROP_PLACEBARACTIONSARIALABEL);
if( StringUtil.isNotEmpty(placeBarNavAriaLabel) ){
w.writeAttribute("aria-label", placeBarNavAriaLabel, null); // $NON-NLS-1$
}
String placeBarNavRole = (String)getProperty(PROP_PLACEBARACTIONSROLE);
if( StringUtil.isNotEmpty(placeBarNavRole) ){
w.writeAttribute("role", placeBarNavRole, null); // $NON-NLS-1$
}
writePlaceBarActions(context, w, c, configuration);
UIComponent cPlaceBarActions = c.getPlaceBarActions();
if (!isEmptyComponent(cPlaceBarActions)) {
if (DEBUG) {
w.writeComment("Start PlaceBarActions Facet"); // $NON-NLS-1$
newLine(w);
}
w.startElement("div", c); // $NON-NLS-1$
w.writeAttribute("class", "lotusBtnContainer", null); //$NON-NLS-1$ $NON-NLS-2$
FacesUtil.renderComponent(context, cPlaceBarActions);
w.endElement("div"); // $NON-NLS-1$
}
w.endElement("div"); // $NON-NLS-1$
// Close the banner
w.endElement("div"); // $NON-NLS-1$
w.endElement("div"); // $NON-NLS-1$
}