<%@page import="javax.jcr.Session,javax.jcr.Node,org.apache.sling.jcr.resource.JcrResourceUtil,
com.day.cq.tagging.Tag,
com.day.cq.tagging.TagManager,com.day.cq.tagging.JcrTagManagerFactory"
%>
<%
//Node node;
Session session = slingRequest.getResourceResolver().adaptTo(Session.class);
TagManager tagManager = sling.getService(JcrTagManagerFactory.class).getTagManager(session);
Tag tag = tagManager.resolve("/apps/webexample_siva/components/content/contact");
//specify the path which you want to get
Node node = tag.adaptTo(Node.class);
String name= node.getName();
%>
//Iterate node properties and displays node property name and value
<%
for(PropertyIterator propeIterator = node.getProperties() ; propeIterator.hasNext();)
{
Property prop= propeIterator.nextProperty();
if(!prop.getDefinition().isMultiple())
{
%>
<%=prop.getName() %> <%=prop.getString() %> <br />
<%
}
}
%>
com.day.cq.tagging.Tag,
com.day.cq.tagging.TagManager,com.day.cq.tagging.JcrTagManagerFactory"
%>
<%
//Node node;
Session session = slingRequest.getResourceResolver().adaptTo(Session.class);
TagManager tagManager = sling.getService(JcrTagManagerFactory.class).getTagManager(session);
Tag tag = tagManager.resolve("/apps/webexample_siva/components/content/contact");
//specify the path which you want to get
Node node = tag.adaptTo(Node.class);
String name= node.getName();
%>
//Iterate node properties and displays node property name and value
<%
for(PropertyIterator propeIterator = node.getProperties() ; propeIterator.hasNext();)
{
Property prop= propeIterator.nextProperty();
if(!prop.getDefinition().isMultiple())
{
%>
<%=prop.getName() %> <%=prop.getString() %> <br />
<%
}
}
%>
Best description ever..if you want to know about bit coin and getnode you can come in this link Getnode
ReplyDeleteEffective Coding..
ReplyDeletelarge pull up banner in pakistan