Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Adam Warski
    @adamw
    is there any automated way to do this?
    João Ferreira
    @jtjeferreira
    if it is in bower yes
    Adam Warski
    @adamw
    it is :)
    João Ferreira
    @jtjeferreira
    http://www.webjars.org/bower just click "Add a New Bower WebJar"
    thats what i did
    if you mean automated as in sbt plugin, i dont know
    Adam Warski
    @adamw
    yeah that's what I meant
    I'll add an issue :)
    virtualirfan
    @virtualirfan
    anyone using supler with scalajs?
    Alberto Paro
    @aparo
    I massively, but It's a port and based on play json.
    Tomasz Szymanski
    @szimano
    anyone using supler on production already? is it public facing?
    virtualirfan
    @virtualirfan
    @aparo just wondering if you have a roadmap in mind or new pushes coming for scalajs-supler. Thanks!
    Alberto Paro
    @aparo
    @virtualirfan yes I'll update. I managed to migrate the datetime to play-json-extra and I'll update the scalajs-supler
    I'm working for opensourcing the bootstrap scalajs-react version that we have developed for the interface. But I think I'll first update it to scalajs-react 0.10
    virtualirfan
    @virtualirfan
    @aparo awesome!! thanks.
    João Ferreira
    @jtjeferreira
    any ideia on how to create a form for a ADT model?
    suppose we have a sealed trait Base, case class Foo extends Base, case class Bar extends Base
    and assuming I have a Form[Foo] and Form[Bar]
    i would like to create a Form[Base]
    In terms of frontend I imagine a select field that would allow me to select from foo and bar and display the correct subform
    but I am having trouble implementing the form model
    João Ferreira
    @jtjeferreira
    cc @adamw
    João Ferreira
    @jtjeferreira
    and another question. anyone tried recursive nested subforms? in a tree structure
    i am getting stackoverflows or nullpointer depending on how declare the forms vals vs def
    Adam Warski
    @adamw
    so, nested subforms should work fine, although maybe you've hit some corner-case
    I don't think we have some support for form-per-subclass yet, though it's an interesting idea - can you add an issue? or maybe even a PR :)
    João Ferreira
    @jtjeferreira
    For the ADT problem I found an work around but it involves a lot of boilerplate. Will have to think it through.
    Regarding the nested subforms, the problem is the recursive nature of the nesting because I have to pass the form definition for the children
    Adam Warski
    @adamw
    ah they are recursive ... well that probably would need some tweaks in the lib as well. Let us know what you arrive at :)
    João Ferreira
    @jtjeferreira
    hi @adamw. I created #62 to fix the discussed issue regarding recursive nested forms.
    Andrew
    @aepetelin
    Hi, have some problem with form.render(data) from example. Server side works pretty well, but frontend output is "nothing" ...
    Andrew
    @aepetelin
    Hi @adamw, need help with Actions, can't make 'em work. I followed the example, but println didn't invoked. There can I read more?
    import org.supler.Supler._
    val personForm = form[Person](f => List(
      f.field(_.name).label("Name"),
      f.field(_.age).label("Age").validate(gt(1), le(150)),
      f.field(_.address).label("Address"),
      f.field(_.likesChocolate).label("Do you like chocolate?"),
      f.action("save") { p =>
        println("Saving person: " + p)
        ActionResult.custom(JString("Saved"))
      }.label("Save").validateAll()
    ))