So took a plunge at this, gungho with xtend&xpand ! ... but now bombing during generation. Created this in extensions/WebSpecialCases.ext (intent to just have an extra bit for custom type BigText):
import sculptormetamodel; extension extensions::guihelper; around extensions::guihelper::resolveJSFInputComponent(ViewDataProperty prop, boolean startTag) : if (prop.getAttributeType() == "BigText") then "rich:editor" + (startTag ? ' rendered="true" theme="advanced" viewMode="visual"' : '') else if (prop.getAttributeType() == "Date") then ((getDateTimeLibrary() == "java") ? 't:inputDate' + (startTag ? ' popupCalendar="true"' : '') : "h:inputText") else if (prop.getAttributeType() == "DateTime" || prop.getAttributeType() == "Timestamp") then ((getDateTimeLibrary() == "java") ? 't:inputDate' + (startTag ? ' popupCalendar="true" type="both"' : '') : "h:inputText") else if (prop.getAttributeType() == "boolean" || prop.getAttributeType() == "Boolean") then "h:selectBooleanCheckbox" else if prop.getDatabaseLength() != null && prop.getDatabaseLength().asInteger() > 100 then 'h:inputTextarea' + (startTag ? ' rows="10"' : '') else "h:inputText"; And this in WebSpecialCases.xpt (to include the rich and a4j namespaces): «IMPORT sculptormetamodel» «EXTENSION extensions::helper» «EXTENSION extensions::properties» «EXTENSION extensions::guihelper» «AROUND templates::JSFCrudGuiFlowJsf::faceletsXmlns FOR Object» xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core" xmlns:sf="http://www.springframework.org/tags/faces" xmlns:a="ApplicationTaglib" «ENDAROUND» Enabled these two files as per the dev guide: <workflow> <cartridge file="sculptorguidslworkflow.mwe"> <modelFile value="classpath:/model.guidesign"/> </cartridge> <component adviceTarget="generator" id="reflectionAdvice" class="org.eclipse.xpand2.GeneratorAdvice"> <advices value="templates::WebSpecialCases" /> <extensionAdvices value="extensions::WebSpecialCases" /> <fileEncoding value="iso-8859-1" /> </component> </workflow> But when running i get the following which refers to a completely different template ??? 21:55:24,319 ERROR Generator:194 - Error in Component generator of type org.ecli pse.xpand2.Generator: EvaluationException : null templates::web::JSFCrudGuiConfigWebXml.xpt[8202,12] on line 231 'getWebR oot()' templates::web::JSFCrudGuiConfigWebXml.xpt[1312,22] on line 36 'EXPAND a pplicationName' templates::web::JSFCrudGuiConfigWebXml.xpt[919,20] on line 26 'EXPAND we bXmlContent' templates::web::JSFCrudGuiConfig.xpt[883,37] on line 25 'EXPAND JSFCrudG uiConfigWebXml::webXml' templates::web::JSFCrudGui.xpt[839,31] on line 24 'EXPAND JSFCrudGuiConf ig::config' templates::GuiRoot.xpt[1088,41] on line 28 'EXPAND templates::web::JSFCr udGui::webApp' [23,47] on line 1 'EXPAND templates::GuiRoot::GuiRoot FOR guiModel' 21:55:24,319 ERROR WorkflowRunner:423 - Workflow interrupted. Reason: null 21:55:24,319 ERROR WorkflowRunner:450 - [ERROR](Element: getWebRoot(); Reported by: Generator(generator): generating 'templates::GuiRoot::GuiRoot FOR guiModel' I can see this setup as «DEFINE applicationName FOR GuiApplication» <display-name>«getWebRoot()»</display-name> «ENDDEFINE» and String getWebRoot(GuiApplication guiApplication) : JAVA org.fornax.cartridges.sculptor.generator.util.GuiGenerationHelper.getWebRoot(sculptorguimetamodel.GuiApplication); App was fully functional previously but fairly obviously there's some impact from my changes .. maybe some basic syntax error ?? Any ideas? - note I'm running 1.9.0 -- View this message in context: http://old.nabble.com/-sculptor-How-to-change-generation-of-xhtml-views--tp29777660s17564p29788690.html Sent from the Fornax-Platform mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Fornax-developer mailing list Fornax-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fornax-developer