OT: user-extensible templating?

22 views
Skip to first unread message

Nolan Darilek

unread,
Oct 26, 2012, 11:40:51 AM10/26/12
to Lift
Not specifically Lift-related, but maybe someone here has some ideas.

I'm working on an app where users are creating their own forms. It would
be nice if they could do so without knowing HTML. Also, I'd like to
provide a bit of additional metadata in the templates which just outputs
HTML but performs additional validation on fields. So an address type
field would still output text, but would geocode and validate the
address before accepting it.

I've written something like this, but it's XML-based and not very
user-friendly. I kind of like the Liquid syntax of {{ variable }}, {% if
some_condition %} ... {% endif %} which also appears in a number of
other templating languages.

Is there something like this in Java/Scala? Scalate seems targeted at
outputting HTML with a fairly direct link between user input and output
markup, but perhaps I'm wrong? I'm not married to the Liquid style, I'd
just like something that is a bit more user-friendly than HTML to enter
raw, and which would be easier to write a WYSIWYG editor for. I'd also
like more extensibility so I can create my own field types.

Thanks.

Alexey Lunacharsky

unread,
Oct 28, 2012, 2:48:04 AM10/28/12
to lif...@googlegroups.com
Hi, Nolan

I think if you don't like the user to know HTML why do you require him to know your internal DSL to creating the forms?

It would be better to provide HTML/JS controls and AJAX to generate the form user wants on the fly by user GUI input.

Thanks to lift, that could be implemented pretty simply by server side scala ajax hanlders and partial page JS updates as there responses.

пятница, 26 октября 2012 г., 22:41:04 UTC+7 пользователь Nolan Darilek написал:
Reply all
Reply to author
Forward
0 new messages