XSPPageContainer0 Blogging Page Layout function checkIfAvailable(htmlElement : DOMElement):boolean { // >>>Insert your code here ...<<< } true blog mainTitle com.flowbuilder.xsp.components.xspc.editors.StringEditor subTitle com.flowbuilder.xsp.components.xspc.editors.StringEditor function handleEvent(event : XEVAfterHtmlDom) { // Set the page title doc = event.getHtmlDocument(); de = doc.getRootElement(); head = de.getChild("head"); head.addContent("<title>" + componentData.pageTitle + "</title>"); /* This code is a sample of manipulating the DOM to alter the header to supply a custom META tag print ("*-*-*- XEVAfterHtmlDom -*-*-*"); doc = event.getHtmlDocument(); print (doc.getDocType().toString()); de = doc.getRootElement(); print (de.toString()); el = de.getChild("head"); print ("EL: " + el.toString()); el.addContent("<meta http-equiv=\"blah\" content=\"bwaa\">"); */ } com.flowbuilder.xsp.event.AfterHtmlDomEvent function handleEvent(event : XEVBuildHtml) { doc = event.getHtmlDocument(); dt = new org.jdom.DocType("html", "-//W3C//DTD XHTML 1.0 Strict//EN", "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"); doc.setDocType(dt); } com.flowbuilder.xsp.event.MainHtmlEvent true xsp2 blog/stylesheets/style_3col.css text/css true a1 componentData.mainTitle; true subtitle parameters.setStringValue("/ROOT/greeting", componentData.subTitle); componentData.subTitle; true a12 newDocument true blog/rss.jsp true true image1 src context.getBaseUrlContextPath() + "/blog/images/xml.png"; border "0" true a6 db = session.openDatabase("blog"); myview = db.openView("view_BlogEntries"); if (myview.getDocumentCount() <= 10) return true; else return false; newDocument true blog 2 10 blog/view_blogarchives.xsp true view_BlogEntries true br1 db = session.openDatabase("blog"); myview = db.openView("view_BlogEntries"); if (myview.getDocumentCount() <= 10) return true; else return false; true a10 db = session.openDatabase("blog"); myview = db.openView("view_articles"); if (myview.getDocumentCount() <= 10) return true; else return false; newDocument true blog 2 10 blog/view_articlearchives.xsp true view_articles true xsp4 // get the links view and parse all of the documents in that view returnStr = ""; db = session.openDatabase("blog"); myview = db.openView("links_view"); entryCollection = myview.getAllEntries(); entry = entryCollection.getFirstEntry(); while (entry != null) { try { returnStr += "<a href=\"" + entry.getValue(2) + "\" title=\"" + entry.getValue(1) + "\">" + entry.getValue(0) + "</a><br>"; } catch (ex) { print ("Exception iterating view entry collection"); print (ex.toString()); } finally { entry = entryCollection.getNextEntry(); } } return returnStr; true true true xsp1 true xsp5 // get the links view and parse all of the documents in that view returnStr = ""; db = session.openDatabase("blog"); myview = db.openView("articles_view"); entryCollection = myview.getAllEntries(); entry = entryCollection.getFirstEntry(); while (entry != null) { try { returnStr += "<a href=\"" + entry.getDocument().getXSPLink(context.getContextPath(), "blog/form_permalink.xsp", false) + "\" title=\"View this article\">" + entry.getValue(1) + "</a><br>"; } catch (ex) { print ("Exception iterating view entry collection"); print (ex.toString()); } finally { entry = entryCollection.getNextEntry(); } try { if (entry != null) { if (entry.getRowNumber() > 10) { entry = null; } } } catch (ex) { print ("Exception iterating view entry collection"); print (ex.toString()); } } return returnStr; true true true form1 2 2 true a2 !context.canAuthenticateProgrammatically() || !context.getUser().isAnonymous(); 2 1 function handleEvent(event : XEVClient) { context.authenticate(); } true true a3 context.getUser().isAnonymous(); 2 1 function handleEvent(event : XEVClient) { context.logout(); } true true xsp3 context.getUser().isAnonymous(); true a4 newDocument true 1 blog/form_blog.xsp true true a7 newDocument true blog 1 blog/form_link.xsp true link true a5 newDocument true 1 blog/form_greeting.xsp true true a11 newDocument true blog 2 blog/view_blog.xsp true view_allentries true a8 newDocument true blog 2 blog/view_links.xsp true view_links true a9 newDocument true blog 2 blog/view_greetings.xsp true view_greetings true