Hey All,
As of
LPS-5826 all request parameters will be loaded into the ServiceContext attributes map.
This means that all these will be available from within services that use ServiceContext.
i.e. Want to add a form field to the User creation form?
Just add the field:
1<html type="text" name="<portlet:namespace/>myCustomField" value="..." />
Later INSIDE
1 public User addUser(
2 long creatorUserId, long companyId, boolean autoPassword,
3 String password1, String password2, boolean autoScreenName,
4 String screenName, String emailAddress, String openId,
5 Locale locale, String firstName, String middleName, String lastName,
6 int prefixId, int suffixId, boolean male, int birthdayMonth,
7 int birthdayDay, int birthdayYear, String jobTitle, long[] groupIds,
8 long[] organizationIds, long[] roleIds, long[] userGroupIds,
9 boolean sendEmail, ServiceContext serviceContext)
10 throws PortalException, SystemException {
11 ...
Do this:
1
2 ...
3 Serializable param = serviceContext.getAttribute("myCustomField");
4 ...
That's it!
Be kell jelentkezni ahhoz, hogy ez helytelenként legyen megjelölve.