本文整理汇总了Java中org.apache.wicket.PageParameters.put方法的典型用法代码示例。如果您正苦于以下问题:Java PageParameters.put方法的具体用法?Java PageParameters.put怎么用?Java PageParameters.put使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.PageParameters
的用法示例。
在下文中一共展示了PageParameters.put方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onSubmit
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
@Override
public void onSubmit() {
PageParameters param = new PageParameters();
List<String> commands = getCommands(_fileUploadField.getFileUpload());
ShellCommands cmd = new ShellCommands(EDITOR_NAME);
cmd.addCommands(commands);
try {
ShellConnector.getInstance().execute2(cmd);
param.add(KEY_LOG, "success");
} catch (InventoryException e) {
param.put(KEY_LOG, e.getMessage());
}
setResponsePage(new DeployPage(param));
}
示例2: getPageParameters
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
@Override
public PageParameters getPageParameters(Topic topic) {
PageParameters params = new PageParameters();
params.put("topicMapId", topic.getTopicMap().getId());
params.put("topicId", topic.getId());
//! params.put("topicTypeId", getTopicType().getId());
FieldsView fieldsView = getFieldsView();
if (!fieldsView.isDefaultView())
params.put("viewId", fieldsView.getId());
PageParameters thisParams = getPageParameters();
// forward buttons parameter
if (thisParams.getString("buttons") != null)
params.put("buttons", "true");
return params;
}
示例3: getLink
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
@Override
protected Component getLink(String id) {
PageParameters pageParameters = new PageParameters();
pageParameters.put("topicMapId", getTopicMapId());
pageParameters.put("topicId", getTopicId());
return new BookmarkablePageLink<Page>(id, VizigatorPage.class, pageParameters) {
@Override
protected void onComponentTag(ComponentTag tag) {
tag.setName("a");
//tag.put("target", "_blank");
super.onComponentTag(tag);
}
@Override
protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
replaceComponentTagBody(markupStream, openTag, new ResourceModel("vizigator.text2").getObject().toString());
}
};
}
示例4: addDropDownMenus
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
@Override
protected void addDropDownMenus(List<PageRegistration> pages) {
DropDownMenuRegistration filters = new DropDownMenuRegistration("gb.filters",
ActivityPage.class);
PageParameters currentParameters = getPageParameters();
int daysBack = GitBlit.getInteger(Keys.web.activityDuration, 7);
if (currentParameters != null && !currentParameters.containsKey("db")) {
currentParameters.put("db", daysBack);
}
// preserve time filter options on repository choices
filters.menuItems.addAll(getRepositoryFilterItems(currentParameters));
// preserve repository filter options on time choices
filters.menuItems.addAll(getTimeFilterItems(currentParameters));
if (filters.menuItems.size() > 0) {
// Reset Filter
filters.menuItems.add(new DropDownMenuItem(getString("gb.reset"), null, null));
}
pages.add(filters);
}
示例5: addDropDownMenus
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
@Override
protected void addDropDownMenus(List<PageRegistration> pages) {
DropDownMenuRegistration filters = new DropDownMenuRegistration("gb.filters",
ActivityPage.class);
PageParameters currentParameters = getPageParameters();
int daysBack = GitBlit.getInteger(Keys.web.activityDuration, 14);
if (currentParameters != null && !currentParameters.containsKey("db")) {
currentParameters.put("db", daysBack);
}
// preserve time filter options on repository choices
filters.menuItems.addAll(getRepositoryFilterItems(currentParameters));
// preserve repository filter options on time choices
filters.menuItems.addAll(getTimeFilterItems(currentParameters));
if (filters.menuItems.size() > 0) {
// Reset Filter
filters.menuItems.add(new DropDownMenuItem(getString("gb.reset"), null, null));
}
pages.add(filters);
}
示例6: getPageParameters
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
@Override
public PageParameters getPageParameters(Topic topic) {
// add hierarchyId to parent parameters
PageParameters params = super.getPageParameters(topic);
Topic hierarchyTopic = getHierarchyTopic();
if (hierarchyTopic != null)
params.put("hierarchyId", hierarchyTopic.getId());
return params;
}
示例7: getPageParameters
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
/**
* Given the topic return the page parameters to use. This method is used
* in various places around the application to generate links to topics.
* Subclasses may override it.
*/
public PageParameters getPageParameters(Topic topic) {
// WARNING: if you do a change here then you may also want to do so in EmbeddedInstancePage.
PageParameters params = new PageParameters();
params.put("topicMapId", topic.getTopicMap().getId());
params.put("topicId", topic.getId());
PageParameters thisParams = getPageParameters();
if (thisParams != null) {
// forward ontology parameter (if applicable)
String ontology = thisParams.getString("ontology");
if (ontology != null && topic.isOntologyTopic())
params.put("ontology", "true");
}
return params;
}
示例8: getPageParameters
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
@Override
public PageParameters getPageParameters(Topic topic) {
PageParameters params = new PageParameters();
params.put("topicMapId", topic.getTopicMap().getId());
params.put("topicId", topic.getId());
params.put("ontology", "true");
return params;
}
示例9: getPageParameters
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
/**
* @return page parameters
*/
public PageParameters getPageParameters()
{
PageParameters result = new PageParameters();
if (parameters != null)
{
for (Iterator<Entry<String, Object>> i = parameters.entrySet().iterator(); i.hasNext();)
{
Entry<String, Object> entry = i.next();
result.put(entry.getKey(), entry.getValue());
}
}
return result;
}
示例10: getPageParameters
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
@Override
public PageParameters getPageParameters() {
AbstractOntopolyPage page = (AbstractOntopolyPage)getPage();
PageParameters params = page.getPageParameters(getTopic());
if (fieldsViewModel != null) {
FieldsView fieldsView = fieldsViewModel.getFieldsView();
if (fieldsView != null && !fieldsView.isDefaultView())
params.put("viewId", fieldsView.getId());
}
return params;
}
示例11: setParameterImpl
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
private void setParameterImpl(String key, Object value)
{
PageParameters parameters = getPageParameters();
parameters.put(key, value);
this.parameters = pageParametersToMiniMap(parameters);
}
示例12: onClick
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
@Override
public void onClick() {
PageParameters parameters = new PageParameters();
parameters.put("eixoId", String.valueOf(eixoId));
setResponsePage(EixoPage.class,parameters);
}
示例13: onClick
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
@Override
public void onClick() {
PageParameters parameters = new PageParameters();
parameters.put("propostaId",String.valueOf(propostaId));
setResponsePage(PropostaPage.class,parameters);
}
示例14: PagerPanel
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
public PagerPanel(String wicketId, final int currentPage, final int totalPages,
final Class<? extends BasePage> pageClass, final PageParameters baseParams) {
super(wicketId);
List<PageObject> pages = new ArrayList<PageObject>();
int[] deltas;
if (currentPage == 1) {
// [1], 2, 3, 4, 5
deltas = new int[] { 0, 1, 2, 3, 4 };
} else if (currentPage == 2) {
// 1, [2], 3, 4, 5
deltas = new int[] { -1, 0, 1, 2, 3 };
} else {
// 1, 2, [3], 4, 5
deltas = new int[] { -2, -1, 0, 1, 2 };
}
if (totalPages > 0) {
pages.add(new PageObject("\u2190", currentPage - 1));
}
for (int delta : deltas) {
int page = currentPage + delta;
if (page > 0 && page <= totalPages) {
pages.add(new PageObject("" + page, page));
}
}
if (totalPages > 0) {
pages.add(new PageObject("\u2192", currentPage + 1));
}
ListDataProvider<PageObject> pagesProvider = new ListDataProvider<PageObject>(pages);
final DataView<PageObject> pagesView = new DataView<PageObject>("page", pagesProvider) {
private static final long serialVersionUID = 1L;
public void populateItem(final Item<PageObject> item) {
PageObject pageItem = item.getModelObject();
PageParameters pageParams = new PageParameters(baseParams);
pageParams.put("pg", pageItem.page);
LinkPanel link = new LinkPanel("pageLink", null, pageItem.text, pageClass, pageParams);
link.setRenderBodyOnly(true);
item.add(link);
if (pageItem.page == currentPage || pageItem.page < 1 || pageItem.page > totalPages) {
WicketUtils.setCssClass(item, "disabled");
}
}
};
add(pagesView);
}