incubator-esme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vassil Dichev <vdic...@apache.org>
Subject Re: [RELEASE] ESME-132 Signup using username that already exists doesn't result in an error message
Date Sun, 07 Feb 2010 16:46:22 GMT
In general, you have to publish the messages which are to appear in
<lift:msgs/> via S.error, S.notice, etc. I'll see what I can do to
make it work tonight.


On Sun, Feb 7, 2010 at 12:37 PM, Richard Hirsch <hirsch.dick@gmail.com> wrote:
> Hi,
>
> I did some quick hacking regarding this bug.
>
> scala routines in User.scala are being called but they are either not
> working correctly or their results are not be displayed.   The
> information from the upw_sign_form.html are working correctly and the
> reason why the messages for the bottom half of the signup page are
> displayed is unknown.  One reason may be that the lift:msg tags (for
> example, <lift:msg id="nickname"/>) are missing from the signup.html
> file. I added them but it still doesn't work.
>
> Maybe someone else can take a look and see if they see what the prob is.
>
> D.
>
> ---------------
>
> User.scala
>
>    private def validateNickname(str: String): List[FieldError] = {
>      val others = getSingleton.findByNickname(str).
>      // getSingleton.findAll(By(getSingleton.nickname, str)).
>      filter(_.id.is != fieldOwner.id.is)
>      others.map(u => FieldError(this, <xml:group>Duplicate nickname:
> {str}</xml:group>))
>    }
>
>    private def validText(str: String): List[FieldError] =
>    if (ValidNickName(str)) Nil
>    else List(FieldError(this,
>                         <xml:group>Invalid nickname.  Must start with
>          a letter and contain only letters,
>          numbers or "_"</xml:group>))
>
>    override def validations = validText _ :: validateNickname _ ::
> super.validations
>
> signup.html
>
>         <label for="nickname">
>                            <lift:loc>ui_sign_up_nickname</lift:loc>
>                            <br/>
>                            <signup:nickname/> <lift:msg id="nickname"/>
>                        </label>
>
> lift:msg tags are missing
>

Mime
View raw message