[opencms-dev] Change relations in resources

Antonio Cordeddu antoniocordeddu at coranto.it
Fri Nov 16 10:05:39 CET 2012


I found the solution.

I describe it for anyone who will have the same issue:

browse the xml document (a good example could be found at 
http://www.opencms-wiki.org/wiki/Reading_various_information_about_a_resource), 
retrieve the element you have to change and finally use the method 
elementValue.setStringValue(CmsObject cms, String value) to set the new 
value.

Regards
Antonio Cordeddu



On 14/11/2012 16.51, Antonio Cordeddu wrote:
>
> I need to change the targets of relation in many resources: the old 
> target and new target differ only for the path.
> So I tried with Search Management - Source Search and Replace tool; 
> the report show me a successful result  but the change doesn't happen. 
> I think OpenCms, after the change,  uses the UUID of the old target 
> and comes back to it.
>
> I think I have to write the code to get my goal. Does anyone 
> approached the same issue?
> Could you suggest me the best way to do it?
>
> Thanks
> Antonio Cordeddu
>
>
>
> _______________________________________
> Coranto informatica di Antonio Cordeddu
> antoniocordeddu at coranto.it
> Skype: antonio.cordeddu
> http://www.coranto.it
> ___________________________________________
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please 
> visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>
>
>






More information about the opencms-dev mailing list