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.publick.services.impl; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.apache.felix.scr.annotations.Component; | |
import org.apache.felix.scr.annotations.Reference; | |
import org.apache.felix.scr.annotations.Service; | |
import org.apache.felix.scr.annotations.Properties; | |
import org.apache.felix.scr.annotations.Property; |
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
# Simulated checked checkbox. The value is saved as a Boolean type with the value of true. | |
curl http://localhost:4502/test -u admin:admin -Fcheck="true" -Fcheck@TypeHint="Boolean" | |
# Simulated unchecked checkbox. No value for "check" is submitted and the JCR property value remains unchanged. | |
curl http://localhost:4502/test -u admin:admin -Fcheck@TypeHint="Boolean" | |
# Simulated unchecked checkbox with Delete suffix. The JCR property is removed. | |
curl http://localhost:4502/test -u admin:admin -Fcheck@TypeHint="Boolean" -Fcheck@Delete="true" | |
# Simulated unchecked checkbox with TypeHint, DefaultValue and UseDefaultWhenMissing suffixes. |
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
/* | |
* Sightly classes extending com.adobe.cq.sightly.WCMUse or com.adobe.cq.sightly.WCMUsePojo | |
*/ | |
Boolean checkbox = getProperties().get("myBooleanCheckbox", Boolean.class); | |
/* | |
* Set the default value. | |
*/ | |
Boolean checkbox = getProperties().get("myBooleanCheckbox", false); | |
Boolean checkbox = getProperties().get("myBooleanCheckbox", true); |
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.BufferedWriter; | |
import java.io.IOException; | |
import java.nio.charset.Charset; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.nio.file.Files; | |
import java.nio.file.Path; |
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
var ui = $(window).adaptTo('foundation-ui'); | |
ui.alert('Notification', 'This alert was created using the Granite UI "foundation-ui" adapter', 'notice'); |
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
var field = $('.coral-Multifield').adaptTo('nateyolles-field'); | |
field.setDisabled(true); |
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.slashconf.core.models; | |
import javax.annotation.PostConstruct; | |
import javax.inject.Inject; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.resource.ValueMap; | |
import org.apache.sling.models.annotations.Model; | |
import com.adobe.granite.confmgr.Conf; |
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.slashconf.core.models; | |
import javax.annotation.PostConstruct; | |
import javax.inject.Inject; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.resource.Resource; | |
import org.apache.sling.api.resource.ValueMap; | |
import org.apache.sling.models.annotations.Model; |
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.slashconf.core.models; | |
import java.util.List; | |
import javax.annotation.PostConstruct; | |
import javax.inject.Inject; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.resource.ResourceResolver; | |
import org.apache.sling.api.resource.ValueMap; |
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
{ | |
"jcr:primaryType": "sling:Folder", | |
"jcr:mixinTypes": ["rep:AccessControllable"], | |
"global": { | |
"jcr:primaryType": "sling:Folder", | |
"settings": { | |
"jcr:primaryType": "sling:Folder", | |
"socialmedia": { | |
"jcr:primaryType": "cq:Page", | |
"facebook": { |
OlderNewer