Re: [Fornax-developer] [sculptor]How to change generation of xhtml views?
Impressing Andreas! Not easy to see that from the error message. You also need to add import of extensions:properties import sculptormetamodel; import sculptorguimetamodel; extension extensions::guihelper; extension extensions::properties; Från: Andreas Källberg Ämne: Re: [Fornax-developer] [sculptor]How to change generation of xhtml views? Till: fornax-developer@lists.sourceforge.net Datum: torsdag 23 september 2010 14:51 One thing, you need to import sculptorguimetamodel in your modifications. Andreas On Sep 23, 2010 2:23 p.m., greatfooty wrote: So took a plunge at this, gungho with xtendxpand ! ... 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. ... -- Nokia and ATT
Re: [Fornax-developer] [sculptor]How to change generation of xhtml views?
Thanks Andreas Patrik its working well now - and i think another xtend/xpand fan is now born! .. even tho i know i'll be frustrated by cryptic situations like that again soon Patrik Nordwall-2 wrote: Impressing Andreas! Not easy to see that from the error message. You also need to add import of extensions:properties import sculptormetamodel; import sculptorguimetamodel; extension extensions::guihelper; extension extensions::properties; Från: Andreas Källberg Ämne: Re: [Fornax-developer] [sculptor]How to change generation of xhtml views? Till: fornax-developer@lists.sourceforge.net Datum: torsdag 23 september 2010 14:51 One thing, you need to import sculptorguimetamodel in your modifications. Andreas On Sep 23, 2010 2:23 p.m., greatfooty wrote: ... -- View this message in context: http://old.nabble.com/-sculptor-How-to-change-generation-of-xhtml-views--tp29777660s17564p29803271.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
Re: [Fornax-developer] [sculptor]How to change generation of xhtml views?
So took a plunge at this, gungho with xtendxpand ! ... 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
Re: [Fornax-developer] [sculptor]How to change generation of xhtml views?
One thing, you need to import sculptorguimetamodel in your modifications. Andreas On Sep 23, 2010 2:23 p.m., greatfooty greatfo...@gmail.com wrote: So took a plunge at this, gungho with xtendxpand ! ... 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
Re: [Fornax-developer] [sculptor]How to change generation of xhtml views?
They are located in templates/web/ I think the one you are looking for is JSFCrudGuiFlowJsf.xpt and you can redefine them in your WebSpecialCases.xpt with ordinary AROUND mechanism. E.g. AROUND templates::web::jsfInputField(boolean editable) FOR ViewDataProperty /Patrik greatfooty wrote: I'm still very much novice with xtend and maybe on the wrong track but hoping someone can point me in the right direction ... i'm needing make a change to generation of crud xhtml files, specifically to use a different jsf component set for some page controls (such as a html editor to be included for certain String datatypes). I looked thru the dev guide and then browsed svn seeing the java code generation templates but unsure how the jsf based xhtml files get created. I could see no template for those in generator/src/main/templates .. are there other templates elsewhere OR do these xhtml files get generated using some other mechanism? :confused: -- View this message in context: http://old.nabble.com/-sculptor-How-to-change-generation-of-xhtml-views--tp29777660s17564p2962.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
Re: [Fornax-developer] [sculptor]How to change generation of xhtml views?
Thanks Patrick - i'd looked at a few in that folder but mistakenly presumed that one was relating somehow to webflow. :blush: -- View this message in context: http://old.nabble.com/-sculptor-How-to-change-generation-of-xhtml-views--tp29777660s17564p29778109.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