cancel
Showing results for 
Search instead for 
Did you mean: 

Need to Access the Custom model feild in JSP file.

lmanoh
Champ in-the-making
Champ in-the-making
Hi,
I have created content model, named custom-contentmodel.xml, its working fine, i can able to access the property in view details page, and also able to edit the data.
Now my requirement is the access the same feild in JSP file which i created newly. i have to access the custom content model feild data in that page (like ${person.properties.userName}). and put that data into vo object and store it to the different DB by using some Jdbc.
Now i need to access the custom content model data in JSP page. can one help me out in this.
help would be highly appriciated.thanks
- Lenin.
1 REPLY 1

cheffilet
Champ in-the-making
Champ in-the-making
rSmiley TongueropertySheetGrid is your friend.

Within this tag, you can define a property as well, which should only be displayed to the user. But if you leave them emty, all nodeproperties will be displayed(which been configured).
For instance, if you have a node, you might want to store regarding properties in a more JDBC-way (as you descriped in you post), you´ll have to read firstly the node from the repository.

As an example, you can create a ManagedBean with following procedure:

NodeRef ref = nodeService.getChildByName(…, …, …)

Now, its time to make this node readable by the propertySheetGridTag creating a new "PseudoNode":

Node propertiesNode = TransientNode.createNew(dictService, type of node, name of node, nodeService.getProperties(ref))

Now you can store via value-binding this node upon the propertySheetGridTag within the jsp-file.

<rSmiley TongueropertySheetGrid value="ManagedBean.node" externalConfig="true">

<r:/propertySheetGrid>

Externalconfig means, that its configured over web-client-config-custom.xml:


<config evaluator="node-type" condition="your type">
    <property-sheet>
       …
    </property-sheet>


Here comes the cool thing now. If you have defined a wizard/dialog, JSF keeps that properties synchron against the node which been defined earlier in the ManagedBean. This means, if you want to store properties from this sheet into another database, you have just to read down the node propertiesNode to obtain data entered through the web-client.

Best Regards