JXTemplate question
Can you help me out with this. This works: input type=text value=#{$inneritem}/input This doesn't textarea#{$inneritem}/textarea Or it does actually work, but the result in a) is xxx and in b) tagnamexxx/tagname What I am doing this template is to create an html page out of xml derived from CForms binding. Guess this would have been easier with XSL.. So the idea is to initialize form controls with values from XML elements, not with the whole XML elements. - mika - - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
RE: JXTemplate question
What is the actual value of inneritem? A tag? And yes... using XSLT this would have been a breeze ;-) But maybe you use the wrong xpath expression? I'm not sure what the binding returns. Suppose your current xpath looks like /root/tagname Give following a try /root/tagname/text() /root/tagname/node() Robby -Original Message- From: m...@digikartta.net [mailto:m...@digikartta.net] Sent: Friday, November 16, 2012 2:33 PM To: users@cocoon.apache.org Subject: JXTemplate question Can you help me out with this. This works: input type=text value=#{$inneritem}/input This doesn't textarea#{$inneritem}/textarea Or it does actually work, but the result in a) is xxx and in b) tagnamexxx/tagname What I am doing this template is to create an html page out of xml derived from CForms binding. Guess this would have been easier with XSL.. So the idea is to initialize form controls with values from XML elements, not with the whole XML elements. - mika - - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: JXTemplate question
On 16/11/2012 14:32, m...@digikartta.net wrote: Can you help me out with this. This works: input type=text value=#{$inneritem}/input This doesn't textarea#{$inneritem}/textarea Or it does actually work, but the result in a) is xxx and in b) tagnamexxx/tagname What I am doing this template is to create an html page out of xml derived from CForms binding. Guess this would have been easier with XSL.. So the idea is to initialize form controls with values from XML elements, not with the whole XML elements. Hi, I am not fresh with JX and CForms since long time, so I can't help you directly; anyway, I've found this old thread [1] that might be useful in your case (especially the latest reply). I'd suggest to search at http://cocoon.markmail.org/ : it seems that your issue used to be a common pattern. Regards. [1] http://markmail.org/message/ixibbm2zu7zn7fgf -- Francesco Chicchiriccò ASF Member, Apache Cocoon PMC and Apache Syncope PPMC Member http://people.apache.org/~ilgrosso/
RE: JXTemplate question
Yes! This one works. #{$inneritem/text()} Thanks Robby! - mika - On Fri, 16 Nov 2012 13:48:27 +, Robby Pelssers robby.pelss...@nxp.com wrote: What is the actual value of inneritem? A tag? And yes... using XSLT this would have been a breeze ;-) But maybe you use the wrong xpath expression? I'm not sure what the binding returns. Suppose your current xpath looks like /root/tagname Give following a try /root/tagname/text() /root/tagname/node() Robby -Original Message- From: m...@digikartta.net [mailto:m...@digikartta.net] Sent: Friday, November 16, 2012 2:33 PM To: users@cocoon.apache.org Subject: JXTemplate question Can you help me out with this. This works: input type=text value=#{$inneritem}/input This doesn't textarea#{$inneritem}/textarea Or it does actually work, but the result in a) is xxx and in b) tagnamexxx/tagname What I am doing this template is to create an html page out of xml derived from CForms binding. Guess this would have been easier with XSL.. So the idea is to initialize form controls with values from XML elements, not with the whole XML elements. - mika - - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Re: Quick JXTemplate question
On 28.06.2004 09:45, Derek Hohls wrote: If I need to access variables, created in flow, from a JXTemplate page that is NOT called by the flowscript itself. how can I do that? (Do I need to create a session at the start of the flowscript, or is there some other, better way?) If these variables only must live from flowscript to JXTemplate (so are really temporary) I would suggest to store them as request attribute instead of sesseion attribute. The way is the same ... Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Quick JXTemplate question
If I need to access variables, created in flow, from a JXTemplate page that is NOT called by the flowscript itself. how can I do that? (Do I need to create a session at the start of the flowscript, or is there some other, better way?) -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quick JXTemplate question
Derek Hohls wrote: If I need to access variables, created in flow, from a JXTemplate page that is NOT called by the flowscript itself. how can I do that? (Do I need to create a session at the start of the flowscript, or is there some other, better way?) No, it's not PHP;-) You don't need to create a session yourself (normally) ;-) You can use a session in flow simply like: cocoon.session.setAttribute(foo, foo); In JXTemplate you can retrieve you object like: ${cocoon.session.getAttribute('foo')} Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quick JXTemplate question
Stephan Thanks, sorry for my poor choice of words - I had meant to say use the session... but does what you have suggested imply there is a de-facto cocoon session that already exists by viture of the fact that I working with flow? And.. does this approach work for array variables as well? (I guess if it's an object, then yes??) Thanks Derek [EMAIL PROTECTED] 2004/06/28 10:24:02 AM Derek Hohls wrote: If I need to access variables, created in flow, from a JXTemplate page that is NOT called by the flowscript itself. how can I do that? (Do I need to create a session at the start of the flowscript, or is there some other, better way?) No, it's not PHP;-) You don't need to create a session yourself (normally) ;-) You can use a session in flow simply like: cocoon.session.setAttribute(foo, foo); In JXTemplate you can retrieve you object like: ${cocoon.session.getAttribute('foo')} Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quick JXTemplate question
Derek Hohls wrote: does what you have suggested imply there is a de-facto cocoon session that already exists Yes. If you use cocoon.session.setAttribute('foo') and not already a session exists, a new one would be created automatically. And.. does this approach work for array variables as well? (I guess if it's an object, then yes??) Yes, it sould work with arrays of primitive (eg. int[]) type, too. Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: very basic JXTemplate question
Bear in the mind the use you making of it: JXTemplate*Generator* (vs Transformer) - my basic conceptual understanding of this type of approach is: * generator - data structure only (XML) * (final transformer) - layout, say in HTML (with DIV's) with styling and presentation in CSS Obviously other steps can occur in-between, such as internationalisation and filtering - but if you now need to present the output on another device or in another format, then your basic XML data structure should not require any adjustments. HTH Derek [EMAIL PROTECTED] 2004/05/13 08:22:31 PM Hi, conceptualy, should i combine jxtemplates with further xsl transformations, or is it better to put the presentation code directly into jxtemplates? what's the common use? thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
very basic JXTemplate question
Hi, conceptualy, should i combine jxtemplates with further xsl transformations, or is it better to put the presentation code directly into jxtemplates? what's the common use? thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: very basic JXTemplate question
On 13.05.2004 20:22, defe wrote: Hi, conceptualy, should i combine jxtemplates with further xsl transformations, or is it better to put the presentation code directly into jxtemplates? what's the common use? It depends :-) The more you might need to reuse a template the more abstract its code from the final presentation and put this into later xsl transformations. The template would be only the structure of the page then. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: very basic JXTemplate question
Joerg Heinicke wrote: On 13.05.2004 20:22, defe wrote: Hi, conceptualy, should i combine jxtemplates with further xsl transformations, or is it better to put the presentation code directly into jxtemplates? what's the common use? It depends :-) The more you might need to reuse a template the more abstract its code from the final presentation and put this into later xsl transformations. The template would be only the structure of the page then. Joerg Ok, so jxtemplates is not a all-in-one alternative to xslt... thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]