How to Set User Group Id to liferay theme Layout Id ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to Set User Group Id to liferay theme Layout Id ?

raju
Hi All

If we want to work with organization specific forms then do below changes in LiferaySupprt.scala

Step 1 :Setting User GroupId to User
        Option(u.getGroup) map (_.getGroupId.toString) toList

Step 2 :Insted of setting User Group Id ,set the organization Id to User Group Id
       
       i.  Need for Scala code Snippet ?
         
           Challenges: Get the theme display Object and setting the user group id to Organization Id using scala language

       ii. Java Code snippet for setting the User Gruop Id to Current Organization Id using the theme display Object .

                ThemeDisplay objDisplay = (ThemeDisplay )actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
                User objUser = objDisplay.getUser();
               
                try {
                        objUser.getGroup().setGroupId(objDisplay.getLayout().getGroupId());
                } catch (PortalException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (SystemException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }

How to set user group Id to the theme display layout Group Id in Scala Language,if possible where to place that code snippet in 'LiferaySupport.Scala' or else OrbeonProxyPortlet.scala  or  in which class i dont know scala language ,but i want insert the my liferay theme  layout group id to the user group id

Please help me ?

Thanks ,
RaaZ