Child pages
  • Client Design Mode
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

The client design mode is made to make it possible for end users to edit the possitions and sizes of elements on a form. When the form enters client design mode the user can use drag & drop to replace elements or change elements in size.

The client design mode will not save the new positions/sizes of the elements this is someting that the developer has to take care of. By saving and restoring these elements for each user individualy you can give the user his personal layouts.

By entering the client design mode you can set the onDrag/onDragEnd/onDragOver/onDrop methods. If you don't set the methods by entering the client design mode it will use the method that are connected to the form properties.

You can enter client design mode using:

	controller.setDesignMode(true)

By creating the onDrag/onDragEnd/onDragOver/onDrop from the form properties you get a sample method.

/**
 * Handle a drag over. Determines of a drop is allowed in this location.
 *
 * Return true is drop is allowed, otherwise false.
 *
 * @param {JSDNDEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"A97879DD-6465-4A89-8210-122C94857626"}
 */
function onDragOver(event) {
	// TODO Auto-generated method stub
	if (event.getSource() && event.data) {
		return true;
	}
	return false;
}
  • No labels