You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Erik Hatcher <er...@ehatchersolutions.com> on 2004/10/19 15:58:43 UTC

Groovestry question - script.prefix

First, I want to give a big thanks and kudos to Geoff for Spindle and 
Michael and Richard for Groovestry.  In the past couple of weeks I have 
been toiling away at a new job where I have opted to put aside my old 
habits and approach technologies and tools with an open mind that I had 
previously neglected.  I have been a die-hard IntelliJ fanatic for 
quite some time, but have put it completely aside to give Eclipse my 
full attention.  I'm still reserving judgment on which I prefer - there 
are some things IntelliJ just does so much faster and cleaner, yet 
Eclipse has some very compelling features with the plugins.

I have gotten Eclipse, Spindle, JettyLauncher, and Groovestry up and 
running nicely.  This is a very sweet environment!  [I tried Palette, 
but drag-and-drop does not currently work on the Mac, so it doesn't 
really offer me much yet]

Now, on to my Groovestry question - I did not see a specific forum for 
Groovestry, so I'll ask here.  Point me to the appropriate forum if 
I've missed it and this is the wrong place to discuss it.

GroovyPage.html
<html>
<head>
   <title>Groovy Page</title>
</head>

<body>
    <span jwcid="@Insert" value="ognl:script.value"/>
</body>
</html>

GroovyPage.groovy
package application.script

import org.apache.tapestry.contrib.script.ScriptObject

class GroovyPage extends ScriptObject {

	public String getValue() {
		return "FooBar";
	}

}

Is it possible to make OGNL expressions relative to the page like it 
works with Java page classes, without the "script" prefix?  For 
example, if I had JavaPage.java with a getValue() method, my expression 
would be "ognl:value", not "ognl:script.value".

I really appreciate the level of detail Geoff has done with Spindle, 
with the extra effort to support Groovestry.  I immediately saw the 
error when I created the .page file with 
class="org.apache.tapestry.contrib.script.ScriptPage" for Groovestry 
but had not yet implemented the .groovy file.  And was even more 
impressed when I wanted to make the classname be global and did this in 
my .application:

	    <property name="org.apache.tapestry.default-page-class" 
value="org.apache.tapestry.contrib.script.ScriptPage"/>

And removed the class=".." attribute from my .page file with no errors 
shown.  Nice work and attention to detail!

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Groovestry question - script.prefix

Posted by Geoff Longman <gl...@gmail.com>.
> Right now both template and specification files need to be open but I'm
> working with Geoff to reach the point where only the template editor
> must be open.

Sorry for the delay Mike, I've got a pesky bug that I'm having trouble
fixing (MoveImplicitToSpec menu is missing in 3.1.13) and I have to
find a moment to stick Tapestry 3.0.1 into the Spindle distro!

Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Groovestry question - script.prefix

Posted by Michael Henderson <mh...@mac.com>.
As to the Palette plugin on the mac. Drag and drop may not work but you 
do get to inspect all of the components and their parameters w/o 
leaving Eclipse. The 0.0.5 version of the plugin adds a custom property 
sheet which allows you to inspect component parameters in the 
specification by double clicking on the jwcid attribute value in the 
template  without switching between template and specification

Right now both template and specification files need to be open but I'm 
working with Geoff to reach the point where only the template editor 
must be open.


Mike


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org