本文整理汇总了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;
}
示例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;
}
}
示例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();
}
示例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();
}
示例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;
}
示例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));
}
示例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();
}
示例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";
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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));
}
}
示例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();
}