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


Java StringValue.toString方法代码示例

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


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

示例1: loadTasksSearchDto

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
private TasksSearchDto loadTasksSearchDto() {
    TasksStorage storage = getSessionStorage().getTasks();
    TasksSearchDto dto = storage.getTasksSearch();

    if (dto == null) {
        dto = new TasksSearchDto();
        dto.setShowSubtasks(false);
    }

    if (getPageParameters() != null) {
        StringValue category = getPageParameters().get(SELECTED_CATEGORY);
        if (category != null && category.toString() != null && !category.toString().isEmpty()) {
            dto.setCategory(category.toString());
        }
    }

    if (dto.getStatus() == null) {
        dto.setStatus(TaskDtoExecutionStatusFilter.ALL);
    }

    return dto;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:23,代码来源:PageTasks.java

示例2: onBeforeRender

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
@Override
protected void onBeforeRender() {
	super.onBeforeRender();

	if (!initialized) {
		PageParameters params = getPageParameters();
		StringValue val = params.get(SELECTED_TAB_INDEX);
		String value = null;
		if (val != null && !val.isNull()) {
			value = val.toString();
		}

		int index = StringUtils.isNumeric(value) ? Integer.parseInt(value) : CONFIGURATION_TAB_BASIC;
		getTabPanel().setSelectedTab(index);

		initialized = true;
	}
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:19,代码来源:PageSystemConfiguration.java

示例3: getOidFromParameter

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
private String getOidFromParameter(PageParameters params){
	
	if (params == null || params.isEmpty()) {
		LOGGER.error("No page paraeters found for account activation. No user to activate his/her accounts");
		return null;
	}
	
	StringValue userValue = params.get(SchemaConstants.USER_ID);
	if (userValue == null || userValue.isEmpty()) {
		LOGGER.error("No user defined in the page parameter. Expected user=? attribute filled but didmn't find one.");
		return null;
	}
	
	return userValue.toString();
	
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:17,代码来源:PageAccountActivation.java

示例4: getOidFromParameter

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
private String getOidFromParameter(PageParameters params){

		if (params == null || params.isEmpty()) {
			LOGGER.error("No page paraeters found for account activation. No user to activate his/her accounts");
			return null;
		}

		StringValue userValue = params.get(SchemaConstants.USER_ID);
		if (userValue == null || userValue.isEmpty()) {
			LOGGER.error("No user defined in the page parameter. Expected user=? attribute filled but didmn't find one.");
			return null;
		}

		return userValue.toString();

	}
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:17,代码来源:PageAccountActivation.java

示例5: loadProject

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
private Project loadProject() {
    PageParameters params = getPageParameters();
    StringValue val = params.get(PROJECT_ID);
    String projectId = val != null ? val.toString() : null;

    if (projectId == null || !projectId.matches("[0-9]+")) {
        return new Project();
    }

    ProjectRepository repository = getProjectRepository();
    Project project = repository.findOne(Integer.parseInt(projectId));
    if (project == null) {
        getSession().error(translateString("Message.couldntFindProject", projectId));
        throw new RestartResponseException(PageProject.class);
    }

    return project;
}
 
开发者ID:Evolveum,项目名称:gizmo-v3,代码行数:19,代码来源:PageProject.java

示例6: MenuConfig

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
/**
 * @param id
 */
@SuppressWarnings("serial")
public MenuConfig(final String id, final Menu menu, final FavoritesMenu favoritesMenu)
{
  super(id);
  configureLink = new WebMarkupContainer("configureLink");
  add(configureLink);
  configureBehavior = new AbstractDefaultAjaxBehavior() {
    @Override
    protected void respond(final AjaxRequestTarget target)
    {
      final Request request = RequestCycle.get().getRequest();
      final StringValue configuration = request.getPostParameters().getParameterValue("configuration");
      final String xml = configuration.toString("");
      if (log.isDebugEnabled() == true) {
        log.debug(xml);
      }
      favoritesMenu.readFromXml(xml);
      favoritesMenu.storeAsUserPref();
    }
  };
  add(configureBehavior);
  add(new MenuConfigContent("content", menu));
}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:27,代码来源:MenuConfig.java

示例7: PageCertCampaign

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
public PageCertCampaign(PageParameters parameters) {
	StringValue campaignOidValue = parameters.get(OnePageParameterEncoder.PARAMETER);
	if (campaignOidValue != null) {
		campaignOid = campaignOidValue.toString();
	}
	initModels();
	initLayout();
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:9,代码来源:PageCertCampaign.java

示例8: getReportType

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
private String getReportType(){
	 StringValue param = getPage().getPageParameters().get(OnePageParameterEncoder.PARAMETER);
     if (param != null) {
         return param.toString();
     }
     return "undefined";
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:8,代码来源:PageCreatedReports.java

示例9: getObjectOidParameter

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
protected String getObjectOidParameter() {
	PageParameters parameters = getPageParameters();
	LOGGER.trace("Page parameters: {}", parameters);
	StringValue oidValue = getPageParameters().get(OnePageParameterEncoder.PARAMETER);
	LOGGER.trace("OID parameter: {}", oidValue);
	if (oidValue == null) {
		return null;
	}
	String oid = oidValue.toString();
	if (StringUtils.isBlank(oid)) {
		return null;
	}
	return oid;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:15,代码来源:PageAdminObjectDetails.java

示例10: getOidFromParams

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
private String getOidFromParams(PageParameters pageParameters) {
	if (pageParameters == null) {
		return null;
	}
	StringValue oidValue = pageParameters.get(PARAM_USER_OID);
	if (oidValue != null) {
		return oidValue.toString();
	}
	return null;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:11,代码来源:PageSelfRegistration.java

示例11: getSelectedTabForConfiguration

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
private int getSelectedTabForConfiguration(WebPage page) {
	PageParameters params = page.getPageParameters();
	StringValue val = params.get(PageSystemConfiguration.SELECTED_TAB_INDEX);
	String value = null;
	if (val != null && !val.isNull()) {
		value = val.toString();
	}

	return StringUtils.isNumeric(value) ? Integer.parseInt(value) : PageSystemConfiguration.CONFIGURATION_TAB_BASIC;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:11,代码来源:PageBase.java

示例12: getUrlFragment

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
protected OmUrlFragment getUrlFragment(IRequestParameters params) {
	for (AreaKeys key : AreaKeys.values()) {
		StringValue type = params.getParameterValue(key.name());
		if (!type.isEmpty()) {
			return new OmUrlFragment(key, type.toString());
		}
	}
	return null;
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:10,代码来源:BasePage.java

示例13: respond

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
@Override
protected void respond(AjaxRequestTarget target) {
	if (!inited) {
		return;
	}
	try {
		WbAction a = WbAction.valueOf(getRequest().getRequestParameters().getParameterValue(PARAM_ACTION).toString());
		StringValue sv = getRequest().getRequestParameters().getParameterValue(PARAM_OBJ);
		JSONObject obj = sv.isEmpty() ? new JSONObject() : new JSONObject(sv.toString());
		processWbAction(a, obj, target);
	} catch (Exception e) {
		log.error("Unexpected error while processing wbAction", e);
	}
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:15,代码来源:AbstractWbPanel.java

示例14: respond

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
@Override
protected void respond(AjaxRequestTarget target) {
    RequestCycle cycle = RequestCycle.get();
    WebRequest webRequest = (WebRequest) cycle.getRequest();
    StringValue json = webRequest.getQueryParameters().getParameterValue("data");

    String docString = json.toString();
    JsonNode document = convert.stringToJsonNode(docString);
    HttpServletRequest req = (HttpServletRequest) component.getRequest().getContainerRequest();
    String user = auth.getUserName(req);

    // document id is empty = create new document
    if (metadata.get_id() == null) {
        metadata.setAuthor(user);
        metadata.setLastModifiedBy(user);

        documentService.storeDocument(document, docData);
    // update document
    } else {
        metadata.setLastModifiedBy(user);
        docData.getWorkflow().getState().setCurrentState(StateEnum.IN_PROGRESS);
        docData.setData(docString.getBytes());
        JsonNode diff = documentService.updateDocument(docData);

        Map<String, String> diffMap = new HashMap<>();
        if(!diff.isNull()) {
            for (JsonNode node : diff) {
                String path = node.get("path").textValue();
                String name = "root" + path.replace("/", ".");
                String value = node.get("value").asText();
                diffMap.put(name, value);
            }
        }

        PageParameters params = new PageParameters();
        params.add("id", metadata.get_id());
        
        component.setResponsePage(new DocumentTabs(params, diffMap));
    }
}
 
开发者ID:martin-kanis,项目名称:relax-dms,代码行数:41,代码来源:DocumentEditorBehavior.java

示例15: getDocIdAndRev

import org.apache.wicket.util.string.StringValue; //导入方法依赖的package包/类
private void getDocIdAndRev(PageParameters parameters) {
    StringValue sv = parameters.get("id");
    
    if (sv.isNull() || sv.isEmpty()) {
        log.info("ID is null or empty");
    }
    id = sv.toString();
    
    sv = parameters.get("rev");
    rev = sv.toString();
}
 
开发者ID:martin-kanis,项目名称:relax-dms,代码行数:12,代码来源:DocumentTabs.java


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