I usually throw them into one of my pull tools to generate the
time/date selector output in my template.  Using the toString() to get
it to spit out HTML ( these selectors are implemented with ECS ).

<table>
  <tr>
    <td>MyPull.TimeSelector</td>
  </tr>
</table>

---

public class MyPull extends ApplicationTool
{

...

  public String getTimeSelector() 
  {
    TimeSelector ts = new TimeSelector("mytime");
    // You could set the default time here if you wanted.
    return(ts.toString());
  }

...

}

---

Then in an action you can call getTime("mytime")/getDate("mydate") as
you indicate you are doing.  This is off the top of my head, so I
might have slight errors in the above.  We have code using these
selectors at work and I can get real code if you still need more
examples.

Hope this helps a bit,

jb

>>>>> On Tue, 1 Apr 2003 14:20:47 -0500 , [EMAIL PROTECTED] said:

> Hi all, I am trying to retrieve a date from my velocity template.  I
> was using data.getParameters().getDate("mydate") but it was failing,
> I believe because I dont' have either a TimeSelector or DateSelector
> in use.

> Does anyone have any sample code uner the t2.2 or t2.3 codebases
> that would give me a demo of how to use them?  I will happily
> contrib back a howto!

> Eric Pugh

-- 
=====================================================================
Jeffrey D. Brekke                                   [EMAIL PROTECTED]
Wisconsin,  USA                                     [EMAIL PROTECTED]
                                                    [EMAIL PROTECTED]


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

Reply via email to