tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tapestry-...@jakarta.apache.org
Subject [Jakarta Tapestry Wiki] Updated: MoreFrequentlyAskedQuestions
Date Sun, 12 Dec 2004 16:39:05 GMT
   Date: 2004-12-12T08:39:05
   Editor: HowardLewisShip <hlship@apache.org>
   Wiki: Jakarta Tapestry Wiki
   Page: MoreFrequentlyAskedQuestions
   URL: http://wiki.apache.org/jakarta-tapestry/MoreFrequentlyAskedQuestions

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -72,14 +72,20 @@
 public abstract String getEvent(); 
 }}}
 
+HowardLewisShip:  I call this the ''Tapestry Bucket Brigade''.
+
 == I just created a new page and now I get a 'class instantiation problem'.  Why can’t it
instantiate my class? ==
 
 Most likely you created your class abstract when it didn’t need to be.  Tapestry doesn’t
create an enhanced subclass if there are no <property-specification> elements.  A concrete
class is never created by Tapestry in this case and since abstract classes cannot be instantiated,
this exception pops up.  You either need to create a <property-specification> element
or make your class concrete by removing the abstract identifier.
 
+HowardLewisShip: This is a bug fixed in Tapestry 3.0.1.  In 3.0.1, if you class is abstract
but there is not need for enhancement, Tapestry will quitely enhance your class anyway, just
so it isn't abstract.
+
 == How can I share data across two Tapestry applications? ==
 
 Even if you’re running two Tapestry applications within the same Application Server (i.e.
Tomcat) you can’t share data between them within the Application Server.  You can merge the
two applications together into one application and then share data through singleton objects
within the Application Server.  Alternatively the two applications can share data at a lower
level common level, i.e. the operating system (message passing) or a database.
 
+HowardLewisShip: It is possible to have two different applications within the same WAR, never
mind, EAR, in which case, singletons can be stored in the ServletContext. If you ''carefully''
check the specification and template file resolution rules (in the Users Guide), you can see
how to keep the pieces seperate from each other.  However, this is not widely used and there's
a possibility it won't make it into Tapestry 3.1.
+
 == What is Spindle? ==
 
 Spindle is a plugin for the Eclipse IDE.  Eclipse is available at www.eclipse.org and Spindle
is available at spindle.sourceforge.net.  The Spindle adds intelligence about Tapestry into
Eclipse.  The end result is an IDE that is aware of Tapestry Components and Pages by providing
Wizard interfaces and navigation widgets for the creation and viewing of Tapestry Components
and Pages.  It is well worth a look if you intend on developing with Tapestry.  Download Eclipse
first and then install Spindle through the auto update feature of Eclipse.
@@ -117,13 +123,15 @@
 {{{
 Public void submit() {
 	// getVisit() will need to be casted to the defined Visit class
-	Some.example.Visit visit = (Some.example.Visit)getPage().getVisit();
+	some.example.Visit visit = (some.example.Visit)getPage().getVisit();
 }
 }}}
 
 == How do I make a property in a Component persistent? ==
 
 Pages support persistent properties so place the persistent property in the encompassing
Page and pass it into the Component.  The property will remain persistent and be passed into
the Component as a parameter.  The Component will need not know, or care, that the property
is persistent.
+
+HowardLewisShip: The above is technically correct, but <property-specification> inside
a component can still use the persist="yes" attribute and be persistent!  The mechanism is
exactly the same for pages as it is for components, just the HttpSession attribute key is
a bit longer (it incorporates the page name, the component id path and the property name).
 
 
 == Where can I find a Tapestry tutorial? ==

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


Mime
View raw message