-
-
- Search Engine Optimization
- User Interface migration guide
- User account management
- Instructies voor implementatie van visueel editen van nieuwsbrieven
- Login as another user
- Support
- More information about moving to User Interface Version 4.0
- Standaard page layout
- Sections moved to layout
- Aanpassingen in release 2024-7
- Media library
- Aanpassingen in release 2024-10
- Analytics and Matomo
- Registration forms
- How to change names of classes and fields?
- Responsible Disclosure Policy
- How to upload a blob in Velocity?
- Aanpassingen in release 2024-2
- Google Analytics
- Street and City helper (postcodecheck)
- Responsible disclosure-beleid
- Postcode check service (straat en huisnummer) kosten
How to change names of classes and fields?
Most applications change over time dus to changes in the way people work or change of insights. As a result of this it might be relevant to change names of classes or fields. However, in case the names are used in scripts or api calls, name changes might give trouble.
To prevent problems, you can use the "deprecated identifiers" of classes or fields. A deprecated identifier can still be used in a script or a api call. However, some preparation is needed.
Suppose you want to change the name of a class from A to B. Your old script might look like:
#set($query = $session.newQuery('A'))
You can change the name of the class to B, and set A as the deprecated identifier. Your old script will still work. And you can gradually change your scripts and use the new name.
Important!
Suppose you have a script like this:
#if($clazz.getName() == 'A')
do something
#end
This script will NOT work after the name change.
Before you change the name, you have to alter scripts like this to:
#if($clazz.hasIdentifier('A'))
do something
#end
Now the script will still work after the name change.