• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java FacesUtil类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.ibm.xsp.util.FacesUtil的典型用法代码示例。如果您正苦于以下问题:Java FacesUtil类的具体用法?Java FacesUtil怎么用?Java FacesUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FacesUtil类属于com.ibm.xsp.util包,在下文中一共展示了FacesUtil类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: writeAuthorName

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
@Override
protected void writeAuthorName(final FacesContext context, final ResponseWriter w, final UIForumPost c, final UIComponent facet) throws IOException {
	w.startElement("div", null); // div.name
	String styleClass = (String)getProperty(PROP_AUTHORNAMECLASS);
	if(StringUtil.isNotEmpty(styleClass)) {
		w.writeAttribute("class", styleClass, null);
	}
	String style = (String)getProperty(PROP_AUTHORNAMESTYLE);
	if(StringUtil.isNotEmpty(style)) {
		w.writeAttribute("style", style, null);
	}

	FacesUtil.renderComponent(context, facet);

	w.endElement("div");
}
 
开发者ID:jesse-gallagher,项目名称:Miscellany,代码行数:17,代码来源:AceForumPostRenderer.java


示例2: writeAuthorMeta

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
@Override
protected void writeAuthorMeta(final FacesContext context, final ResponseWriter w, final UIForumPost c, final UIComponent facet) throws IOException {
	w.startElement("div", null); // div.name
	String styleClass = (String)getProperty(PROP_AUTHORMETACLASS);
	if(StringUtil.isNotEmpty(styleClass)) {
		w.writeAttribute("class", styleClass, null);
	}
	String style = (String)getProperty(PROP_AUTHORMETASTYLE);
	if(StringUtil.isNotEmpty(style)) {
		w.writeAttribute("style", style, null);
	}

	FacesUtil.renderComponent(context, facet);

	w.endElement("div");
}
 
开发者ID:jesse-gallagher,项目名称:Miscellany,代码行数:17,代码来源:AceForumPostRenderer.java


示例3: writeDetail

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
@Override
protected void writeDetail(final FacesContext context, final ResponseWriter w, final AbstractDataView c, final ViewDefinition viewDef) throws IOException {
	if(!viewDef.hasDetail) {
		return;
	}
	// If the detail should not be displayed, then leave
	boolean detailVisible = viewDef.rowDetailVisible;
	if(!detailVisible && !viewDef.detailsOnClient) {
		return;
	}

	UIComponent detail = viewDef.detailFacet;
	if(detail != null) {
		FacesUtil.renderComponent(context, detail);
	}
}
 
开发者ID:jesse-gallagher,项目名称:Miscellany,代码行数:17,代码来源:AceForumViewRenderer.java


