本文整理匯總了Java中javax.portlet.ActionResponse.setEvent方法的典型用法代碼示例。如果您正苦於以下問題:Java ActionResponse.setEvent方法的具體用法?Java ActionResponse.setEvent怎麽用?Java ActionResponse.setEvent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.portlet.ActionResponse
的用法示例。
在下文中一共展示了ActionResponse.setEvent方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: dossierDangkyEvent
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
@ProcessEvent(qname = "{http://org.oep.com/events}ipc-dossierdangky")
public void dossierDangkyEvent(ActionRequest request,
ActionResponse response) {
/**
* Get sample text from UI
*/
String dossierProcId = ParamUtil
.getString(request, "dossierProcId", "");
QName qName = new QName("http://org.oep.com/events",
"ipc-dossierdangky");
response.setRenderParameter("tabs1",
ParamUtil.getString(request, "tabs1"));
response.setEvent(qName, dossierProcId);
}
示例2: myAdministrationNoEvent
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
public void myAdministrationNoEvent(ActionRequest request,
ActionResponse response) {
/**
* Get sample text from UI
*/
String administrationNo = ParamUtil.getString(request,
"administrationNo", "");
QName qName = new QName("http://org.oep.com/events",
"ipc-administrationno");
String tg = ParamUtil.getString(request, "tabs1");
if (tg == null || tg.equals("")) {
tg = "one";
}
response.setRenderParameter("tabs1", tg);
response.setEvent(qName, administrationNo);
}
示例3: processEvent
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
@ProcessAction(name="processEvent")
public void processEvent(ActionRequest request, ActionResponse response) {
/**
* Get sample text from UI
*/
String sampleText = ParamUtil.getString(request, "sampleText","");
Employee employee = new Employee();
//employee.name = "Trung";
employee.name = sampleText;
employee.address = "Dong Anh";
/**
* Refer portlet.xml
*/
QName qName = new QName("http://proliferay.com/events", "ipc-text");
response.setEvent(qName, employee);
}
示例4: myDomainNoEvent
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
@ProcessEvent(qname = "{http://org.oep.com/events}ipc-domainno")
public void myDomainNoEvent(ActionRequest request, ActionResponse response) {
/**
* Get sample text from UI
*/
String domainno = ParamUtil.getString(request, "domainNo", "");
QName qName = new QName("http://org.oep.com/events", "ipc-domainno");
System.out.println("Page: " + ParamUtil.getString(request, "tabs1"));
response.setRenderParameter("tabs1",
ParamUtil.getString(request, "tabs1"));
response.setEvent(qName, domainno);
}
示例5: goToModule
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
public void goToModule(ActionRequest actionRequest, ActionResponse actionResponse)throws Exception {
log.debug("***goToModule***");
actionResponse.removePublicRenderParameter("actionEditingActivity");
actionResponse.removePublicRenderParameter("actionEditingModule");
actionResponse.removePublicRenderParameter("actionCalifications");
actionResponse.removePublicRenderParameter("actionEditingDetails");
ThemeIdEvent themeIdEvent = new ThemeIdEvent();
themeIdEvent.setModuleId(ParamUtil.getLong(actionRequest, "moduleId",0));
themeIdEvent.setThemeId(ParamUtil.getLong(actionRequest, "themeId",1));
actionResponse.setEvent(new QName("http://www.wemooc.com/" , "themeId"), themeIdEvent);
}
示例6: processAction
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
public void processAction(ActionRequest req, ActionResponse resp)
throws PortletException, IOException {
dumpParameters(req);
String[] vals = req.getParameterValues(PARAM_FG_COLOR);
String r = "0";
String g = "0";
String b = "0";
if (vals != null) {
for (String v : vals) {
if (v.equals(PARAM_FG_RED)) r = "F";
if (v.equals(PARAM_FG_GREEN)) g = "F";
if (v.equals(PARAM_FG_BLUE)) b = "F";
}
}
String clr = "#" + r + g + b;
// make sure the private parameter are all on the URL for
// potential back button support
if (vals != null) {
resp.setRenderParameter(PARAM_FG_COLOR, vals);
}
String subType = req.getParameter(PARAM_SUBTYPE);
if (subType != null) {
resp.setRenderParameter(PARAM_SUBTYPE, subType);
}
String text = req.getParameter(PARAM_MSG_INPUT);
if (text != null) {
resp.setRenderParameter(PARAM_MSG_INPUT, text);
}
String msg = text + DELIM + clr;
// there should only be one publishing event, so take the first QName
Enumeration<QName> eqn = getPublishingEventQNames();
if (eqn.hasMoreElements()) {
QName qn = eqn.nextElement();
resp.setEvent(qn, msg);
logger.fine("Firing event with QName: " + qn.toString());
} else {
logger.warning("No publishing event QName available. Check portlet deployment descriptor.");
}
StringBuilder sb = new StringBuilder("Color: ").append(Arrays.toString(vals));
sb.append(", Submission type: ").append(subType);
sb.append(", Text: ").append(text);
logger.fine(sb.toString());
}
示例7: gotoEvaluation
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
public void gotoEvaluation(ActionRequest actionRequest, ActionResponse actionResponse)throws Exception {
ThemeIdEvent themeIdEvent = new ThemeIdEvent();
themeIdEvent.setModuleId(ThemeIdEvent.EVALUATION_THEME_ID);
themeIdEvent.setThemeId(0);
actionResponse.setEvent(new QName("http://www.wemooc.com/" , "themeId"), themeIdEvent);
}
示例8: goToModule
import javax.portlet.ActionResponse; //導入方法依賴的package包/類
public void goToModule(ActionRequest actionRequest, ActionResponse actionResponse)throws Exception {
ThemeIdEvent themeIdEvent = new ThemeIdEvent();
themeIdEvent.setModuleId(ParamUtil.getLong(actionRequest, "moduleId",0));
themeIdEvent.setThemeId(ParamUtil.getLong(actionRequest, "themeId",1));
actionResponse.setEvent(new QName("http://www.wemooc.com/" , "themeId"), themeIdEvent);
}