Amy's Devblog

A blog containing information on all my work/education projects.

Thursday, July 21, 2005

CMSUI Set Permissions

I developed the portion of CMSUI that allows a user to view and set permissions on a node. When CMSUI displays the properties for a node, the servlet sets a bean property that is the permission data (an array of PermissionInfo objects) converted to a string representing an HTML table of that data. The user clicks a button which opens a new smaller window that allows users/roles to be added or deleted and the permission settings for a particular user/role to be modified. All modifications are handled through Javascript code which changes the data in the HTML table. When attempting to add a user/role to the permission list, the Javascript code uses an XMLHttpRequest object to retrieve a list of users/roles whose names match the string typed in by the user. This type of object allows retrieval of XML data from the server in the background without having to reload the page. When the user clicks 'OK' the table innerHTML property is saved to a hidden input of the node/properties form in the main CMSUI window and the permissions window is closed. When the user saves the node, the servlet takes the innerHTML data and uses a DOM XML parser to convert the data back into an array of PermissionInfo.

0 Comments:

Post a Comment

<< Home