Hi, answering the question in the ticket
http://www.assembla.com/spaces/liftweb/tickets/792
> I think the solution displayed in the images looks good for now. No need (at least in my case) to be able to edit the fields in the confirm screen.
> A question:
> How can you control how a field is displayed on the confirm screen? In my case I have some fields where I have overridden the toForm method (i.e to make a field display as read-only, the value set automatically in the background on screen load), is there some way to do the same for the confirm screen?
>
> Thanks for quick replies and fixes, great work :)
Every SettableField field (having toForm method) is also a
ReadableField field (having asHtml method).. there is a method in the
patched Wizard.scala (confirmScreenField) which uses that asHtml
method to create the confirm screen fields. So in your case if you
just want to have a customized read-only representation of your field
you can override that method (asHtml) too.
If you would like to have one read-only representation of your field
on the normal wizard screen and a completely different one on the
confirm screen, that is also possible but you have to extend the Field
trait in Wizard.scala ( by adding i.e. asConfirmHtml method) and
override couple of methods (Screen.screenFields and
Wizard.confirmScreenFields) that render the confirm screen field.
regards
Rysiek
On Dec 20 2010, 12:06 pm, Trond Marius Øvstetun <
tr...@ovstetun.no>
wrote:
> Done, ticket is athttps://
www.assembla.com/spaces/liftweb/tickets/792-confirmscreen_--s...
>
> Thanks :)
>
> /trond
>
> On Sat, Dec 18, 2010 at 1:03 AM, David Pollak <
feeder.of.the.be...@gmail.com
>
>
>
>
>
>
>
>
>
> > wrote:
>
> > 2010/12/16 Trond Marius Øvstetun <
tr...@ovstetun.no>
>
> > Hi.
>
> >> I am building a wizard and am wondering how to use the confirmScreen_?
> >> method on my last screen.
> >> What is supposed to happen when I override this to true? I get an empty
> >> screen, i thought I was supposed to get a listing of all fields used in all
> >> my (other) screens.
>
> > You should get what you expect, but there's a bug in Wizard. Please open a
> > ticket athttp://
ticket.liftweb.net(you must be a watcher of the Liftweb
> >>
liftweb+u...@googlegroups.com<
liftweb%2Bunsu...@googlegroups.com >
> >> .
> > Beginning Scalahttp://
www.apress.com/book/view/1430219890
> >
liftweb+u...@googlegroups.com<
liftweb%2Bunsu...@googlegroups.com >
> > .