lift / lift/framework

Problem with multiple FieldTransform per field

Open
#1,303 0 comments 0 reactions 1 assignee View on GitHub

@pbrant is already working on this.

Since Aug 8, 2012.

Dominant language
Scala
Stars
1.3k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

I created this little method to add a class to a Css bound LiftScreen field. The field is mirrored from Record, just adding the key/value tuple doesn't work there yet as discussed here: https://groups.google.com/forum/#!topic/liftweb/8m31wwg_60U/discussion

def cls(clsName: String): FieldTransform = FieldTransform(() => {".value [class+]" #> clsName})

to use like this:

val f: Field{type ValueType = String} = field(record.is.fieldName, cls("mini"), cls("another-class"))

In the resulting HTML only the first FieldTransform is executed, subsequent ones are not.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.