0 Replies Latest reply: Aug 13, 2009 9:25 AM by 807574 RSS

    Edit Button issues in sun portal for JSR portlets

    807574
      We deployed the JSR portlet having portletmode VIEW, EDIT and HELP. But able to see only HELP icon on the portlet.

      To debug the issue, we overrode the isEditable method of PortletWindowProvider class and used our portler window provider class as the provider class in display profile for our portlet. Following is the code of isEditable method

      ==================================================================
      public boolean isEditable() throws ProviderException{
                HttpServletRequest localHttpServletRequest = DesktopRequestThreadLocalizer.getRequest();
                //ROC.setObject("isAuthless", Boolean.TRUE);
                if (getProviderContext().isAuthless(localHttpServletRequest)){
                System.out.println("ProviderContext Failed ____________________________ ");          
                //return false;
                }else
                     System.out.println("ProviderContext passed ____________________________ ");
                Map localMap = getMapProperty("isEditableByMimeType");
                String str = getProviderContext().getContentType();
                boolean bool = true;
                if (localMap.containsKey(str))
                bool = ((Boolean)localMap.get(str)).booleanValue();
                if (!(bool)) {
                System.out.println("isEditableByMimeType is returning the FALSE ______________________");
                //return false;
                }     
                boolean returnValue = isMarkupSupported(str, getProviderContext().getLocaleString(), ChannelMode.EDIT, WindowState.MAXIMIZED);
                System.out.println("returnValue:::::::::::::::"+returnValue);
                return true;
           }
      =================================================================
      We ensured that isEditable always returns true. And also prionted some debug statements in the method to understand where the code is failing. As we are returning true the edit button is displaying but the edit link is not working.
      When we checked the log files we saw the 'ProviderContext Failed ____________________________ ' message printed. We feel some basic configuration is missing in the portal which is making the getProviderContext().isAutheLess method return false.
      Can someone please help us in understanding what we could have missed. Or is anything else needed to be specified in the portlet,.xml of our portlet. Also the property isEditable or any other custom properties are not shown for the jSR portlets.

      Please help.

      Regards,
      Kiran

      Edited by: nunnakirankumar on Aug 13, 2009 7:25 AM