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


Java TypedUtil.getRequestParameterMap方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: getStartsValue

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
private String getStartsValue(FacesContext context, UITypeAhead typeAhead, boolean isMultipleTrim) {
    Map<String, String> requestMap = TypedUtil.getRequestParameterMap(context.getExternalContext());
    String startsValue = requestMap.get(UITypeAhead.VALUE_NAME);
    if( isMultipleTrim && null != startsValue){
        startsValue = startsValue.trim();
    }
    return startsValue;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:9,代码来源:AbstractPicker.java

示例6: decode

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
@Override
public void decode(FacesContext context, UIComponent component) {
    String id = component.getClientId(context) + ":_sel"; // $NON-NLS-1$
    UIListView uiComponent = (UIListView) component;
    Map<String, String> map = TypedUtil.getRequestParameterMap(context.getExternalContext());
    if (map.containsKey(id)) {
        String selectedIds = map.get(id);
        uiComponent.setSelectedIds(StringUtil.isNotEmpty(selectedIds) ? selectedIds.split(",") : null);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:11,代码来源:ListViewRenderer.java

示例7: isShouldCreateOrReloadChildren

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
private boolean isShouldCreateOrReloadChildren(FacesContextEx context) {
    // We should create the children if the request is a partial refresh request 
    // for the current component, or its page (the mobile page)
    if(context.isAjaxPartialRefresh()) {
        String id = context.getPartialRefreshId();
        UIMobilePage mobilePage = getMobilePage();
        if(FacesUtil.isClientIdChildOf(context, mobilePage, id)) {
            Map<String, String> params = TypedUtil.getRequestParameterMap(context.getExternalContext());
            String pt = params.get("pageTransition"); // $NON-NLS-1$
            if(StringUtil.isNotEmpty(pt)) {
                // If the content doesn't exist, then create it...
                if(!isContentCreated()) {
                    return true;
                }
                // A parameter is the url has a greater priority
                String resetParam = params.get(UIMobilePage.PARAM_RESET);
                if(StringUtil.equals(resetParam, "true")) { // $NON-NLS-1$
                    return true;
                }
                if(StringUtil.equals(resetParam, "false")) { // $NON-NLS-1$
                    return false;
                }
                // Else use the default page option
                return mobilePage.isResetContent();
            }
        }
    }
    
    return false;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:31,代码来源:UIMobilePageContent.java

示例8: processAjaxRequest

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
@Override
public void processAjaxRequest(FacesContext context) throws IOException {

	HttpServletResponse httpResponse = (HttpServletResponse) context.getExternalContext().getResponse();

	if (httpResponse instanceof XspHttpServletResponse) {
		XspHttpServletResponse r = (XspHttpServletResponse) httpResponse;
		r.setCommitted(true);
		httpResponse = r.getDelegate();
	}
	try {
		httpResponse.setContentType("text/json");
		httpResponse.setCharacterEncoding("utf-8");

		JsonWriter jsWriter = new JsonWriter(httpResponse.getWriter(), true);
		Map<String, String> localMap = TypedUtil.getRequestParameterMap(context.getExternalContext());
		String strSearch = localMap.get("$$value");
		List<NameEntry> lstEntries = new ArrayList<NameEntry>();
		if (strSearch != null) {
			lstEntries = searcheNameValues(context, strSearch);
		}
		JsonResult jsResult = JsonResult.generateOKResult(lstEntries);
		JSONService.getInstance().process2JSON(jsWriter, jsResult);
		jsWriter.close();
	} catch (Exception e) {
		ErrorJSONBuilder.getInstance().processError2JSON(httpResponse, 9999, "Error during parsing!", e);
	}
}
 
开发者ID:OpenNTF,项目名称:XPagesToolkit,代码行数:29,代码来源:UINamePicker.java

示例9: decode

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
@Override
public void decode(FacesContext context, UIComponent component) {
    if (context == null || component == null)
        throw new NullPointerException();
    if (!component.isRendered())
        return;
    super.decode(context, component);
    
    
    UIDataView dataView = (component instanceof UIDataView) ? (UIDataView)component : null;
    if(null == dataView){
        // Might be the row component
        return;
    }
    
    // Look for a checkbox field
    DataModel dm = dataView.getDataModel();
    if(dm instanceof TabularDataModel) {
        TabularDataModel tbm = (TabularDataModel)dm;
        tbm.clearSelectedIds();
        
        // iterate through the rows of the current data page
        dataView.setRowIndex(-1);
        Map<String, String> params = TypedUtil.getRequestParameterMap(context.getExternalContext());
        // dataView.getRows() returns rows shown on page
        int pageFirstIndex = dataView.getFirst();
        int pageRowCount = dataView.getRows();
        int pageEndPageIndex = pageRowCount < 0 ? pageFirstIndex : pageFirstIndex+pageRowCount;
        for (int rowIndex = pageFirstIndex; rowIndex < pageEndPageIndex; rowIndex++) {
            dataView.setRowIndex(rowIndex);
            if(!dataView.isRowAvailable())
                break;
            
            // Note _colcbox is UIViewColumn.INTERNAL_CHECKBOX_ID
            String cboxName = dataView.getClientId(context) + ":_colcbox"; // $NON-NLS-1$ $NON-NLS-2$
            
            String cboxValue = params.get(cboxName);
            if (StringUtil.isNotEmpty(cboxValue) ) {
                if (!StringUtil.isFalseValue(cboxValue)) { // !"false".equals
                    tbm.addSelectedId(cboxValue);
                }
            }
        }
        dataView.setRowIndex(-1);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:47,代码来源:DataViewRenderer.java


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