Dear Wiki user, You have subscribed to a wiki page or wiki category on "Jakarta-tapestry Wiki" for change notification.
The following page has been changed by AnthonyMartin: http://wiki.apache.org/jakarta-tapestry/MoreFrequentlyAskedQuestions The comment on the change is: Changed "unknown" characters (?) to best guesses. ------------------------------------------------------------------------------ == Where is the (some random HTML) component? (e.g., TD) == - Any component that does not have a direct Tapestry component can be represented with the Tapestry ANY component. For example, say you want to have Tapestry generate the background color for your table using a TD component you could use <td [EMAIL PROTECTED] bgcolor=Âognl:backgroundColorÂ></td>. + Any component that does not have a direct Tapestry component can be represented with the Tapestry ANY component. For example, say you want to have Tapestry generate the background color for your table using a TD component you could use <td jwcid="@Any" bgcolor="ognl:backgroundColor"></td>. - == Why isnÂt Initialize setting my variables when the page is created? == + == Why isn't Initialize setting my variables when the page is created? == - DonÂt worry; you arenÂt the first person to make this mistake. Initialize isnÂt called when a page is created  it is called when a page is returned to the pool to be reused. Initialize is not to be used to setup a page but instead return it to a pristine state so it can be recycled in the pool of available pages. See the pageRenderListener interface if you want to setup state before a page is used. + Don't worry; you aren't the first person to make this mistake. Initialize isn't called when a page is created - it is called when a page is returned to the pool to be reused. Initialize is not to be used to setup a page but instead return it to a pristine state so it can be recycled in the pool of available pages. See the pageRenderListener interface if you want to setup state before a page is used. KentTong: I don't think this is true anymore (not sure if it was true in the past). Initialize is indeed called when a page is created. It is also called when it is returned to the pool. So it can be used to setup a page to some fixed initial state. Of course, you could do that using a <property-specification> too. - == Where do I Âinitialize values for a page? == + == Where do I "initialize" values for a page? == - YouÂll probably want to use the pageRenderListener class to perform any work you need when the page is accessed. Alternatively you can do some lazy initialization where objects are created the first time they are used. This isnÂt as clean as using Tapestry properties but it should work. For example: + You'll probably want to use the pageRenderListener class to perform any work you need when the page is accessed. Alternatively you can do some lazy initialization where objects are created the first time they are used. This isn't as clean as using Tapestry properties but it should work. For example: AppointmentPage: @@ -27, +27 @@ == How do I use the pageRenderListener to setup my page before it is used? == - Simply implement the PageRenderListener interface and override the pageBeginRender() routine. Often times you can just call initialize() from pageBeginRender() to setup the page  your logic in both routines may be the same. + Simply implement the PageRenderListener interface and override the pageBeginRender() routine. Often times you can just call initialize() from pageBeginRender() to setup the page - your logic in both routines may be the same. {{{ public abstract class AppointmentPage extends BasePage implements PageRenderListener { @@ -53, +53 @@ // The next page we want to go to is the Result page AppointmentPage next_page = (AppointmentPage)cycle.getPage("Appointment"); next_page.setDate(new Date()); - next_page.setEvent(ÂBirthday PartyÂ); + next_page.setEvent("Birthday Party"); cycle.activate(next_page); } }}} @@ -80, +80 @@ == 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. + 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. + 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. @@ -96, +96 @@ == What are the jwcid=$content$ tags that Spindle places into my HTML files? == - Tapestry does not process any text outside of a <span jwcid=Â$content$Â></span>. This allows a developer to place documentation, header files or static HTML (that should not be rendered by the Tapestry engine). Spindle places these tags into the HTML out of convenience. The can be deleted without any problems. + Tapestry does not process any text outside of a <span jwcid="$content$"></span>. This allows a developer to place documentation, header files or static HTML (that should not be rendered by the Tapestry engine). Spindle places these tags into the HTML out of convenience. The can be deleted without any problems. == When would I use the $remove$ tag? == @@ -104, +104 @@ {{{ <table> - <tr jwcid=ÂemployeeForeachÂ> + <tr jwcid="employeeForeach"> - <td><span jwcid=ÂemployeeNameÂ>Jane</span></td> + <td><span jwcid="employeeName">Jane</span></td> - <span jwcid=Â$remove$Â> + <span jwcid="$remove$"> <td>Sally</td> <td>Sue</td> </span> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]