Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Dynamic database model using lift
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Vivek Khurana  
View profile  
 More options Aug 30 2012, 12:26 pm
From: Vivek Khurana <hiddenharm...@gmail.com>
Date: Thu, 30 Aug 2012 09:26:14 -0700 (PDT)
Local: Thurs, Aug 30 2012 12:26 pm
Subject: Dynamic database model using lift

Hi!

 I am building an application where users can define there own "Fields" to
modules. which will extend the existing modules and models. To explain it
further, say a module has fields for First name and Last name. An user
deploying the app can add another field call Address for the specific
deployment to the module, whereas another user may add another field, say
Gender, in another deployment. My problem here is that how do I map these
added fields to lift Record and Mapper ? Also, how these fields can be
mapped to lift forms ?

regards
Vivek


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nolan Darilek  
View profile  
 More options Aug 30 2012, 12:47 pm
From: Nolan Darilek <no...@thewordnerd.info>
Date: Thu, 30 Aug 2012 11:47:50 -0500
Local: Thurs, Aug 30 2012 12:47 pm
Subject: Re: [Lift] Dynamic database model using lift

I have an old app that does something similar to this.

The app is meant to replace paper forms that can include arbitrary
pieces of information. To do this, I have a form template which defines
fields using an XML syntax, basically invoking snippets. The snippets
output various form controls specific to the field type, each containing
a variable name.

Data is persisted in form objects, each of which is linked to a
template. I use a single database field containing a JSON map of the
variable and its value.

Form templates know how to handle both input and output. So I have one
method that shows field values based on a specific form instance, and
another that accepts input for them.

I think I may have refactored this code such that the input/display
logic was on the Record field. So body.toXhtml would iterate through the
fields and display their values, while body.toForm would render input
fields for the contained XML.

Hope that helps some.

On 08/30/2012 11:26 AM, Vivek Khurana wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »