Adding user in specific Space in Webcenter

Small tip – To add user in space with some specified or custom role

Solution -If you are using PS6, this code will help you doing that.

    public void addMemberInSpace(String SpaceName, String userid) throws GroupSpaceWSException {
        logger.fine("Entering AddMember");
        try {
            GroupSpaceWSClient Gsclient = new GroupSpaceWSClient(contextData);

            String userRole = "CustomRole"; // You can define default role as admin, viewer, Moderator or some custom role as well
            GroupSpaceWSMembers memberData = new GroupSpaceWSMembers(userid, userRole);
            //Approval code will be added
            List<GroupSpaceWSMembers> addMem = new ArrayList<GroupSpaceWSMembers>();
            Gsclient.addMember(SpaceName, addMem);
        } catch ( gsException) {
            throw gsException;
        } catch (Exception exception) {
            throw new GroupSpaceWSException("Exception caught during addMembership ", null, null, exception, null);


Happy Coding with techartifact….

Sorting of Programmatic or transient view object in Oracle ADF

Tip- to sort a transient view object

When we use transient View Object to store data to represent in UI or manipulate business logic.
We may need to sort these Transient ViewObjects based on certain attribute.Add this below code to represent sort data.


Happy coding with Vinay in Techartifact …..

Programmatic Navigation in JSF/ADF | Techartifact

Requirement-How to programmatically navigate to next jsf page in taskflow.


Following code show the sample code for navigating one jsf to another using code.

FacesContext context = FacesContext.getCurrentInstance();

Package: javax.faces.application.NavigationHandler

public abstract void handleNavigation(FacesContext context, String fromAction, String outcome)

Perform navigation processing based on the state information in the specified FacesContext,plus the outcome string returned by an executed application action.
context – The FacesContext for the current request.
fromAction – The action binding expression that was evaluated to retrieve the specified outcome,or null if the outcome was acquired by some other means.
outcome – The logical outcome returned by a previous invoked application action (which may be null)

happy coding with techartifact . 🙂