本文整理汇总了Java中com.liferay.portal.kernel.util.StringUtil.upperCaseFirstLetter方法的典型用法代码示例。如果您正苦于以下问题:Java StringUtil.upperCaseFirstLetter方法的具体用法?Java StringUtil.upperCaseFirstLetter怎么用?Java StringUtil.upperCaseFirstLetter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portal.kernel.util.StringUtil
的用法示例。
在下文中一共展示了StringUtil.upperCaseFirstLetter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: callSetMethod
import com.liferay.portal.kernel.util.StringUtil; //导入方法依赖的package包/类
private void callSetMethod(String formField, Module module, Long value) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException{
String strMethod = "set"+StringUtil.upperCaseFirstLetter(formField);
Method methodSet = module.getClass().getMethod(strMethod,long.class);
methodSet.invoke(module, value);
}
示例2: processAction
import com.liferay.portal.kernel.util.StringUtil; //导入方法依赖的package包/类
public void processAction(
PortletConfig portletConfig, ActionRequest actionRequest,
ActionResponse actionResponse)
throws Exception {
if (!Constants.UPDATE.equals(actionRequest.getParameter(Constants.CMD))) {
return;
}
PortletPreferences portletPreferences =
PortletPreferencesFactoryUtil.getPortletSetup(
actionRequest, ParamUtil.getString(actionRequest, "portletResource"));
portletPreferences.setValue("showInscriptionDate",Boolean.toString(ParamUtil.getBoolean(actionRequest, "inscriptionDate",true)));
portletPreferences.setValue("showExecutionDate",Boolean.toString(ParamUtil.getBoolean(actionRequest, "executionDate",true)));
portletPreferences.setValue("categories",Boolean.toString(ParamUtil.getBoolean(actionRequest, "categories",true)));
portletPreferences.setValue("showcatalog",Boolean.toString(ParamUtil.getBoolean(actionRequest, "showcatalog",true)));
portletPreferences.setValue("courseTemplates", StringUtil.merge(actionRequest.getParameterMap().get( "courseTemplates")));
portletPreferences.setValue("showCourseCatalogForEditions",Boolean.toString(ParamUtil.getBoolean(actionRequest, "showCourseCatalogForEditions", false)));
portletPreferences.setValue("showClose", Boolean.toString(ParamUtil.getBoolean(actionRequest, "showClose", true)));
portletPreferences.setValue("showDelete", Boolean.toString(ParamUtil.getBoolean(actionRequest, "showDelete", true)));
portletPreferences.setValue("showMembers", Boolean.toString(ParamUtil.getBoolean(actionRequest, "showMembers", true)));
portletPreferences.setValue("showExport", Boolean.toString(ParamUtil.getBoolean(actionRequest, "showExport", true)));
portletPreferences.setValue("showImport", Boolean.toString(ParamUtil.getBoolean(actionRequest, "showImport", true)));
portletPreferences.setValue("showGroupFilter", Boolean.toString(ParamUtil.getBoolean(actionRequest, "showGroupFilter", false)));
portletPreferences.setValue("showClone", Boolean.toString(ParamUtil.getBoolean(actionRequest, "showClone", true)));
portletPreferences.setValue("showGo", Boolean.toString(ParamUtil.getBoolean(actionRequest, "showGo", true)));
portletPreferences.setValue("showPermission",Boolean.toString(ParamUtil.getBoolean(actionRequest, "showPermission", true)));
portletPreferences.setValue("showRegistrationType", Boolean.toString(ParamUtil.getBoolean(actionRequest, "showRegistrationType", true)));
portletPreferences.setValue("showMaxUsers", Boolean.toString(ParamUtil.getBoolean(actionRequest, "showMaxUsers", true)));
portletPreferences.setValue("showResume",Boolean.toString(ParamUtil.getBoolean(actionRequest, "showResume", false)));
portletPreferences.setValue("showDescription",Boolean.toString(ParamUtil.getBoolean(actionRequest, "showDescription", false)));
portletPreferences.setValue("showSearchTags",Boolean.toString(ParamUtil.getBoolean(actionRequest, "showSearchTags", false)));
portletPreferences.setValue("showWelcomeMsg",Boolean.toString(ParamUtil.getBoolean(actionRequest, "showWelcomeMsg", true)));
portletPreferences.setValue("showGoodbyeMsg",Boolean.toString(ParamUtil.getBoolean(actionRequest, "showGoodbyeMsg", true)));
portletPreferences.setValue("showOnlyOrganizationUsers",Boolean.toString(ParamUtil.getBoolean(actionRequest, "showOnlyOrganizationUsers", true)));
portletPreferences.setValue("showCalendar", Boolean.toString(ParamUtil.getBoolean(actionRequest, "showCalendar", false)));
portletPreferences.setValue("inscriptionDateColumn",Boolean.toString(ParamUtil.getBoolean(actionRequest, "inscriptionDateColumn", true)));
portletPreferences.setValue("executionDateColumn",Boolean.toString(ParamUtil.getBoolean(actionRequest, "executionDateColumn", true)));
portletPreferences.setValue("allowDuplicateName",Boolean.toString(ParamUtil.getBoolean(actionRequest, "allowDuplicateName", false)));
portletPreferences.setValue("showIconCourse",Boolean.toString(ParamUtil.getBoolean(actionRequest, "showIconCourse", true)));
portletPreferences.setValue("showCoursePermission",Boolean.toString(ParamUtil.getBoolean(actionRequest, "showCoursePermission", true)));
portletPreferences.setValue("showEditionsWithoutRestrictions",Boolean.toString(ParamUtil.getBoolean(actionRequest, "showEditionsWithoutRestrictions", false)));
portletPreferences.setValue("filterByTemplates", Boolean.toString(ParamUtil.getBoolean(actionRequest, "filterByTemplates", false)));
portletPreferences.setValue ("tipoImport", ParamUtil.getString(actionRequest, "tipoImport", ""));
//Campos personalizados a mostrar en la tabla
// Expandos dinamicos
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
List<ExpandoColumn> expandosColumnCourse = ExpandoColumnLocalServiceUtil.getDefaultTableColumns(themeDisplay.getCompanyId(), ClassNameLocalServiceUtil.getClassNameId(Course.class));
if(Validator.isNotNull(expandosColumnCourse) && expandosColumnCourse.size()>0) {
String expandoName="";
for (ExpandoColumn expandoCourse : expandosColumnCourse) {
expandoName = StringUtil.upperCaseFirstLetter(expandoCourse.getName());
log.debug("SAVE: show" + expandoName+ " VALUE: "+actionRequest.getParameter("show" + expandoName));
portletPreferences.setValue("show" + expandoName, actionRequest.getParameter("show" + expandoName));
}
}
portletPreferences.store();
SessionMessages.add(
actionRequest, portletConfig.getPortletName() + ".doConfigure");
}