Documentation Center

Example: updating existing items in Java

This example code shows how to update the Title and FileName properties of a Page in the Content Manager.

void updatePage() throws Exception
{
	ReadOptions readBackOptions = new ReadOptions();
	readBackOptions.getLoadFlags().add("None");
	PageData page = (PageData) endpoint.checkOut("tcm:36-3708-64", false, readBackOptions);

	page.getTitle().setValue("Some Page");
	page.getFileName().setValue("some_page");

	endpoint.update(page, null);
}

Note the use of the ReadOptions object here to set load flags.