Thanks Dave!

I modified the code a little bit:

object tradeType extends 
MappedLongForeignKey(this.asInstanceOf[MapperType], TradeTypeMetaObj){
     
        override def _toForm = Full(SHtml.selectObj[TradeType]
                                  (List(
                                    
(TradeTypeMetaObj.findAll(By(TradeTypeMetaObj.name, "BUY"))(0), "kaufen"),
                                    
(TradeTypeMetaObj.findAll(By(TradeTypeMetaObj.name, "SELL"))(0), 
"verkaufen")),
                                   
Full(TradeTypeMetaObj.findAll(By(TradeTypeMetaObj.name, "BUY"))(0)),
                                   (t: TradeType) => set(t))
                                  )
}


But I still get the same compiler error! Seems like I've to use some 
other method instead of set()? I discovered the set() method in one of 
the tutorials/Lift Book....

any ideas?

thanks
>
>
> On Fri, Jun 19, 2009 at 6:10 AM, Tobias Daub <hannes.flo...@gmx.li 
> <mailto:hannes.flo...@gmx.li>> wrote:
>
>
>     Hi Dave,
>
>     thanks again! But I can't find any documentation about the selectType
>     method. I looked at the API docs on the website, but in SHtml the
>     selectType method didn't exist!? Even inside the sources from SHtml on
>     github selectType wasn't there....
>
>     Can you tell me how to use and maybe a short code snippet?
>
>
> Sorry... I typed this when I was wicked tired and my brain fired 
> wrong. :-(
>
> SHtml.selectObj[TradeType](...)
>
> You have to give the compiler a hint about the type of the list.
>  
>
>
>
>
>     thanks and sorry for wasting your time...
>
>
>
>     > Try:  SHtml.selectType[TradeType](....)
>     >
>     > On Thu, Jun 18, 2009 at 6:30 AM, Tobias Daub
>     <hannes.flo...@gmx.li <mailto:hannes.flo...@gmx.li>
>     > <mailto:hannes.flo...@gmx.li <mailto:hannes.flo...@gmx.li>>> wrote:
>     >
>     >
>     >     Hi There,
>     >
>     >     I'm still having problems with the selectObj method.
>     >
>     >     Here's the code:
>     >
>     >     */* The basic trade types are: BUY and SELL */
>     >        object tradeType extends
>     >     MappedLongForeignKey(this.asInstanceOf[MapperType],
>     TradeTypeMetaObj){
>     >
>     >            override def _toForm = Full(SHtml.selectObj
>     >                                      (List(
>     >
>     >     (TradeTypeMetaObj.findAll(By(TradeTypeMetaObj.name, "BUY")),
>     >     "kaufen"),
>     >
>     >     (TradeTypeMetaObj.findAll(By(TradeTypeMetaObj.name,
>     >     "SELL")),"verkaufen")),
>     >
>     >     Full(TradeTypeMetaObj.findAll(By(TradeTypeMetaObj.name,
>     "BUY"))),
>     >                                       (t: TradeType) => set(t))
>     >                                      )
>     >        }*
>     >
>     >
>     >
>     >     and here's the compiler error:
>     >
>     >
>     >     [INFO] Compiling 1 source files to
>     >    
>     /home/wacky/workspace_VirtuelleBoerse/virtualMarket/target/classes
>     >     [WARNING]
>     >    
>     
> /home/wacky/workspace_VirtuelleBoerse/virtualMarket/src/main/scala/org/tobster/model/Order.scala:50:
>     >     error: value set is not a member of Long
>     >     [WARNING]                                    (t: TradeType)
>     => set(t))
>     >     [WARNING]                                                      ^
>     >     [WARNING] one error found
>     >
>     >
>     >     What do I've to do, to store the selected object in the
>     corresponding
>     >     "table".
>     >
>     >
>     >     thanks
>     >
>     >
>     >
>     >
>     >
>     > --
>     > Lift, the simply functional web framework http://liftweb.net
>     > Beginning Scala http://www.apress.com/book/view/1430219890
>     > Follow me: http://twitter.com/dpp
>     > Git some: http://github.com/dpp
>     >
>     > >
>
>
>
>
>
>
> -- 
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp
>
> >


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

Reply via email to