Hi, if you dont want Tapestry to implement the
'implementedWithDefinition' please remove its
declaration from property file with your code intact,
It will fix this problem.

Thanks,
Anil Udasi.



--- [EMAIL PROTECTED] wrote:

> Hello,
> 
> when I declare page property using <property
> name="testName"> in page 
> property file and then implements getters and
> setters for this property 
> using concrette (not abstract) methods
> implementation in page class , 
> Tapestry ignores this getters and setters and
> constructs this own methods 
> implementation as the getters and setters were
> defined using abstract 
> methods.
> 
> Result is the implemented logic in methods is
> quitely overriden and 
> ignored. 
> 
> Maybe I am wrong in implementation or misread docs,
> but the reading I did 
> found for this problem is not much helpful, too. On
> 
>
../tapestry-4.0-beta-13-docs/UsersGuide/spec.html#spec.property
> " ... In Tapestry 4.0, the type of the implemented
> property will simply 
> match the type of any existing (abstract) property,
> or will default to 
> Object. ..." 
> 
> This does not expalin too much clearly what will
> happen. Or the abstract 
> method shoud be required for property or the
> concrette implementation 
> should not be overriden for the property.
> 
> I am using:
> 
> Tapestry beta 13
> Hiveming 1.1
> Apache Tomcat 4.1
> Java SDK1.4.2_08
> 
> Attached please find working example. Problem is in
> property 
> "implementedWithDefinition". It has getters and
> setters implemented with 
> log.debug message, which is never called - althoug
> it should be - can be 
> seen in the log example o the end of email.
> 
> Can you tell me ouur opinion about this problem?
> 
> Best regards
> 
> Petr Marek
> 
>
--------------------------------------------------------------------------------------------------------------------------------------------------
> EXAMPLE:
> 
> TestProperties.html
> ------------------------
> <html>
>     <body>
>         Hello, this is test of properties!
>     </body>
> </html>
> 
> TestProperties.page
> -------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE page-specification PUBLIC
>   "-//Apache Software Foundation//Tapestry
> Specification 4.0//EN" 
>  
>
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>
>  
>   <page-specification
> class="cz.profinit.kos.web.stranky.TestProperties">
>       <property name="abstractWithDefinition"/>
>       <property name="implementedWithDefinition"/>
>   </page-specification>
> 
> TestProperties.java
> ------------------------
> 
> package cz.profinit.kos.web.stranky;
> 
> import org.apache.log4j.Logger;
> import
> org.apache.tapestry.event.PageBeginRenderListener;
> import org.apache.tapestry.event.PageEvent;
> import org.apache.tapestry.html.BasePage;
> 
> /**
>  * Tests the results of calling and setting abstract
> and implemented 
> properties.
>  *
>  * History:
>  * <br>$Log: TestProperties.java,v $
>  * <br>
>  *
>  * @author $Author: pmarek $
>  * @version $Revision: 1.0 $
>  */
> 
> public abstract class TestProperties extends
> BasePage implements 
> PageBeginRenderListener {
>  
>         private static Logger log = 
> Logger.getLogger(TestProperties.class.getName());
>  
>         /**
>          * Abstract property with definition in
> TestProperties.page using 
> <property tag>.
>          * @return
>          */
>         public abstract String
> getAbstractWithDefinition();
>         public abstract void
> setAbstractWithDefinition(String 
> abstractWithDefinition);
>  
>         /**
>          * Implemented property with definition in
> TestProperties.page 
> using <property tag>.
>          */
>         private String implementedWithDefinition;
>         public String getImplementedWithDefinition()
> {
>                 log.debug("running
> getImplementedWithDefinition()...");
>                 return
> this.implementedWithDefinition;
>         }
>         public void
> setImplementedWithDefinition(String 
> implementedWithDefinition) {
>                 log.debug("running
> setImplementedWithDefinition(...)...");
>                 this.implementedWithDefinition = 
> implementedWithDefinition;
>         }
>  
>         /**
>          * Abstract property with NO definition in
> TestProperties.page.
>          * @return
>          */
>         public abstract String
> getAbstractNoDefinition();
>         public abstract void
> setAbstractNoDefinition(String 
> abstractNoDefinition);
>  
>         /**
>          * Implemented property with NO definition
> in TestProperties.page.
>          */
>         private String implementedNoDefinition;
>         public String getImplementedNoDefinition() {
>                 log.debug("running
> getImplementedNoDefinition()...");
>                 return this.implementedNoDefinition;
>         }
>         public void
> setImplementedNoDefinition(String 
> implementedNoDefinition) {
>                 log.debug("running
> setImplementedNoDefinition(...)...");
>                 this.implementedNoDefinition =
> implementedNoDefinition;
>         }
>  
>         /**
>          * Implementation of @see
> PageRenderListener#pageBeginRender.
>          * @param pageEvent
>          */
>         public void pageBeginRender (PageEvent
> pageEvent) {
>                
>
log.debug("setAbstractWithDefinition("+TEST_VALUE_1+")");
>                
> this.setAbstractWithDefinition(TEST_VALUE_1);
>                
> log.debug("getAbstractWithDefinition()");
>                 log.debug("Should be
> '"+TEST_VALUE_1+"'. Is 
> '"+this.getAbstractWithDefinition()+"'");
> 
>
log.debug("setImplementedWithDefinition("+TEST_VALUE_2+")");
>                
> this.setImplementedWithDefinition(TEST_VALUE_2);
>                
> log.debug("getImplementedWithDefinition()");
>                 log.debug("Should be
> '"+TEST_VALUE_2+"'. Is 
> 
=== message truncated ===



                
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to