Package javax.portlet

Examples of javax.portlet.PortletConfig


        HttpServletResponse response =
            (HttpServletResponse) pageContext.getResponse();
       
        PortletRequest renderRequest = (PortletRequest)pageContext.getRequest().getAttribute("javax.portlet.request");
        RenderResponse renderResponse = (RenderResponse)pageContext.getRequest().getAttribute("javax.portlet.response");
        PortletConfig portletConfig = (PortletConfig)pageContext.getRequest().getAttribute("javax.portlet.config");


   
        // if the node is root node and the label value is
        // null, then do not render root node in the tree.
View Full Code Here


          {
            case portletConfig:
              // only resolved in a Faces expression
              if (isFacesResolved)
              {
                PortletConfig config = bridgeContext.getPortletConfig();
                if (config != null)
                {
                  context.setPropertyResolved(true);
                  return config;
                } else
View Full Code Here

    if (mDefaultViewIdMap == null)
    {
      mDefaultViewIdMap = new HashMap<String, String>();
      // loop through all portlet initialization parameters looking for those in the
      // correct form
      PortletConfig config = getPortletConfig();

      Enumeration<String> e = config.getInitParameterNames();
      int len = DEFAULT_VIEWID.length();
      while (e.hasMoreElements())
      {
        String s = e.nextElement();
        if (s.startsWith(DEFAULT_VIEWID) && s.length() > DEFAULT_VIEWID.length())
        {
          String viewId = config.getInitParameter(s);
          // extract the mode
          s = s.substring(len + 1);
          mDefaultViewIdMap.put(s, viewId);
        }
      }
View Full Code Here

    if (mDefaultViewIdMap == null)
    {
      mDefaultViewIdMap = new HashMap<String, String>();
      // loop through all portlet initialization parameters looking for those in the
      // correct form
      PortletConfig config = getPortletConfig();

      Enumeration<String> e = config.getInitParameterNames();
      int len = DEFAULT_VIEWID.length();
      while (e.hasMoreElements())
      {
        String s = e.nextElement();
        if (s.startsWith(DEFAULT_VIEWID) && s.length() > DEFAULT_VIEWID.length())
        {
          String viewId = config.getInitParameter(s);
         
          // Don't add if there isn't a view
          if (viewId == null || viewId.length() == 0) continue;
         
          // extract the mode
View Full Code Here

  /* (non-Javadoc)
   * @see org.apache.pluto.tags.BaseURLTag#doStartTag()
   */
  @Override
  public int doStartTag() throws JspException {
      PortletConfig portletConfig =
            (PortletConfig) pageContext.getRequest().getAttribute(Constants.PORTLET_CONFIG);
     
        Map<String,String[]> containerRuntimeOptions = portletConfig.getContainerRuntimeOptions();
        if (containerRuntimeOptions != null){
            String[] result = containerRuntimeOptions.get(Constants.ESCAPE_XML_RUNTIME_OPTION);
            if (result != null){
                if (result.length > 0){
                    if (result[0].equals(true))
View Full Code Here

    throws PortletException {
        if ( this.portlet == null ) {
            throw new PortletException("Unable to instantiate portlet from class " + this.portletDefinition.getClassName());
        }
        PortletContext portletContext;
        PortletConfig portletConfig;
        portletContext = PortletObjectAccess.getPortletContext(this.servletConfig.getServletContext(),
                portletDefinition.getPortletApplicationDefinition());
        portletConfig = PortletObjectAccess.getPortletConfig(this.servletConfig,
                portletContext,
                portletDefinition);
View Full Code Here

public class PortletConfigStrategy implements DescribableStrategy
{

    public void describeObject(Object object, DescriptionReceiver receiver)
    {
        PortletConfig pc = (PortletConfig) object;

        receiver.title("Portlet Config");

        receiver.property("portletName", pc.getPortletName());

        receiver.section("Init Parameters");

        Iterator i = WebUtils.toSortedList(pc.getInitParameterNames())
                .iterator();

        while(i.hasNext())
        {
            String name = (String) i.next();
            receiver.property(name, pc.getInitParameter(name));
        }
    }
View Full Code Here

public class TestPortletWebActivator extends BasePortletWebTestCase
{
    public void testGetActivatorName()
    {
        MockControl control = newControl(PortletConfig.class);
        PortletConfig config = (PortletConfig) control.getMock();

        config.getPortletName();
        control.setReturnValue("portlet");

        replayControls();

        PortletWebActivator pwa = new PortletWebActivator(config);
View Full Code Here

    }

    public void testGetInitParameterNames()
    {
        MockControl control = newControl(PortletConfig.class);
        PortletConfig config = (PortletConfig) control.getMock();

        config.getInitParameterNames();
        control.setReturnValue(newEnumeration());

        replayControls();

        PortletWebActivator pwa = new PortletWebActivator(config);
View Full Code Here

    public void testGetInitParameterValue()
    {
        String value = "William Orbit";

        MockControl control = newControl(PortletConfig.class);
        PortletConfig config = (PortletConfig) control.getMock();

        config.getInitParameter("artist");
        control.setReturnValue(value);

        replayControls();

        PortletWebActivator pwa = new PortletWebActivator(config);
View Full Code Here

TOP

Related Classes of javax.portlet.PortletConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.