Try fld.uniqueFieldId openOr "<n/a>" On Sun, Oct 18, 2009 at 11:19 PM, sunanda <sunanda.pa...@gmail.com> wrote:
> > Hi, > How to set the uniqueFieldId for a mapper. > > Following is the sample code how I set the uniqueFieldId. > > > object colpos extends MappedInt(this){ > override def validations = checkForColPos _ :: super.validations > override def uniqueFieldId=Full("abc") > def checkForColPos(pos:Int) = { > if(pos >0) Nil > else List(FieldError(this, <b>Provide valid Column Position</ > b>)) > > } > } > > println(xs(0) displays the followinf information > Full(abc) : <b>Provide valid Column Position</b> > > I need to extract the identifierid "abc". > When I try to do like this: > var fld = xs(0).field > println("fld="+fld) > It prints 0 instead of "abc". > > Can anyone suggest me where am I going wrong. > Thanks. > Regards, > Sunanda. > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---