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
/* | |
The AJAX code to fetch the values would be placed in your form dropdown options event | |
with the url value being replaced with your REST URL. In this case, "userId" is an | |
input variable expected by the process. Retrieve the full REST URL by selecting your | |
"Default Start Point" in Workbench. From the properties panel, copy from the first "/" | |
to the version number. Omit the version number if you don't wish to target a specific | |
process version in the future. | |
*/ | |
var v_userId = userid.value; |
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.aem.workflowstep; | |
import com.adobe.granite.workflow.WorkflowException; | |
import com.adobe.granite.workflow.WorkflowSession; | |
import com.adobe.granite.workflow.exec.WorkItem; | |
import com.adobe.granite.workflow.exec.WorkflowData; | |
import com.adobe.granite.workflow.exec.WorkflowProcess; | |
import com.adobe.granite.workflow.metadata.MetaDataMap; | |
import org.osgi.framework.Constants; | |
import org.osgi.service.component.annotations.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
// Add listeners to detect when field focus changes and when form is submitted | |
window.addEventListener("bridgeInitializeStart", function (){ | |
guideBridge.connect(function () { | |
guideBridge.on("elementFocusChanged", function (event,data) { | |
fieldFocus(data); | |
}); | |
guideBridge.on("submitStart", function (event,data) { | |
formSubmit(data,event); | |
}); |
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
/* | |
Adaptive form text field used for inline detailed error messages. | |
*/ | |
.alertMessageText input{ | |
border-color: transparent; | |
font-size: 1.25em; | |
background: yellow; | |
color: red; | |
text-align: center; | |
font-weight: bold; |
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.adobe.core.forms.workflow; | |
import com.adobe.granite.workflow.WorkflowException; | |
import com.adobe.granite.workflow.WorkflowSession; | |
import com.adobe.granite.workflow.exec.Route; | |
import com.adobe.granite.workflow.exec.WorkItem; | |
import com.adobe.granite.workflow.exec.WorkflowProcess; | |
import com.adobe.granite.workflow.metadata.MetaDataMap; | |
import org.apache.felix.scr.annotations.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
function check(){ | |
var action = workflowData.getMetaDataMap().get("actionTaken",""); | |
return action=="Approve"; | |
} |
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.adobe.aem.forms; | |
import java.io.File; | |
import java.io.IOException; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.Properties; | |
import java.util.logging.Level; |
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.adobe.aem.forms.servlets; | |
import java.io.IOException; | |
import javax.servlet.ServletException; | |
import org.apache.felix.scr.annotations.sling.SlingServlet; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.SlingHttpServletResponse; | |
import org.slf4j.Logger; |
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
//function to clear values of child nodes of given node | |
function clearChildNodes (currentNode, visibleFlag, visibleValue) { | |
//console.log('search child nodes for: ' + currentNode.name); | |
if(currentNode.items != null && currentNode.getAttribute('sling:resourceType') != 'fd/af/components/guidedropdownlist') { | |
//console.log('child size:' + currentNode.items.length); | |
if (visibleFlag == visibleValue){ | |
//console.log('do nothing'); | |
} | |
else{ | |
//console.log('clear child nodes...'); |
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
function clearEntirePanel(currentNode) { | |
if(currentNode.items != null && currentNode.getAttribute('sling:resourceType') != 'fd/af/components/guidedropdownlist') { | |
var arrayLength = currentNode.items.length; | |
for (var i = 0; i < arrayLength; i++) { | |
var childNode = currentNode.items[i]; | |
var nodeName = childNode.name; | |
var nodeType = childNode.getAttribute('sling:resourceType'); | |
if (nodeType == 'fd/af/components/guideradiobutton' || nodeType == 'fd/af/components/guidetextbox' || nodeType == 'fd/af/components/guidedropdownlist' || nodeType == 'fd/af/components/guidecheckbox' || nodeType == 'fd/af/components/guidedatepicker' || nodeType == 'fd/af/components/guidefileupload' || nodeType == 'fd/af/components/guidenumericbox'){ | |
if (nodeType == 'fd/af/components/guidefileupload'){ | |
childNode.fileAttachment.value = null; |
OlderNewer