[jboss-cvs] jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/ui ...

Christian Bauer christian at hibernate.org
Mon May 7 07:42:33 EDT 2007


  User: cbauer  
  Date: 07/05/07 07:42:33

  Modified:    examples/wiki/src/main/org/jboss/seam/wiki/core/ui 
                        UIWikiFormattedText.java
  Log:
  Switched to tabbed ajax forms
  
  Revision  Changes    Path
  1.22      +41 -27    jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: UIWikiFormattedText.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- UIWikiFormattedText.java	26 Apr 2007 05:29:17 -0000	1.21
  +++ UIWikiFormattedText.java	7 May 2007 11:42:33 -0000	1.22
  @@ -85,6 +85,18 @@
   
               public String renderThumbnailImageInlineLink(WikiLink inlineLink) {
                   File file = (File) inlineLink.getNode();
  +                Conversation conversation = (Conversation) Component.getInstance("conversation");
  +
  +                if (file.getImageMetaInfo().getThumbnail() == 'F') {
  +                    // Full size display, no thumbnail
  +
  +                    String imageUrl = WikiUtil.renderURL(inlineLink.getNode()) + "&cid=" + conversation.getId();
  +                    return "<img src='"+ imageUrl + "'" +
  +                            " width='"+ file.getImageMetaInfo().getSizeX()+"'" +
  +                            " height='"+ file.getImageMetaInfo().getSizeY() +"'/>";
  +                } else {
  +                    // Thumbnail with link display
  +
                   int thumbnailWidth;
                   // TODO: We could make these sizes customizable, maybe as attributes
                   // of the JSF tag
  @@ -101,7 +113,7 @@
                       default:
                           thumbnailWidth = file.getImageMetaInfo().getSizeX();
                   }
  -                Conversation conversation = (Conversation) Component.getInstance("conversation");
  +
                   // I have no idea why this needs HTML entities for the & symbol -
                   // Firefox complains about invalid XML if an & is in an attribute
                   // value!
  @@ -113,6 +125,8 @@
                           .getNode())) + "\" class=\""
                           + getAttributes().get("thumbnailLinkStyleClass") + "\"><img src=\""
                           + thumbnailUrl + "\"/></a>";
  +
  +                }
               }
   
               public String renderMacro(String macroName) {
  
  
  



More information about the jboss-cvs-commits mailing list