示例4: restoreView

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
@Override
public UIViewRoot restoreView(FacesContext context, String viewId, String renderKitId) {
	SerializedView serView = restore();
	
	Node node = (Node) serView.getStructure();
	try {
		UIViewRoot root = (UIViewRoot) node.restore(ClassLoaderUtil.getContextClassLoader(StateManagerTestImpl.class));
		FacesUtil.setRestoreRoot(context, root);
		UIViewRoot old = context.getViewRoot();
		try {
			context.setViewRoot(root);
			root.processRestoreState(context, serView.getState());
		} finally {
			context.setViewRoot(old);
		}
           FacesUtil.setRestoreRoot(context, null);
		return root;
	} catch(Exception e) {
		throw new FacesExceptionEx(e);
	}
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:22,代码来源:StateManagerTestImpl.java


示例5: openView

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
public Container openView(final FacesContext context) throws IOException {
	MethodBinding queryOpenView = getQueryOpenView();
	if (queryOpenView != null && FacesUtil.isCancelled(queryOpenView.invoke(context, null))) {
		return null;
	}

	ModelManager<?> manager = ModelUtils.findModelManager(context, managerName_);
	Object listObject = manager.getValue(key_);
	if(listObject == null) {
		throw new IOException("Received null value when retrieving list object from manager using key '" + key_ + "'");
	}
	if(!(listObject instanceof AbstractModelList)) {
		throw new IOException("Retrieved non-model-list object from manager using key '" + key_ + "'");
	}

	Container container = new Container(getBeanId(), getUniqueId(), (AbstractModelList<?>)listObject);

	MethodBinding postOpenView = getPostOpenView();
	if(postOpenView != null) {
		postOpenView.invoke(context, null);
	}

	return container;
}
 
开发者ID:jesse-gallagher,项目名称:Miscellany,代码行数:25,代码来源:ModelListDataSource.java


示例6: initDojoAttributes

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
protected void initDojoAttributes(FacesContext context, FacesDojoComponent dojoComponent, Map<String,String> attrs) throws IOException {
    if(dojoComponent instanceof UITooltip) {
        UITooltip c = (UITooltip)dojoComponent;
        DojoRendererUtil.addDojoHtmlAttributes(attrs,"label",c.getLabel()); // $NON-NLS-1$
        
        if(c.getShowDelay() != 0 )
            DojoRendererUtil.addDojoHtmlAttributes(attrs,"showDelay",c.getShowDelay()); // $NON-NLS-1$
        
        String _for = c.getFor();
        if(StringUtil.isNotEmpty(_for)) {
            UIComponent f = FacesUtil.getComponentFor(c, _for);
            if(f==null) {
                
                throw new FacesExceptionEx(null,"Unknown 'for' component {0}", _for); // $NLX-TooltipRenderer.Unknownforcomponent0-1$
            }
            DojoRendererUtil.addDojoHtmlAttributes(attrs,"connectId",f.getClientId(context)); // $NON-NLS-1$
        }
        DojoRendererUtil.addDojoHtmlAttributes(attrs,"position",c.getPosition()); // $NON-NLS-1$
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:21,代码来源:TooltipRenderer.java


示例7: writeAuthorName

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
protected void writeAuthorName(FacesContext context, ResponseWriter w, UIForumPost c, UIComponent facet) throws IOException {
    if(facet==null) {
        return;
    }
    w.startElement("div", c); // $NON-NLS-1$
    String style = (String)getProperty(PROP_AUTHORNAMESTYLE);
    if(StringUtil.isNotEmpty(style)) {
        w.writeAttribute("style", style, null); // $NON-NLS-1$
    }
    String styleClass = (String)getProperty(PROP_AUTHORNAMECLASS);
    if(StringUtil.isNotEmpty(styleClass)) {
        w.writeAttribute("class", styleClass, null); // $NON-NLS-1$
    }
    FacesUtil.renderComponent(context, facet);
    w.endElement("div"); // $NON-NLS-1$
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:17,代码来源:ForumPostRenderer.java


示例8: writeIconColumn

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
@Override
protected void writeIconColumn(FacesContext context, ResponseWriter w,
        AbstractDataView c, ViewDefinition viewDef) throws IOException {
    if (viewDef.iconFacet != null) {
        w.startElement("div", c); // $NON-NLS-1$

        if (viewDef.iconColumn != null) {
            String colStyle = viewDef.iconColumn.getStyle();
            if (StringUtil.isNotEmpty(colStyle)) {
                w.writeAttribute("style", colStyle, null); // $NON-NLS-1$
            }
            String colClazz = viewDef.iconColumn.getStyleClass();
            if (!viewDef.hasCheckBoxColumn) {
                colClazz = ExtLibUtil.concatStyleClasses(colClazz,
                        (String) getProperty(PROP_TABLEFIRSTCELLCLASS));
            }
            if (StringUtil.isNotEmpty(colClazz)) {
                w.writeAttribute("class", colClazz, null); // $NON-NLS-1$
            }
        }

        FacesUtil.renderComponent(context, viewDef.iconFacet);

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


示例9: writePostTitle

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
protected void writePostTitle(FacesContext context, ResponseWriter w, UIForumPost c, UIComponent facet) throws IOException {
    if(facet==null) {
        return;
    }
    w.startElement("div", c); // $NON-NLS-1$
    String style = (String)getProperty(PROP_POSTTITLESTYLE);
    if(StringUtil.isNotEmpty(style)) {
        w.writeAttribute("style", style, null); // $NON-NLS-1$
    }
    String styleClass = (String)getProperty(PROP_POSTTITLECLASS);
    if(StringUtil.isNotEmpty(styleClass)) {
        w.writeAttribute("class", styleClass, null); // $NON-NLS-1$
    }
    FacesUtil.renderComponent(context, facet);
    w.endElement("div"); // $NON-NLS-1$
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:17,代码来源:ForumPostRenderer.java


示例10: writePostMeta

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
protected void writePostMeta(FacesContext context, ResponseWriter w, UIForumPost c, UIComponent facet) throws IOException {
    if(facet==null) {
        return;
    }
    w.startElement("div", c); // $NON-NLS-1$
    String style = (String)getProperty(PROP_POSTMETASTYLE);
    if(StringUtil.isNotEmpty(style)) {
        w.writeAttribute("style", style, null); // $NON-NLS-1$
    }
    String styleClass = (String)getProperty(PROP_POSTMETACLASS);
    if(StringUtil.isNotEmpty(styleClass)) {
        w.writeAttribute("class", styleClass, null); // $NON-NLS-1$
    }
    FacesUtil.renderComponent(context, facet);
    w.endElement("div"); // $NON-NLS-1$
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:17,代码来源:ForumPostRenderer.java


示例11: writeHeader

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
@Override
protected void writeHeader(FacesContext context, ResponseWriter w, UIWidgetContainer c) throws IOException {
    UIComponent header = c.getFacet(UIWidgetContainer.FACET_HEADER);
    if(header!=null) {
        String tag = (String)getProperty(PROP_TAGHEADER);
        w.startElement(tag, c);

        //TODO Possible bug in extlib WidgetContainer. PROP_CSSHEADER & PROP_CSSSCROLLUP are
        //both set to the same property value (41). Overriding the writeHeader method to fix it here
        //but it may need to be fixed in extlib instead
        String cls = (String)getProperty(PROP_CSSHEADERCLASS);
        if(StringUtil.isNotEmpty(cls)) {
            w.writeAttribute("class", cls, null); // $NON-NLS-1$
        }
        FacesUtil.renderChildren(context, header);
        
        w.endElement(tag);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:20,代码来源:WidgetContainerRenderer.java


示例12: findViewKey

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
protected String findViewKey(FacesContext context) throws NotesException {
    // Find the data store and the view it points to
    String storeId = getStoreComponentId();
    if(StringUtil.isNotEmpty(storeId)) {
        UIComponent c = FacesUtil.getComponentFor(this, storeId);
        if(c instanceof UIRestService) {
            IRestService svc = ((UIRestService)c).getService();
            if(svc instanceof DominoViewService) {
                String databaseName = ((DominoViewService)svc).getDatabaseName();
                String viewName = ((DominoViewService)svc).getViewName();
                return ViewDesign.getViewKey(databaseName, viewName);
            }
        }
    }
    return null;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:17,代码来源:UIListView.java


示例13: writeBodyContent

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
protected void writeBodyContent(FacesContext context, ResponseWriter w, UIWidgetContainer c) throws IOException {
    FacesUtil.renderChildren(context, c);
    if( c.getChildCount() == 0 ){
        boolean isBodyPreventBlank = (Boolean) getProperty(PROP_BODY_PREVENT_BLANK);
        if( isBodyPreventBlank ){
            JSUtil.writeTextBlank(w); // &nbsp;
        }
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:10,代码来源:WidgetContainerRenderer.java


示例14: findDojoWidgetId

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
public static String findDojoWidgetId(FacesContext context, UIComponent from, String componentId) {
    if(StringUtil.isNotEmpty(componentId)) {
        UIComponent sc = FacesUtil.getComponentFor(from, componentId);
        if( null == sc ){
            return null;
        }
        if(!(sc instanceof FacesExtlibJsIdWidget)) {
            Object jsId = sc.getAttributes().get("jsId"); //$NON-NLS-1$
            if( jsId instanceof String ){
                return (String)jsId;
            }
        }
        return ((FacesExtlibJsIdWidget)sc).getDojoWidgetJsId(context);
    }
    return null;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:17,代码来源:ExtlibJsIdUtil.java


示例15: save

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
@Override
public boolean save(FacesContext context, DataContainer data) throws FacesExceptionEx {
    // invoke the query save method binding
    Object object = ((Container)data).getObject();
    if (_saveObject != null) {
        Object[] params = null;
        if(_saveObject instanceof MethodBindingEx){
            params = new Object[] { object };
            ((MethodBindingEx)_saveObject).setComponent(getComponent());
            ((MethodBindingEx)_saveObject).setParamNames(s_saveObjectParamNames);
        }
        if (FacesUtil.isCancelled(_saveObject.invoke(context, params))) {
            return false;
        }
        return true;
    }
    
    throw new FacesExceptionEx(null,"The save method has not been implemented in the data source"); // $NLX-ObjectDataSource.Missingsavemethodtothedatasource-1$
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:20,代码来源:ObjectDataSource.java


示例16: writeDetail

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
@Override
protected void writeDetail(FacesContext context, ResponseWriter w,
        AbstractDataView c, ViewDefinition viewDef) throws IOException {
    UIComponent detail = viewDef.detailFacet;
    if (detail != null) {
        String id = c.getClientId(context) + ID_DETAIL;
        w.startElement("div", c); // $NON-NLS-1$
        w.writeAttribute("id", id, null); // $NON-NLS-1$
        String styleClass = (String) getProperty(PROP_SUMMARYCOLTEXTSTYLECLASS);
        if (StringUtil.isNotEmpty(styleClass)) {
            w.writeAttribute("class", styleClass, null); // $NON-NLS-1$
        }
        String style = viewDef.summaryColumn != null ? viewDef.summaryColumn
                .getStyle() : null;
        if (StringUtil.isNotEmpty(style)) {
            w.writeAttribute("style", style, null); // $NON-NLS-1$
        }
        FacesUtil.renderComponent(context, detail);
        w.endElement("div"); // $NON-NLS-1$
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:22,代码来源:MobileViewRenderer.java


示例17: isDialogRequest

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
public boolean isDialogRequest(FacesContextEx context) {
    // The current panel is the current one if the request is
    // a partial refresh, where the panel is the target component
    if(context.isAjaxPartialRefresh()) {
        String id = context.getPartialRefreshId();
        if(DIALOG_NEXT) {
            if(FacesUtil.isClientIdChildOf(context, this, id)) {
                return true;
            }
        } else {
            if(FacesUtil.isClientIdChildOf(context, getPopupContent(), id)) {
                return true;
            }
        }
    }
    
    return false;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:19,代码来源:UIDialog.java


示例18: getDocument

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
public static Document getDocument(Object var) {
    if (var instanceof Document) {
        return (Document) var;
    }
    if (var instanceof DominoDocument) {
        return ((DominoDocument) var).getDocument();
    }
    if (var instanceof String) {
        Object data = FacesUtil.resolveRequestMapVariable(FacesContext.getCurrentInstance(), (String) var);
        if (data instanceof DominoDocument) {
            DominoDocument dd = (DominoDocument) data;
            return (Document) dd.getDocument();
        }
        if (data instanceof Document) {
            return (Document) data;
        }
    }
    throw new FacesExceptionEx(null, "Cannot find document {0}", var); // $NLX-NotesFunctionEx_CannotFindNotesDocument-1$
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:20,代码来源:NotesFunctionsEx.java


示例19: findDelegate

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
private Renderer findDelegate(FacesContext context, UIComponent component, String newRendererType) {
    String componentFamily = component.getFamily();
    Renderer delegate = FacesUtil.getRenderer(context, componentFamily, newRendererType);
    if( null == delegate ){
        // won't happen, the 2 renderer-types in the detect method both have registered renderers.
        throw new NullPointerException("Renderer is null for componentFamily="+componentFamily+" rendererType="+newRendererType); //$NON-NLS-1$ //$NON-NLS-2$
    }
    return delegate;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:10,代码来源:InputDateDetectRenderer.java


示例20: decodeCausedSubmit

import com.ibm.xsp.util.FacesUtil; //导入依赖的package包/类
private boolean decodeCausedSubmit(final FacesContext context, final UIComponent component) {
	String currentClientId = component.getClientId(context);
	String hiddenValue = FacesUtil.getHiddenFieldValue(context);

	if (currentClientId != null && hiddenValue != null) {
		return StringUtil.indexOfIgnoreCase(hiddenValue, currentClientId) > -1;
	}
	return false;
}
 
开发者ID:jesse-gallagher,项目名称:Miscellany,代码行数:10,代码来源:AcePagerRenderer.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HyperlinkProviderExt类代码示例发布时间:2022-05-22
下一篇:
Java RedisClient类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap