This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Register phone number validation field looking for format "xxx-xxx-xxxx". | |
* | |
* The validator keys off of the ".field-phonenumber" selector. To use in Touch | |
* UI dialogs, add the class "field-phonenumber" to a textfield. | |
* | |
* <phonenumber | |
* jcr:primaryType="nt:unstructured" | |
* sling:resourceType="granite/ui/components/foundation/form/textfield" | |
* fieldLabel="Phone Number" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package apps.clientlib_async.sightly.templates; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.io.StringWriter; | |
import java.util.Collection; | |
import java.util.List; | |
import java.util.ArrayList; | |
import javax.script.Bindings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.nateyolles.sling; | |
import org.apache.felix.scr.annotations.Reference; | |
import org.apache.felix.scr.annotations.sling.SlingServlet; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.SlingHttpServletResponse; | |
import org.apache.sling.api.servlets.SlingSafeMethodsServlet; | |
import org.apache.sling.engine.SlingRequestProcessor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component( | |
immediate = true, | |
service = Servlet.class, | |
property = { | |
"sling.servlet.resourceTypes=project/components/component" | |
} | |
) | |
@Designate(ocd = SampleOsgiServlet.Configuration.class) | |
public class SampleOsgiServlet extends SlingSafeMethodsServlet { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.nateyolles.aem; | |
import org.apache.felix.scr.annotations.sling.SlingServlet; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.SlingHttpServletResponse; | |
import org.apache.sling.api.resource.Resource; | |
import org.apache.sling.api.resource.ResourceResolver; | |
import org.apache.sling.api.servlets.SlingSafeMethodsServlet; | |
import org.apache.sling.commons.json.JSONException; | |
import org.apache.sling.commons.json.jcr.JsonItemWriter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Granite UI Multifield adapter | |
* | |
* Has improved setDisabled method which disables all form input fields, the | |
* delete buttons, the reorder buttons and the add button within the Multifield. | |
* The adapter also contains a new method to enable and disable just the add | |
* button which can be used to limit the size of the multifield. | |
* | |
* Usage: | |
* var field = $('.coral-Multifield').adaptTo('nateyolles-field'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<widgetCustomRenderConditionHasProperty | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/textfield" | |
fieldLabel="This only shows if "/content/renderconditiondemo/en/jcr:content/par/text" has property "text"" | |
name="./widgetCustomRenderConditionHasProperty"> | |
<granite:rendercondition | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="renderconditiondemo/components/renderconditions/hasProperty" | |
resourcePath="${requestPathInfo.suffix}" | |
propertyName="text"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SlingServlet( | |
metatype = true, | |
paths = { | |
"/bin/foo", | |
"/bin/bar" | |
}, | |
extensions = {"html"}, | |
selectors = {"foo"}, | |
resourceTypes = {"nt:file", "project/components/component"} | |
methods = "GET", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component( | |
service = Servlet.class, | |
property = { | |
"sling.servlet.extensions=html", | |
"sling.servlet.selectors=foo", | |
"sling.servlet.paths=/bin/foo", | |
"sling.servlet.paths=/bin/bar", | |
"sling.servlet.methods=get", | |
"sling.servlet.resourceTypes=nt:file", | |
"sling.servlet.resourceTypes=project/components/component" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.nateyolles.aem.core.replication; | |
import java.io.IOException; | |
import java.util.Arrays; | |
import com.day.cq.replication.AgentConfig; | |
import com.day.cq.replication.ReplicationActionType; | |
import com.day.cq.replication.ReplicationException; | |
import com.day.cq.replication.ReplicationLog; | |
import com.day.cq.replication.ReplicationResult; |