Package org.jboss.seam.pages

Examples of org.jboss.seam.pages.Page


      Conversation conversation = Conversation.instance();
      if ( !conversation.isNested() || conversation.isLongRunning() )
      {
         if (viewId!=null)
         {
            Page page = Pages.instance().getPage(viewId);
            return page.getConversationIdParameter().getParameterValue();
         }
         else
         {
            return conversation.getId();
         }
View Full Code Here


      String characterEncoding = context.getResponseWriter().getCharacterEncoding();
      boolean first = true;
      Set<String> usedParameters = new HashSet<String>();
     
      boolean conversationIdEncoded = false;
      Page page = Pages.instance().getPage(viewId);
     
      for ( Object child: getChildren() )
      {
         if (child instanceof UIParameter)
         {
            UIParameter uip = (UIParameter) child;
            if ( uip.getValue()!=null )
            {
               encodedUrl += getParameterString(characterEncoding, uip, first);
               first = false;
              
               if ( uip.getName().equals( page.getConversationIdParameter().getParameterName() ) )
               {
                  conversationIdEncoded = true;
               }
            }
            usedParameters.add( uip.getName() );
         }
      }
    
      if (viewId!=null)
      {
         Map<String, Object> pageParameters = Pages.instance().getConvertedParameters(context, viewId, usedParameters);
         for ( Map.Entry<String, Object> me: pageParameters.entrySet() )
         {
            UIParameter uip = new UIParameter();
            uip.setName( me.getKey() );
            uip.setValue( me.getValue() );
            encodedUrl += getParameterString(characterEncoding, uip, first);
            first = false;
          
            if (!conversationIdEncoded && me.getKey().equals(page.getConversationIdParameter().getParameterName()))
            {
               conversationIdEncoded = true;
            }
         }
      }
View Full Code Here

      String characterEncoding = context.getResponseWriter().getCharacterEncoding();
      boolean first = true;
      Set<String> usedParameters = new HashSet<String>();
     
      boolean conversationIdEncoded = false;
      Page page = Pages.instance().getPage(viewId);
     
      for ( Object child: getChildren() )
      {
         if (child instanceof UIParameter)
         {
            UIParameter uip = (UIParameter) child;
            if ( uip.getValue()!=null )
            {
               encodedUrl += getParameterString(characterEncoding, uip, first);
               first = false;
              
               if ( uip.getName().equals( page.getConversationIdParameter().getParameterName() ) )
               {
                  conversationIdEncoded = true;
               }
            }
            usedParameters.add( uip.getName() );
         }
      }
     
      if (viewId!=null)
      {
         Map<String, Object> pageParameters = Pages.instance().getConvertedParameters(context, viewId, usedParameters);
         for ( Map.Entry<String, Object> me: pageParameters.entrySet() )
         {
            UIParameter uip = new UIParameter();
            uip.setName( me.getKey() );
            uip.setValue( me.getValue() );
            encodedUrl += getParameterString(characterEncoding, uip, first);
            first = false;

            if (!conversationIdEncoded && me.getKey().equals(page.getConversationIdParameter().getParameterName()))
            {
               conversationIdEncoded = true;
            }
         }
      }
View Full Code Here

      if (viewId!=null)
      {
         List<Page> stack = getPageStack(viewId);
         for (int i=stack.size()-1; i>=0; i--)
         {
            Page page = stack.get(i);
            Navigation navigation = page.getNavigations().get(actionExpression);
            if (navigation==null)
            {
               navigation = page.getDefaultNavigation();
            }
           
            if ( navigation!=null && navigation.navigate(context, actionOutcomeValue) ) return true
           
         }
View Full Code Here

   public Page getPage(String viewId)
   {
      if (viewId==null)
      {
         //for tests
         return new Page(viewId);
      }
      else
      {
         Page result = getCachedPage(viewId);
         if (result==null)
         {
            return createPage(viewId);
         }
         else
View Full Code Here

      String resourceName = replaceExtension(viewId, ".page.xml");
      InputStream stream = resourceName==null ?
            null : Resources.getResourceAsStream( resourceName.substring(1) );
      if ( stream==null )
      {
         Page result = new Page(viewId);
         pagesByViewId.put(viewId, result);
         return result;
      }
      else
      {
View Full Code Here

         return getCachedPage(viewId);
      }
   }
   private Page getCachedPage(String viewId)
   {
      Page result = pagesByViewId.get(viewId);
      if (result==null)
      {
         //workaround for what I believe is a bug in the JSF RI
         viewId = replaceExtension( viewId, getSuffix() );
         if (viewId!=null)
View Full Code Here

            {
               stack.add( getPage(wildcard) );
            }
         }
      }
      Page page = getPage(viewId);
      if (page!=null) stack.add(page);
      return stack;
   }
View Full Code Here

   public String getScheme(String viewId)
   {
      List<Page> stack = getPageStack(viewId);
      for ( int i = stack.size() - 1; i >= 0; i-- )
      {
         Page page = stack.get(i);
         if (page.getScheme() != null) return page.getScheme();
      }
      return null;
   }  
View Full Code Here

   {
      List<ResourceBundle> result = new ArrayList<ResourceBundle>(1);
      List<Page> stack = getPageStack(viewId);
      for (int i=stack.size()-1; i>=0; i--)
      {
         Page page = stack.get(i);
         ResourceBundle bundle = page.getResourceBundle();
         if ( bundle!=null ) result.add(bundle);
      }
      return result;
   }
View Full Code Here

TOP

Related Classes of org.jboss.seam.pages.Page

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.