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

Java TypedUtil类代码示例

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

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



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

示例1: getExtraFacet

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
public UIComponent getExtraFacet(AbstractDataView dataView, int index){
    // the "extra" facets are row facets [see AbstractDataView.getRowFacetNames()]
    List<UIComponent> children = TypedUtil.getChildren(dataView);
    if( children.isEmpty() ){
        // Note, children will only be empty in JUnit tests 
        // where UIDataView.buildContents is not called.
        return null;
    }
    UIComponent row = children.get(0);
    if(index==0) {
        UIComponent c = row.getFacet(UIDataView.FACET_EXTRA_N);
        if(c!=null) {
            return c;
        }
    }
    return row.getFacet(UIDataView.FACET_EXTRA_N+index);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:18,代码来源:DataViewRenderer.java


示例2: getCategoryRowFacet

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
public UIComponent getCategoryRowFacet(AbstractDataView dataView, int index){
    // the "categoryRow" facets are row facets [see AbstractDataView.getRowFacetNames()]
    List<UIComponent> children = TypedUtil.getChildren(dataView);
    if( children.isEmpty() ){
        // Note, children will only be empty in JUnit tests 
        // where UIDataView.buildContents is not called.
        return null;
    }
    UIComponent row = children.get(0);
    if(index==0) {
        UIComponent c = row.getFacet(UIDataView.FACET_CATEGORY_N);
        if(c!=null) {
            return c;
        }
    }
    return row.getFacet(UIDataView.FACET_CATEGORY_N+index);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:18,代码来源:DataViewRenderer.java


示例3: writeOneColumnRows

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
protected void writeOneColumnRows(FacesContext context, ResponseWriter w, FormLayout c, UIComponent parent, ComputedFormData formData) throws IOException {
    List<UIComponent> children = TypedUtil.getChildren(parent);
    for(UIComponent child: children) {
        if(!child.isRendered()) {
            continue;
        }
        if(child instanceof UIFormLayoutRow) {
            newLine(w);
            writeFormRow(context, w, c, formData, (UIFormLayoutRow)child);
        } else {
            if( !(child instanceof FormLayout) ){
                writeChildRows(context, w, c, child, formData);
            }// do not recurse through FormLayout descendants
        }
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:17,代码来源:FormTableRenderer.java


示例4: initFromState

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
protected void initFromState(FacesContext context) {
	// Look if the state should be restored
	boolean shouldRestoreState = RedirectMapUtil.get(context, RESTORE_KEY)!=null;
	
	FacesDataIteratorStateManager m = FacesDataIteratorStateManager.get(); 
	for(UIComponent c: getBeanData(context).keySet()) {
		Map<String, Object> attributes = TypedUtil.getAttributes(c);
		if(attributes.get("xsp.initviewstate")==null) { //$NON-NLS-1$
			attributes.put("xsp.initviewstate",Boolean.TRUE); //$NON-NLS-1$
		
			String key = findStateKey(context, c);
			if(StringUtil.isNotEmpty(key)) {
				m.restoreState(context, c, key, shouldRestoreState);
				if(TRACE) {
					System.out.println("View, initFromState: "+key); //$NON-NLS-1$
				}
			}
		}
	}
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:21,代码来源:ViewStateBean.java


示例5: deleteContent

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
@Override
protected void deleteContent(FacesContextEx context) {
    if(!getDialog().isKeepComponents()) {
        // Remove the EventHandlers add to the dialog
        List<UIComponent> l = TypedUtil.getChildren(getDialog());
        for(int i=0; i<l.size(); ) {
            UIComponent c = l.get(i);
            if(c instanceof UIEventHandler) {
                l.remove(i);
            } else {
                i++;
            }
        }
        // Then delete the content of the panel
        super.deleteContent(context);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:18,代码来源:UIDialog.java


示例6: isDialogCreateRequest

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
public boolean isDialogCreateRequest(FacesContextEx context) {
    // The current panel is the current one if the request is
    // a partial refresh, where the panel is the target component
    // The request must also include a $$showdialog=true param in the URL
    Map<String, String> params = TypedUtil.getRequestParameterMap(context.getExternalContext());
    if(StringUtil.equals(params.get("$$showdialog"),"true")) { // $NON-NLS-1$ $NON-NLS-2$
        // If the creation had been prohibited, then do not create it
        if(StringUtil.equals(params.get("$$createdialog"),"false")) { // $NON-NLS-1$ $NON-NLS-2$
            return false;
        }
        if(context.isAjaxPartialRefresh()) {
            String id = context.getPartialRefreshId();
            if(DIALOG_NEXT) {
                if(StringUtil.equals(getPopupContent(), id)) {
                    return true;
                }
            } else {
                if(StringUtil.equals(getPopupContent().getClientId(context), id)) {
                    return true;
                }
            }
        }
    }
    return false;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:26,代码来源:UIDialog.java


示例7: buildContents

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
protected void buildContents(FacesContext context, FacesComponentBuilder builder, UIComponent parent) throws FacesException {
    if(DynamicUIUtil.isDynamicallyConstructing(context)) {
        // We should reset the dynamically constructing flag as we don't want it to be
        // propagated to its children (ex: nested dialogs...)
        UIComponent c = DynamicUIUtil.getDynamicallyConstructedComponent(context); 
        DynamicUIUtil.setDynamicallyConstructing(context, null);
        try {
            builder.buildAll(context, this, false);
            return;
        } finally {
            DynamicUIUtil.setDynamicallyConstructing(context, c);
        }
    } else {
        PopupContent content = new PopupContent();
        content.setId("_content"); // $NON-NLS-1$
        TypedUtil.getChildren(parent).add(content);
        // Set the source page name for creating the inner content
        content.setSourcePageName(DynamicUIUtil.getSourcePageName(builder));
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:21,代码来源:UIDialog.java


示例8: buildContents

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
@Override
public void buildContents(FacesContext context, FacesComponentBuilder builder) throws FacesException {
    if(!isDynamicContent()) {
        builder.buildAll(context, this, true);
        return;
    }
    if(DynamicUIUtil.isDynamicallyConstructing(context)) {
        // We should reset the dynamically constructing flag as we don't want it to be
        // propagated to its children (ex: nested tooltip...)
        UIComponent c = DynamicUIUtil.getDynamicallyConstructedComponent(context); 
        DynamicUIUtil.setDynamicallyConstructing(context, null);
        try {
            builder.buildAll(context, this, false);
            return;
        } finally {
            DynamicUIUtil.setDynamicallyConstructing(context, c);
        }
    } else {
        PopupContent content = new PopupContent();
        content.setId("_content"); // $NON-NLS-1$
        TypedUtil.getChildren(this).add(content);
        // Set the source page name for creating the inner content
        content.setSourcePageName(DynamicUIUtil.getSourcePageName(builder));
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:26,代码来源:UITooltip.java


示例9: restoreValueHolderState

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
@SuppressWarnings("unchecked")//$NON-NLS-1$
@Override
protected void restoreValueHolderState(FacesContext context,
        UIComponent component) {
    super.restoreValueHolderState(context, component);

    // start workaround for MKEE89RPXF
    if (ExtLibUtil.isXPages852()) {
        if (component.getFacetCount() > 0) {
            Map<String, UIComponent> facets;
            if (disableGetFacets && component == this) {
                facets = super.getFacets();
            }
            else {
                facets = TypedUtil.getFacets(component);
            }
            for (UIComponent c : facets.values()) {
                if (c != null) {
                    restoreValueHolderState(context, c);
                }
            }
        }
    }
    // end workaround for MKEE89RPXF
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:26,代码来源:AbstractDataView.java


示例10: saveValueHolderState

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
@SuppressWarnings("unchecked")//$NON-NLS-1$
@Override
protected void saveValueHolderState(FacesContext context,
        UIComponent component) {
    super.saveValueHolderState(context, component);

    // start workaround for MKEE89RPXF
    if (ExtLibUtil.isXPages852()) {
        if (component.getFacetCount() > 0) {
            Map<String, UIComponent> facets;
            if (disableGetFacets && component == this) {
                facets = super.getFacets();
            }
            else {
                facets = TypedUtil.getFacets(component);
            }
            for (UIComponent c : facets.values()) {
                if (c != null) {
                    saveValueHolderState(context, c);
                }
            }
        }
    }
    // end workaround for MKEE89RPXF
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:26,代码来源:AbstractDataView.java


示例11: show

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
public void show(String facet, Map<String,String> parameters) {
    FacesContextEx context = FacesContextEx.getCurrentInstance();
    
    if( StringUtil.isEmpty(facet) ){
        // when the empty string is passed in, load -default-
        facet = PSEUDO_FACET_DEFAULT;
    }
    if ( PSEUDO_FACET_DEFAULT.equals(facet) ){
        // recompute the default facet and load that
        facet = getDefaultFacet();
        if( StringUtil.isEmpty(facet) || PSEUDO_FACET_DEFAULT.equals(facet) ){
            // when the defaultFacet is empty, load -children-
            facet = PSEUDO_FACET_CHILDREN;
        }
    }
    // facet is non-empty here
    if( !StringUtil.equals(PSEUDO_FACET_EMPTY, facet) ) {
        pushParameters(context, parameters);
        TypedUtil.getRequestMap(context.getExternalContext()).put(XSPCONTENT_PARAM,facet);
        createContent(context);
    } else {
        deleteContent(context);
        currentFacet = facet;
    }
    updateHash(facet, parameters);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:27,代码来源:UIDynamicContent.java


示例12: _findPickerFor

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
static private AbstractPicker _findPickerFor(UIComponent parent, String id) {
    if(parent.getChildCount()>0 || parent.getFacetCount() > 0) {
        for (Iterator<UIComponent> i = TypedUtil.getFacetsAndChildren(parent); i.hasNext();) {
            UIComponent next = i.next();
            // Look if this child is the label
            if(next instanceof AbstractPicker) {
                AbstractPicker lbl = (AbstractPicker)next;
                String _for = lbl.getFor();
                if(StringUtil.equals(_for, id)) {
                    return lbl;
                }
            }
            if (!(next instanceof NamingContainer)) {
                AbstractPicker n = _findPickerFor(next, id);
                if (n != null) {
                    return n;
                }
            }
        }
    }
    return null;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:23,代码来源:UIDojoExtListTextBox.java


示例13: processAjaxRequest

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
public void processAjaxRequest(FacesContext context) throws IOException {
        // Note, the errorCode is never written to the response header
        // because this method always gives 200 OK.
        //int errorCode = 200; // OK
        StringBuilder b = new StringBuilder();
        
        // Find the command
        Map<String, String> params = TypedUtil.getRequestParameterMap(context.getExternalContext());
        
        // Create a new tab
        String command = params.get("_action"); // $NON-NLS-1$
        if(StringUtil.equals(command, "createTab")) { // $NON-NLS-1$
//            errorCode = 
            axCreateTab(context, b, params);
        }

        // Return the Javascript snippet
        // TODO: add the header...
        AjaxUtil.initRender(context);
        ResponseWriter writer = context.getResponseWriter();
        writer.write(b.toString());
    }
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:23,代码来源:UIDojoTabContainer.java


示例14: delayedRemoveChildren

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
private void delayedRemoveChildren() {
    if( this.getChildCount() > 0 ){
        List<UIComponent> kids = TypedUtil.getChildren(this);
        // give the child an opportunity to remove itself from the children list.
        // note getChildCount will be changing.
        for (int i = 0; i < this.getChildCount(); i++) {
            UIComponent child = kids.get(i);
            if(child instanceof UIDojoTabPane){
                UIDojoTabPane pane = (UIDojoTabPane) child;
                if( pane.isDelayedRemoveTab() ){
                    pane.delayedRemove();
                    if( (i < this.getChildCount()) && pane != kids.get(i) ){
                        i--;
                    }
                }
            }// else probably xp:eventHandler
        }
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:20,代码来源:UIDojoTabContainer.java


示例15: processAjaxRequest

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
public void processAjaxRequest(FacesContext context) throws IOException {
    int errorCode = 200; // OK
    StringBuilder b = new StringBuilder();
    
    // Find the command
    Map<String, String> params = TypedUtil.getRequestParameterMap(context.getExternalContext());
    
    // Create a new tab
    String command = params.get("_action"); // $NON-NLS-1$
    if(StringUtil.equals(command, "closeTab")) { // $NON-NLS-1$
        errorCode = axDeleteTab(context, b, params);
    }

    // Return the Javascript snippet
    // TODO: add the header...
    AjaxUtil.initRender(context);
    ResponseWriter writer = context.getResponseWriter();
    writer.write(b.toString());
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:20,代码来源:UIDojoTabPane.java


示例16: axDeleteTab

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
protected int axDeleteTab(FacesContext context, StringBuilder b, Map<String, String> params) throws IOException {
    int errorCode = 200; // OK

    boolean removed = false;
    
    List<UIComponent> children = TypedUtil.getChildren(getParent());
    children.remove(this);
    removed = true;
    
    b.append(removed?"true":"false"); // $NON-NLS-1$ $NON-NLS-2$
    
    if(removed) {
        ExtLibUtil.saveViewState(context);
    }
    return errorCode;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:17,代码来源:UIDojoTabPane.java


示例17: addKeys

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
private void addKeys(FacesContext context) {
    Map<String, String> parameterMap = TypedUtil.getRequestParameterMap(context.getExternalContext());
    String startKey = parameterMap.get("startKey"); // $NON-NLS-1$
    String untilKey = parameterMap.get("untilKey"); // $NON-NLS-1$
    SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd'T'HHmmss"); // $NON-NLS-1$
    //System.out.println(startKey + " | " + untilKey);
    try {
        Date sDate = sdf.parse(startKey);
        Date eDate = sdf.parse(untilKey);
        DateRange dr =  NotesContext.getCurrent().getCurrentSession().createDateRange(sDate, eDate);
        //System.out.println(dr.toString());
        Vector v = new Vector(1);
        v.add(dr);
        DominoCalendarJsonLegacyService.this.setKeys(v);            
    } catch (Exception e) {
        // TODO MWD log exception but do not throw error
        // Just continue - all entries will be retrieved        
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:20,代码来源:DominoCalendarJsonLegacyService.java


示例18: buildControl

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
public static UIComponent buildControl(FacesContext context, DynamicComponentFactory factory, UIComponent parent, IControl control, boolean applyTheme) throws FacesException {
    // We create the component ad we add it to the parent *before* actually constructing it
    // This is required by some component, like UIIncludeCompiste, which look for the viewroot in
    // the control hierarchy.
    UIComponent component = control.getComponent();
    if(component.getParent()==null && parent!=null) {
        TypedUtil.getChildren(parent).add(component);
    }
    // Ok, now we build it
    MainBuilder builder = new MainBuilder(factory, control, component);
       UIComponent c = build(context, builder);
	if(c!=null) {
	    if(applyTheme) {
	        ((FacesContextEx)context).getStyleKit().applyStyles(context, c);
	    }
	}
	return c;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:19,代码来源:ControlBuilder.java


示例19: buildFacet

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
public boolean buildFacet(FacesContext context, UIComponent parent, String facetName) throws FacesPageException {
          Map<String,IControl> facets = control.getFacets();
          if(facets!=null) {
              IControl ic = facets.get(facetName);
              if(ic!=null) {
                  UIComponent parentComponent = getUIComponent(); 
                  Map<String, UIComponent> siblingFacets = TypedUtil.getFacets(parentComponent);
                  UIComponent facetComponent = ic.getComponent();
                  if(facetComponent!=null) {
                      siblingFacets.put(facetName, facetComponent);
                      Builder builder = new Builder(this,ic,facetComponent);
                      build(context,builder); 
                      return true;
                  }
              }
          }
	return false;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:19,代码来源:ControlBuilder.java


示例20: buildFacets

import com.ibm.xsp.util.TypedUtil; //导入依赖的package包/类
public void buildFacets(FacesContext context, UIComponent parent) throws FacesPageException {
	Map<String,IControl> facets = control.getFacets();
	if(facets!=null) {
		UIComponent parentComponent = getUIComponent(); 
		Map<String, UIComponent> siblingFacets = TypedUtil.getFacets(parentComponent);
		for(Map.Entry<String, IControl> e: facets.entrySet()) {
			String facetName = e.getKey();
                  IControl ic = e.getValue();
			UIComponent facetComponent = ic.getComponent();
			if(facetComponent!=null) {
			    siblingFacets.put(facetName, facetComponent);
			    Builder builder = new Builder(this,ic,facetComponent);
			    build(context,builder);					    
			}
		}
	}
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:18,代码来源:ControlBuilder.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java UnbufferedTokenStream类代码示例发布时间:2022-05-22
下一篇:
Java UnableToAccessFieldException类代码示例发布时间: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