Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bug fix "SForm component has not passed model to a super-class." #35

Merged
merged 1 commit into from

2 participants

Asuka ITO Martin Grigorov
Asuka ITO

In wicket-scala, SForm component has not passed model to a super-class.

Therefore, CompoundPropertyModel etc. do not work.

Martin Grigorov martin-g merged commit e8ab79f into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
2  ...-parent/scala-extensions-parent/wicket-scala/src/main/scala/org/wicketstuff/scala/SimpleComponents.scala
View
@@ -13,7 +13,7 @@ import org.apache.wicket.markup.html.link.Link
import org.apache.wicket.markup.html.list.{ListView, ListItem, PropertyListView}
import org.apache.wicket.model.{IModel, Model}
-class SForm[T](id:String, model:IModel[T] , onSubmitFunc: Unit) extends Form[T](id) {
+class SForm[T](id:String, model:IModel[T] , onSubmitFunc: Unit) extends Form[T](id, model:IModel[T]) {
override def onSubmit = onSubmitFunc
4 ....5-parent/scala-extensions-parent/wicket-scala/src/test/scala/org/wicketstuff/scala/ComponentSpecs.scala
View
@@ -92,6 +92,10 @@ class ComponentSpecs extends SpecificationWithJUnit with ScalaTest with ScalaWic
def fx = sf.onSubmit
clickCountUpdatingFunction(fx)
}
+ "pass model to a super-class" in {
+ val sf = new SForm("form", new Fodel[String]("test"), {})
+ sf.getModelObject mustEq "test"
+ }
}
"SListView component" should { doBefore{ new WicketTester() }
"take a closure for the #populateItem method" in {
Something went wrong with that request. Please try again.