本文整理汇总了Java中uk.org.ponder.rsf.viewstate.ViewParameters类的典型用法代码示例。如果您正苦于以下问题:Java ViewParameters类的具体用法?Java ViewParameters怎么用?Java ViewParameters使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ViewParameters类属于uk.org.ponder.rsf.viewstate包,在下文中一共展示了ViewParameters类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillComponents
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public void fillComponents(UIContainer tofill, ViewParameters arg1,
ComponentChecker arg2) {
String[] parms = new String[] {userBean.getEmail()};
boolean validatingAccounts = serverConfigurationService.getBoolean("siteManage.validateNewUsers", true);
if (!validatingAccounts) {
UIMessage.make(tofill,"message","confirm",parms);
} else {
UIMessage.make(tofill,"message","confirm.validate",parms);
}
// Get the instructions from the tool placement.
Placement placement = toolManager.getCurrentPlacement();
String supportInstructions = placement == null ? "" : placement.getConfig().getProperty("supportInstructions");
if(supportInstructions != null && !"".equals(supportInstructions)){
UIVerbatim.make(tofill, "supportMessage", supportInstructions);
}else if (serverConfigurationService.getString("mail.support", null) != null) {
UIMessage.make(tofill, "supportMessage", "supportMessage");
UILink.make(tofill, "supportEmail",serverConfigurationService.getString("mail.support", ""),"mailto:" + serverConfigurationService.getString("mail.support", ""));
}
}
示例2: interceptActionResult
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public void interceptActionResult(ARIResult result, ViewParameters incoming, Object actionReturn) {
// for evaluation creation
if (incoming instanceof EvalViewParameters
&& result.resultingView instanceof EvalViewParameters) {
EvalViewParameters in = (EvalViewParameters) incoming;
EvalViewParameters outgoing = (EvalViewParameters) result.resultingView;
if (in.evaluationId != null) {
outgoing.evaluationId = in.evaluationId;
} else {
EvalEvaluation eval = (EvalEvaluation) evaluationBeanLocator.locateBean(EvaluationBeanLocator.NEW_1);
if (eval != null) {
outgoing.evaluationId = eval.getId();
}
}
}
}
示例3: interceptActionResult
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public void interceptActionResult(ARIResult result, ViewParameters incoming, Object actionReturn) {
// handles the navigation cases and passing along data from view to view
EvalViewParameters evp = (EvalViewParameters) incoming;
Long evalId = evp.evaluationId;
if ("evalSettings".equals(actionReturn)) {
result.resultingView = new EvalViewParameters(EvaluationSettingsProducer.VIEW_ID, evalId);
} else if ("evalAssign".equals(actionReturn)) {
result.resultingView = new EvalViewParameters(EvaluationAssignProducer.VIEW_ID, evalId);
} else if ("evalConfirm".equals(actionReturn)) {
result.resultingView = new EvalViewParameters(EvaluationAssignConfirmProducer.VIEW_ID, evalId);
} else if ("controlEvals".equals(actionReturn)) {
result.resultingView = new SimpleViewParameters(ControlEvaluationsProducer.VIEW_ID);
} else if ("adminSearch".equals(actionReturn)) {
result.resultingView = new AdminSearchViewParameters(AdministrateSearchProducer.VIEW_ID, evp.adminSearchString, evp.adminSearchPage);
}
}
示例4: fillComponents
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
/**
* @param tofill
* @param viewparams
* @param checker
* @see uk.org.ponder.rsf.view.ComponentProducer#fillComponents(uk.org.ponder.rsf.components.UIContainer,
* uk.org.ponder.rsf.viewstate.ViewParameters, uk.org.ponder.rsf.view.ComponentChecker)
*/
public void fillComponents(UIContainer tofill, ViewParameters viewparams, ComponentChecker checker) {
ToolSession session = sessionManager.getCurrentToolSession();
session.setAttribute(PermissionsHelper.TARGET_REF, site.getReference());
session.setAttribute(PermissionsHelper.PREFIX, "eval.");
ResourceLoader resourceLoader = new ResourceLoader("org.sakaiproject.evaluation.tool.bundle.permissions");
HashMap<String, String> permissionsDescriptions = new HashMap<>();
for (Object key : resourceLoader.keySet()) {
permissionsDescriptions.put(key.toString(), (String) resourceLoader.get(key));
}
session.setAttribute("permissionDescriptions", permissionsDescriptions);
UIOutput.make(tofill, HelperViewParameters.HELPER_ID, "sakai.permissions.helper");
UICommand.make(tofill, HelperViewParameters.POST_HELPER_BINDING, "", null);
}
示例5: interceptActionResult
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public void interceptActionResult(ARIResult result, ViewParameters incoming, Object actionReturn) {
// handles the navigation cases and passing along data from view to view
EmailViewParameters evp = (EmailViewParameters) incoming;
EmailViewParameters outgoing = (EmailViewParameters) evp.copyBase(); // inherit all the incoming data
if ("success".equals(actionReturn)
|| "successAssign".equals(actionReturn)
|| "successReset".equals(actionReturn) ) {
outgoing.viewID = PreviewEmailProducer.VIEW_ID;
result.resultingView = outgoing;
} else if ("failure".equals(actionReturn)) {
// failure just comes back here
result.resultingView = outgoing;
} else {
// default
result.resultingView = new SimpleViewParameters(ControlEmailTemplatesProducer.VIEW_ID);
}
}
示例6: fill
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
/**
* @see org.sakaiproject.evaluation.tool.producers.EvalCommonProducer#fill(uk.org.ponder.rsf.components.UIContainer,
* uk.org.ponder.rsf.viewstate.ViewParameters, uk.org.ponder.rsf.view.ComponentChecker)
*/
@Override
public void fill(UIContainer tofill, ViewParameters viewparams, ComponentChecker checker) {
boolean userAdmin = commonLogic.isUserAdmin(commonLogic.getCurrentUserId());
if (!userAdmin) {
throw new SecurityException("Non-admin users may not access this page");
}
navBarRenderer.makeNavBar(tofill, NavBarRenderer.NAV_ELEMENT, this.getViewID());
UIForm uploadform = UIForm.make(tofill, "upload-form");
UICommand.make(uploadform, "upload-button", UIMessage.make("importconfig.upload.button"), "propertiesFileParser.parse");
setCurrentSettingsForDisplay(tofill);
// Only add the commit button if the user has uploaded settings.
if (!uploadedConfigValues.keySet().isEmpty()) {
UIForm overwriteForm = UIForm.make(tofill, "overwrite-form");
UICommand.make(overwriteForm, "overwrite-button", UIMessage.make("importconfig.overwrite.config.button"), "overwriteSettingsHandler.saveOverwriteSettings");
}
// Clean the uploaded settings out
uploadedConfigValues = new HashMap<>();
}
示例7: interceptActionResult
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public void interceptActionResult(ARIResult result,
ViewParameters incoming, Object actionReturn) {
if (incoming instanceof GradebookItemViewParams) {
GradebookItemViewParams params = (GradebookItemViewParams) incoming;
if (params.finishURL != null && actionReturn.equals("cancel")) {
result.resultingView = new RawViewParameters(params.finishURL);
}
else if (params.finishURL != null && actionReturn.equals("submit")) {
//tack on name and due date of newly created item
String name = ((GradebookItemViewParams)result.resultingView).name;
String gbItemDueTime = "";
boolean requireDueDate = ((GradebookItemViewParams)result.resultingView).requireDueDate;
if (requireDueDate) {
Date dueDate = ((GradebookItemViewParams)result.resultingView).dueDate;
if (dueDate != null) {
gbItemDueTime = dueDate.getTime() + "";
}
}
result.resultingView = new RawViewParameters(params.finishURL + "?gbItemName=" + name + "&gbItemDueTime=" + gbItemDueTime);
}
}
}
示例8: fillComponents
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public void fillComponents(UIContainer tofill, ViewParameters viewparams, ComponentChecker checker) {
String locationId = externalLogic.getCurrentLocationId();
ToolSession session = sessionManager.getCurrentToolSession();
session.setAttribute(PermissionsHelper.TARGET_REF, locationId);
session.setAttribute(PermissionsHelper.DESCRIPTION,
messageLocator.getMessage("blogwow.permissions.header", externalLogic.getLocationTitle(locationId)) );
session.setAttribute(PermissionsHelper.PREFIX, "blogwow.");
UIOutput.make(tofill, HelperViewParameters.HELPER_ID, HELPER);
UICommand.make(tofill, HelperViewParameters.POST_HELPER_BINDING, "", null);
}
示例9: interceptActionResult
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public void interceptActionResult(ARIResult result, ViewParameters incoming, Object actionReturn) {
BlogEntryParams bep = (BlogEntryParams) incoming;
String ret = (String)actionReturn;
if (bep.blogid != null && (ret == null || !(ret.equals("error")))) {
result.resultingView = new SimpleBlogParams(BlogViewProducer.VIEW_ID, bep.blogid);
}
}
示例10: inferDefaultViewParameters
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public ViewParameters inferDefaultViewParameters(String reference) {
EntityReference ref = new EntityReference(reference);
BlogWowEntry bwe = entryLogic.getEntryById(ref.getId(), null);
if ( bwe != null ) {
return new BlogParams(BlogViewProducer.VIEW_ID, bwe.getBlog().getId(), ref.getId(), true);
} else {
throw new SecurityException("User does not have access to this entity: " + reference);
}
}
示例11: inferDefaultViewParameters
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public ViewParameters inferDefaultViewParameters(String reference) {
String decoded = null;
EntityReference ref = new EntityReference(reference);
try {
decoded = URLDecoder.decode(ref.getId(), "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new IllegalArgumentException(e);
}
return new BlogRssViewParams(BlogRSSProducer.VIEW_ID, null,
"/site/" + decoded);
}
示例12: inferDefaultViewParameters
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public ViewParameters inferDefaultViewParameters(String reference) {
String decoded = null;
EntityReference ref = new EntityReference(reference);
try {
decoded = URLDecoder.decode(ref.getId(), "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new IllegalArgumentException(e);
}
return new BlogParams(BlogViewProducer.VIEW_ID, true,
"/site/" + decoded);
}
示例13: adjustViewParameters
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public AnyViewParameters adjustViewParameters(ViewParameters incoming) {
AnyViewParameters togo = incoming;
if (ReportChooseGroupsProducer.VIEW_ID.equals(incoming.viewID)) {
ReportParameters params = (ReportParameters) incoming;
curViewableReports.populate(params.evaluationId);
if (curViewableReports.getViewableGroupIDs().length <= 1) {
ReportParameters viewReports = (ReportParameters) params.copyBase();
viewReports.viewID = ReportsViewingProducer.VIEW_ID;
viewReports.groupIds = curViewableReports.getViewableGroupIDs();
togo = new RedirectViewParameters(viewReports);
}
}
return togo;
}
示例14: inferDefaultViewParameters
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public ViewParameters inferDefaultViewParameters(String reference) {
//log.warn("Note: Routing user to view based on reference: " + reference);
final String ref = reference;
final ViewParameters[] togo = new ViewParameters[1];
// this is needed to provide transactional protection
wrapperInvoker.invokeRunnable(() -> { togo [0] = inferDefaultViewParametersImpl(ref); } );
return togo[0];
}
示例15: fillComponents
import uk.org.ponder.rsf.viewstate.ViewParameters; //导入依赖的package包/类
public void fillComponents(UIContainer tofill, ViewParameters arg1,
ComponentChecker arg2) {
ToolSession session = externalLogic.getCurrentToolSession();
session.setAttribute(PermissionsHelper.TARGET_REF, site.getReference());
session.setAttribute(PermissionsHelper.DESCRIPTION, messageLocator.getMessage("set.perms", new Object[]{site.getTitle()}));
session.setAttribute(PermissionsHelper.PREFIX, PERMISSION_PREFIX + ".");
String locale = localeGetter.get().toString();
Map<String, String> langMap = new HashMap<String, String>();
langMap.put("lang", locale);
langMap.put("xml:lang", locale);
UIOutput.make(tofill, "polls-html", null).decorate(new UIFreeAttributeDecorator(langMap));
List<String> perms = externalLogic.getPermissionKeys();
HashMap<String, String> pRbValues = new HashMap<String, String>();
for (int i = 0 ; i < perms.size(); i++) {
String perm = perms.get(i);
String descr = messageLocator.getMessage("desc-" + perm);
pRbValues.put("desc-" + perm, descr);
}
session.setAttribute("permissionDescriptions", pRbValues);
UIOutput.make(tofill, HelperViewParameters.HELPER_ID, HELPER);
UICommand.make(tofill, HelperViewParameters.POST_HELPER_BINDING, "", null);
}