It looks right to me. What's not working? Does the button not get emitted or
is the function not being called?

Derek

On Mon, May 4, 2009 at 9:00 PM, Bryan <[email protected]> wrote:

>
> How can I create a "widget" to render a customized <button>.  This is
> probably trivial, but I failed on my first attempt.
>
> object MyButton {
>  def red(value: String, func: () => Unit, attrs: (String, String)*):
> Elem =
>    fmapFunc(NFuncHolder(func))(funcName =>
>      <button name={funcName} type="submit" class="mybutton">... a few
> images will go here ... </button>)
>
> and in my snippet
>
> bind("f", xhtml, ...
>  "submit" -> MyButton.red("Search", processSearch))
>
> Thanks,
> Bryan
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to