Package com.ibm.xsp.extlib.component.facebook

Examples of com.ibm.xsp.extlib.component.facebook.UIComments


    public void encodeBegin(FacesContext context, UIComponent component)
            throws IOException {
    if(UIFacebookClient.isClientEnabled((UIViewRootEx)context.getViewRoot())) {
          ResponseWriter writer = context.getResponseWriter();
         
          UIComments dialog = (UIComments)component;                  
 
          writer.startElement("fb:comments", component);

            writer.writeAttribute("id", component.getClientId(context), null);
         
          if (dialog.getNumPosts() == null) {
            writer.writeAttribute("num_posts", "", null);
          }
          else {
            writer.writeAttribute("num_posts", dialog.getNumPosts(), null);
          }
 
          if (dialog.getWidth() == null) {
            writer.writeAttribute("width", "500", null);
          }
          else {
            writer.writeAttribute("width", dialog.getWidth(), null);
          }
 
          if (dialog.getColorscheme() == null) {
            writer.writeAttribute("num_posts", "false", null);
          }
          else {
            writer.writeAttribute("num_posts", dialog.getColorscheme(), null);
          }
 
          if (dialog.getHref() == null) {
            writer.writeAttribute("href", "", null);
          }
          else {
            writer.writeAttribute("href", dialog.getHref(), null);
          }             
         
          writer.endElement("fb:comments");
    }
    }
View Full Code Here

TOP

Related Classes of com.ibm.xsp.extlib.component.facebook.UIComments

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.