Bob -
Thank you for pointing me in the right direction. I wasn't aware of creating a 
Custom Field by extending Field.For anyone else's benefit, starting with Bob's 
suggestion, I searched the 'Click Examples' Website and found 
ControlHeadDemo.java that had an inner class,  StarRating that extended Field

Conor


----- Original Message ----
From: Bob Schellink <[email protected]>
To: [email protected]
Sent: Sat, April 3, 2010 9:00:59 AM
Subject: Re: Does Apache Click support Captchas?

On 3/04/2010 11:50 PM, C Jennings wrote:
> 
>  I wonder, then if it is even possible to embed a Javascript element inside a 
> form using Click? Otherwise, how else could you pass back any arguments to 
> the Page class?


Something like this should work:

public class CaptchaField extends Field {

  public String render(HtmlStringBuffer buffer) {
    buffer.render("add captcha script output here");
  }
}

kind regards

bob



      

Reply via email to