ValueMap vs Node property
HI Friends,
Can you pls explain the difference between the below
getProperties.get("propertyName").toString(); and node.getProperty("propertyName");
Thanks in advance
Akbar
HI Friends,
Can you pls explain the difference between the below
getProperties.get("propertyName").toString(); and node.getProperty("propertyName");
Thanks in advance
Akbar
Dear @akbareee, you must first understand the technology stack that AEM relies on, which is:
You can access content stored in the repository by using APIs from any of the technologies; this would be the first big difference you asked for:
node.getProperty("propertyName"); --> Provided by JCR technology
getProperties.get("propertyName").toString(); ---> Provided by Apache Sling Technology
in case of "getProperties" your basically accessing a "globally available Sling object" whereas "node" must be an instance of Node class.
Regards,
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.