Renaming a View
You specify a name for a view by setting the view’s Name property. When you generate sources for the mobile project, the view_nameControllerImpl.java Java class that Mobile Development generates in the src folder includes the view name in the name of the Java class. After generating sources, if you want to change the name of the view, use the following procedure.
To rename a view
2. In the Model section of the Outline Editor, select the view node that you want to rename.
3. Type the new name for the view in the Name property, which is displayed in the Properties section of the Outline Editor.
Mobile Development generates a new new_view_nameControllerImpl.java Java class for the view where new_view_name is the new name you assigned to the view.
Mobile Development does not remove the old_view_nameControllerImpl.java Java class, where old_view_name is the previous name of the view. Mobile Development retains this file in the event that you previously added custom code to the old_view_nameControllerImpl.java Java class.
5. Update the new_view_nameControllerImpl.java class with any custom code that you added to the old_view_nameControllerImpl.java Java class.
a. In the Package Explorer or Navigator view, locate the src > package > ui > controller > impl folder, which contains both the new_view_nameControllerImpl.java and old_view_nameControllerImpl.java Java classes.
b. Open both Java classes and copy all custom code from the old_view_nameControllerImpl.java to new_view_nameControllerImpl.java.
c. Save both files.
d. Delete the old_view_nameControllerImpl.java Java class.
Related Topics