Hi!
Korbinian, Sergiy, Thank you for your advices. 

> ... youre familiar with java, right ?

I'm learning... even though i didn't implement Icomponent(can't catch the
idea...), iv'e implement DatePick in other way:
================
BoxInventory.class:
================
import org.apache.tapestry.BaseComponent;

import java.util.Date;
import java.text.Format;
import java.text.SimpleDateFormat;

public abstract class BoxInventory extends BaseComponent {
        private Format _dateFormat;

        public Format getDateFormat()
        {
          if (_dateFormat == null)
            _dateFormat = new SimpleDateFormat("yyyy-MM-dd");
              
          return _dateFormat;
        }

        public abstract Date getQuoteDate();
        
}
================
BoxInventory.jwc
================
//...
<component-specification
class="com.tpsa.ADLog.components.edit.BoxInventory">
</component-specification>
================
BoxInventory.html
================
//...
<span jwcid="[EMAIL PROTECTED]" value="ognl:quoteDate"/>
//...

It seems to I've got to learn Java more harder.
;)

Regards.

-----Original Message-----
From: Korbinian Bachl [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 25, 2006 4:39 PM
To: 'Tapestry users'
Subject: AW: DatePicker in component.

 > public abstract class BoxInventory {

should be

public abstract class BoxInventory implements IComponent {

and you also should care that the page class extends BasePage

... youre familiar with java, right ?

regards

Korbinian


> -----Ursprüngliche Nachricht-----
> Von: Schabek Lukasz [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 25. Januar 2006 16:22
> An: Tapestry users
> Betreff: DatePicker in component.
> 
>  
> Hi!
> 
> I've create some components inside page of my application.
> 
> Edit.html
> ==================
> <html>
> <head>
> <title>Edycja</title>
> </head>
> <body jwcid="@Body">
>   <span jwcid="@index" title="Edycja">
>     <fieldset>
>       <!-- Form -->
>       <form jwcid="@Form" listener="listener:onOk">
>         <span jwcid="@BoxPassport"></span>
>         <span jwcid="@BoxInventory"></span>
>         <span jwcid="@BoxPreparation"></span>
>         <span jwcid="@BoxScanning"></span>
>         <span jwcid="@BoxKSPUpdate"></span>
>         <span jwcid="@BoxReceipt"></span>
>         <span jwcid="@BoxPurchase"></span>
>       </form>
>     </fieldset>
>   </span>
> </body>
> </html>
> ===================
> Edit.page:
> ===================
> <?xml version="1.0"?>
> <!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="com.mycom.MyApp.edit.EditRecord">
> </page-specification>
> ===================
> Each of @Box* component is a simple formated HTML fields for Form. 
> In those component i've try to insert a DatePicker, but... It doesn't 
> work.
> I.e.
> BoxInventory.jwc:
> ===================
> <component-specification
> class="com.mycom.MyApp.components.edit.BoxInventory"
> allow-informal-parameters="no">
>   <component id="quoteDate" type="DatePicker">
>     <binding name="value" value="quoteDate"/>
>       <binding name="translator"
> value="translator:date,pattern=yyyy-MM-dd"/>
>   </component>
> </component-specification>
> ===================
> BoxInventory.html:
> ===================
> <!-- tables,inputs etc. -->
> <span jwcid="quoteDate">May 3, 2005</span>
> <!-- ... -->
> ===================
> BoxInventory.class:
> ===================
> import java.util.Date;
> import java.text.Format;
> import java.text.SimpleDateFormat;
> 
> public abstract class BoxInventory {
>         private Format _dateFormat;
> 
>         public Format getDateFormat()
>         {
>           if (_dateFormat == null)
>             _dateFormat = new SimpleDateFormat("yyyy-MM-dd");
>             
>           return _dateFormat;
>         }
>         public abstract Date getQuoteDate(); } ====================== When

> i try to run application it gives me an exception:
> Class com.mycom.MyApp.components.edit.BoxInventory does not implement 
> the IComponent interface.
> But i have no idea how to implemetn Icomponent interface,,, can you 
> help me?
> I have searched tapestry web
> For examples but found nothing...
> 
> Sorry for my bad eanglish...
> 
> [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

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

Reply via email to