SHtml.multiSelectObj onSubmit not called in case of empty selection

44 views
Skip to first unread message

martin

unread,
Oct 5, 2011, 6:11:51 AM10/5/11
to Lift
Hello,

I have a slight problem with SHtml.multiSelectObj.

It looks like when there is nothing selected the onSubmit function is
not called.

I can do a workaround mentioned in this thread
http://groups.google.com/group/liftweb/browse_thread/thread/46e70d3130e52c18/8365d375163af9bb?lnk=gst&q=multiselect#8365d375163af9bb
but it would be much better if func was called for empty selection.
Also I have validation logic in the onSubmit function and because
onSubmit is not called for empty selection the validation is simply
ignored.


Also I found that http://exploring.liftweb.net/master/index-6.html#toc-Subsection-6.3.7
is out of sync with code. "Note that the callback function will be
executed for each selected item in the multiselect, which is why the
callback takes a String argument instead of a Set[String]" this is not
true, now the onSubmit really takes Set[String] in case of
SHtml.multiselect.

Thank you,

Martin

David Pollak

unread,
Oct 9, 2011, 2:48:34 PM10/9/11
to lif...@googlegroups.com
Please open a ticket on this issue (http://ticket.liftweb.net you must be a watcher of the LiftWeb space on Assembla to open tickets and please link to this thread).


--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code



--
Lift, the simply functional web framework http://liftweb.net

martin

unread,
Nov 5, 2011, 6:58:55 PM11/5/11
to Lift
Ahhh, sorry I overlooked your update. It looks like somebody else
opened the ticket http://www.assembla.com/spaces/liftweb/tickets/1139-cannot-clear-out-multiselect

Martin

On 9. Okt, 19:48 h., David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> Please open a ticket on this issue (http://ticket.liftweb.netyou must be a
> watcher of the LiftWeb space on Assembla to open tickets and please link to
> this thread).
>
>
>
> On Wed, Oct 5, 2011 at 3:11 AM, martin <kov.mar...@gmail.com> wrote:
> > Hello,
>
> > I have a slight problem with SHtml.multiSelectObj.
>
> > It looks like when there is nothing selected the onSubmit function is
> > not called.
>
> > I can do a workaround mentioned in this thread
>
> >http://groups.google.com/group/liftweb/browse_thread/thread/46e70d313...
> > but it would be much better if func was called for empty selection.
> > Also I have validation logic in the onSubmit function and because
> > onSubmit is not called for empty selection the validation is simply
> > ignored.
>
> > Also I found that
> >http://exploring.liftweb.net/master/index-6.html#toc-Subsection-6.3.7
> > is out of sync with code. "Note that the callback function will be
> > executed for each selected item in the multiselect, which is why the
> > callback takes a String argument instead of a Set[String]" this is not
> > true, now the onSubmit really takes Set[String] in case of
> > SHtml.multiselect.
>
> > Thank you,
>
> > Martin
>
> > --
> > Lift, the simply functional web framework:http://liftweb.net
> > Code:http://github.com/lift
> > Discussion:http://groups.google.com/group/liftweb
> > Stuck? Help us help you:
> >https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Simply Lifthttp://simply.liftweb.net
Reply all
Reply to author
Forward
0 new messages