Hello, 

I checked out the nuke-1.1 from cvs.

i pasted parts of the process(PageResult result, final Writer writer) method of 
ThemeTemplate.java file in the following.

Q1:  who will populate/initialize the PageResult ?
Q2:  What are contained in the result.getFragments()?

Thanks a lot.

yang 

---------------------------------------------------------------------
public void process(PageResult result, final Writer writer){

     String[] names = new String[]{"left", "middle", "right"};
      DelegateContext ctx = new DelegateContext();
      for (int i = 0; i < names.length; i++)
      {
         String name = names;
         for (Iterator j = result.getFragments(i).iterator(); j.hasNext();)
         {
            final PageFragment fragment = (PageFragment)j.next();
            ctx.append(name, new Context()
            {
               public String get(String key)
               {
                  if ("TITLE".equals(key))
                  {
                     return fragment.getTitle();
                  }
                  else if ("CONTENT".equals(key))
                  {
                     try
                     {
                        process(fragment.getBody(), writer);
                     }
                     catch (IOException e)
                     {
                        log.error("", e);
                     }
                  }
                  return "";
               }
               public Context put(String key, String value)
               {
                  return this;
               }
               public Iterator childIterator(String name)
               {
                  return Collections.EMPTY_LIST.iterator();
               }
            });
         }
      }
--------------------------

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3846875#3846875

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3846875


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to