Hi all I am using Ajax in my project for loading product name in one select box with onselect event of storename in select box onchange event. Here i used Ajax for getting listing from java action class to jsp. my code in Jsp and Action class as follows.
<s:label value="Store Name : *" />
<s:select name="storeName" list="storeList" onchange="loadProduct(this.value)" listKey="storeId" listValue="storeName" headerKey="-1" headerValue="Select the Store" />
<s:label value="Product Name : *" />
<s:select name="productName" list="productList" listKey="productId" listValue="productName" />
function loadProduct(id){
var URL = "AjaxPopMyCycle.action?storeName="+id;
ajaxEditFunctionCall(URL);
}
function ajaxEditFunctionCall(URL){
try{
xmlHttp=new XMLHttpRequest();
}catch (e){
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}catch (e){
try{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}catch (e){
alert("Your browser does not support AJAX!");
return false;
}
}
}
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4){
if (xmlHttp.status == 200) {
if(xmlHttp.responseXML != null ){
showMessage(xmlHttp.responseXML);
}
}
}
}
xmlHttp.open("GET", URL, true);
xmlHttp.send(URL);
}
function showMessage(errorDisplayXML){
var checklist=document.Add.productName;
checklist.options.length=0;
if(xmlHttp.readyState==4){
if(errorDisplayXML.getElementsByTagName("rootElement")[0]!=null){
var rootElement = errorDisplayXML.getElementsByTagName("rootElement")[0];
var location = rootElement.getElementsByTagName("Message");
var locArr = location[0];
var locArr = " ";
var tempArr;
var tempArr1;
for(var i=0; i<location.length; i++){
tempArr = "";
tempArr1 = "";
locArr = location[i];
tempArr = locArr.getElementsByTagName("productId")[0].firstChild.nodeValue;
tempArr1 = locArr.getElementsByTagName("productnName")[0].firstChild.nodeValue;
checklist.options[i]= new Option(tempArr1,tempArr);
}
}else{
alert("errorDisplayXML Contains NULL");
}
}
}
Following code in Action class for Getting result and load into XML as Follows.
detailedList contains the list of product related with store from database.
public String getDetails(List detailedList)throws Exception{
Element tempElem = null,
rootElem = null;
Text textElem = null;
document=new org.dom4j.dom.DOMDocument();
rootElem = document.createElement("rootElement");
Element errorElement = null;
List saveList = new ArrayList();
saveList = detailedList;
System.out.println("DetailedList:"+saveList.size());
if(saveList.size()>0){
try {
for(int i=0;i<saveList.size();i++){
Product aproduct = (Product )saveList.get(i);
errorElement = document.createElement("Message");
tempElem = document.createElement("productId");
textElem = document.createTextNode(aproduct .getProductId());
tempElem.appendChild(textElem);
errorElement.appendChild(tempElem);
tempElem = document.createElement("productName");
textElem = document.createTextNode(aproduct.getProductName());
tempElem.appendChild(textElem);
errorElement.appendChild(tempElem);
rootElem.appendChild(errorElement);
}
}catch (Exception e) {
tempElem = document.createElement("Message");
return parseToString(tempElem);
}
return parseToString(rootElem);
}
public String parseToString(Element node) throws Exception {
OutputFormat format = new OutputFormat();
StringWriter stringOut = new StringWriter();
XMLSerializer serial = new XMLSerializer(stringOut,format);
serial.asDOMSerializer();
serial.serialize(node);
return stringOut.toString();
}
I have imported following packages in my action class.
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Text;
import com.sun.org.apache.xml.internal.serialize.OutputFormat;
import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
It works fine with correct functionality for last 3 weeks.
But it is not getting compiling and showing following error message in my server.
C:\Users\Desktop\Updated\Project\src\main\java\com\action
\AjaxAction.java:[199,5] com.sun.org.apache.xml.internal.serialize.XMLSerializer
is Sun proprietary API and may be removed in a future release
C:\Users\Desktop\Updated\Project\src\main\java\com\action
\AjaxAction.java:[199,32] com.sun.org.apache.xml.internal.serialize.XMLSerialize
r is Sun proprietary API and may be removed in a future release
My project uses Struts2, Jsp, Hibernate3 as Front end and Mysql server as Back end. I have no idea to fix this issue.
Anyone please help me to fix this issue. Thanks in Advance!!!.
Using org.apache.xml.serialize.XMLSerializer also you can avoid the error. import this class from xercesImpl-2.7.1.jar and use in parseToString() like this :
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
public String parseToString(Element node) throws Exception {
OutputFormat format = new OutputFormat();
java.io.Writer stringOut = new StringWriter();
XMLSerializer serial = new XMLSerializer(stringOut,format);
serial.serialize(node);
return stringOut.toString();
}
Related
I use oracle-adf via xml menu model. Now I want to start download file on one of itemNode and without redirect. I'm tried to define action attribute with method which invokes hidden button's method(this button has inner fileDownloadActionListener) through javascript. But it doesn't work. Is it correct? or there is other way to decide this problem? Or may be it is impossible at all?
Hidden button code:
<af:commandButton text="NONE"
id="downloadInstructionsBtn"
action=" "
visible="false"
clientComponent="true"
partialSubmit="false">
<af:fileDownloadActionListener filename="Инструкции пользователя"
contentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
method="#{pageFlowScope.vocsReportsRegionController.instructionsDownload}"/>
</af:commandButton>
Item node code:
<itemNode id="userInstructionsDownloadFlow" label="Инструкции пользователя"
focusViewId="#"
action="#{pageFlowScope.vocsReportsRegionController.invokeInstructionDownload}"
partialSubmit="true"
clientComponent="true"/>
Javascript cut:
function handleInstructionsDownload(event) {
event.preventUserInput();
var source = event.getSource().getParent();
var downloadBtn = source.findComponent("downloadInstructionsBtn");
var actionEvent = new AdfActionEvent(downloadBtn);
actionEvent.preventUserInput();
actionEvent.queue();
}
Methods' description:
public void invokeInstructionDownload(){
FacesContext context = FacesContext.getCurrentInstance();
ExtendedRenderKitService erks =
Service.getService(context.getRenderKit(),
ExtendedRenderKitService.class);
erks.addScript(context, "handleInstructionsDownload();");
}
public void instructionsDownload(FacesContext context,
OutputStream out) throws IOException{
File f = new File("C:\\Users\\apozdnyakov\\Downloads\\Типы_контроля_время.xlsx");
FileInputStream fis;
byte[] b;
try {
fis = new FileInputStream(f);
int n;
while ((n = fis.available()) > 0) {
b = new byte[n];
int result = fis.read(b);
out.write(b, 0, b.length);
if (result == -1)
break;
}
} catch (IOException e) {
e.printStackTrace();
}
out.flush();
}
I think there are a few possible reasons of your problem.
1- handleInstructionsDownload javascript function couldn't find the component, because of hierarchy of the jsf codes. You can add log in javascript function, for understanding that.
function handleInstructionsDownload(event) {
event.preventUserInput();
var source = event.getSource().getParent();
var downloadBtn = source.findComponent("downloadInstructionsBtn");
if (downloadBtn == null) {
console.log('The component is null!');
}
var actionEvent = new AdfActionEvent(downloadBtn);
actionEvent.preventUserInput();
actionEvent.queue();
}
If you see this log in javascript console you should control your hierarchy of jsf codes. And you should access to button by true component id.
2- invokeInstructionDownload java method couldn't find or call the javascript handleInstructionsDownload function. You can add log in the first line of the javascript function like that:
function handleInstructionsDownload(event) {
console.log('The js function fired!');
event.preventUserInput();
var source = event.getSource().getParent();
var downloadBtn = source.findComponent("downloadInstructionsBtn");
var actionEvent = new AdfActionEvent(downloadBtn);
actionEvent.preventUserInput();
actionEvent.queue();
}
If there is this log in console, you should change your javascript method calling. But I think your Java method is true :)
3- If these are not solutions of your problem, you can change your calling the hidden button like that.
Hidden button code:
<af:commandButton text="NONE"
id="downloadInstructionsBtn" action=" "
visible="false"
clientComponent="true"
partialSubmit="false"
binding="#{pageFlowScope.vocsReportsRegionController.downloadInstructionsBtn}">
<af:fileDownloadActionListener filename="Инструкции пользователя"
contentType="application/vnd.openxmlformats officedocument.spreadsheetml.sheet"
method="#{pageFlowScope.vocsReportsRegionController.instructionsDownload}"/>
</af:commandButton>
ManagedBean code:
private RichButton downloadInstructionsBtn;
public RichButton getDownloadInstructionsBtn() {
return downloadInstructionsBtn;
}
public void setDownloadInstructionsBtn(RichButton downloadInstructionsBtn) {
this.downloadInstructionsBtn = downloadInstructionsBtn;
}
public void invokeInstructionDownload(){
ActionEvent actionEvent = new ActionEvent((UIComponent) downloadInstructionsBtn);
actionEvent.queue();
}
First, I want to say thanks to everyone that took their time to help me figure this out because I was searching for more than a week for a solution to my problem. Here it is:
My goal is to start a custom workflow in Alfresco Community 5.2 and to set some custom properties in the first task trough a web script using only the Public Java API. My class is extending AbstractWebScript. Currently I have success with starting the workflow and setting properties like bpm:workflowDescription, but I'm not able to set my custom properties in the tasks.
Here is the code:
public class StartWorkflow extends AbstractWebScript {
/**
* The Alfresco Service Registry that gives access to all public content services in Alfresco.
*/
private ServiceRegistry serviceRegistry;
public void setServiceRegistry(ServiceRegistry serviceRegistry) {
this.serviceRegistry = serviceRegistry;
}
#Override
public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException {
// Create JSON object for the response
JSONObject obj = new JSONObject();
try {
// Check if parameter defName is present in the request
String wfDefFromReq = req.getParameter("defName");
if (wfDefFromReq == null) {
obj.put("resultCode", "1 (Error)");
obj.put("errorMessage", "Parameter defName not found.");
return;
}
// Get the WFL Service
WorkflowService workflowService = serviceRegistry.getWorkflowService();
// Build WFL Definition name
String wfDefName = "activiti$" + wfDefFromReq;
// Get WorkflowDefinition object
WorkflowDefinition wfDef = workflowService.getDefinitionByName(wfDefName);
// Check if such WorkflowDefinition exists
if (wfDef == null) {
obj.put("resultCode", "1 (Error)");
obj.put("errorMessage", "No workflow definition found for defName = " + wfDefName);
return;
}
// Get parameters from the request
Content reqContent = req.getContent();
if (reqContent == null) {
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Missing request body.");
}
String content;
content = reqContent.getContent();
if (content.isEmpty()) {
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Content is empty");
}
JSONTokener jsonTokener = new JSONTokener(content);
JSONObject json = new JSONObject(jsonTokener);
// Set the workflow description
Map<QName, Serializable> params = new HashMap();
params.put(WorkflowModel.PROP_WORKFLOW_DESCRIPTION, "Workflow started from JAVA API");
// Start the workflow
WorkflowPath wfPath = workflowService.startWorkflow(wfDef.getId(), params);
// Get params from the POST request
Map<QName, Serializable> reqParams = new HashMap();
Iterator<String> i = json.keys();
while (i.hasNext()) {
String paramName = i.next();
QName qName = QName.createQName(paramName);
String value = json.getString(qName.getLocalName());
reqParams.put(qName, value);
}
// Try to update the task properties
// Get the next active task which contains the properties to update
WorkflowTask wfTask = workflowService.getTasksForWorkflowPath(wfPath.getId()).get(0);
// Update properties
WorkflowTask updatedTask = workflowService.updateTask(wfTask.getId(), reqParams, null, null);
obj.put("resultCode", "0 (Success)");
obj.put("workflowId", wfPath.getId());
} catch (JSONException e) {
throw new WebScriptException(Status.STATUS_BAD_REQUEST,
e.getLocalizedMessage());
} catch (IOException ioe) {
throw new WebScriptException(Status.STATUS_BAD_REQUEST,
"Error when parsing the request.",
ioe);
} finally {
// build a JSON string and send it back
String jsonString = obj.toString();
res.getWriter().write(jsonString);
}
}
}
Here is how I call the webscript:
curl -v -uadmin:admin -X POST -d #postParams.json localhost:8080/alfresco/s/workflow/startJava?defName=nameOfTheWFLDefinition -H "Content-Type:application/json"
In postParams.json file I have the required pairs for property/value which I need to update:
{
"cmprop:propOne" : "Value 1",
"cmprop:propTwo" : "Value 2",
"cmprop:propThree" : "Value 3"
}
The workflow is started, bpm:workflowDescription is set correctly, but the properties in the task are not visible to be set.
I made a JS script which I call when the workflow is started:
execution.setVariable('bpm_workflowDescription', 'Some String ' + execution.getVariable('cmprop:propOne'));
And actually the value for cmprop:propOne is used and the description is properly updated - which means that those properties are updated somewhere (on execution level maybe?) but I cannot figure out why they are not visible when I open the task.
I had success with starting the workflow and updating the properties using the JavaScript API with:
if (wfdef) {
// Get the params
wfparams = {};
if (jsonRequest) {
for ( var prop in jsonRequest) {
wfparams[prop] = jsonRequest[prop];
}
}
wfpackage = workflow.createPackage();
wfpath = wfdef.startWorkflow(wfpackage, wfparams);
The problem is that I only want to use the public Java API, please help.
Thanks!
Do you set your variables locally in your tasks? From what I see, it seems that you define your variables at the execution level, but not at the state level. If you take a look at the ootb adhoc.bpmn20.xml file (https://github.com/Activiti/Activiti-Designer/blob/master/org.activiti.designer.eclipse/src/main/resources/templates/adhoc.bpmn20.xml), you can notice an event listener that sets the variable locally:
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
Usually, I just try to import all tasks for my custom model prefix. So for you, it should look like that:
import java.util.Set;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.DelegateTask;
import org.apache.log4j.Logger;
public class ImportVariables extends AbstractTaskListener {
private Logger logger = Logger.getLogger(ImportVariables.class);
#Override
public void notify(DelegateTask task) {
logger.debug("Inside ImportVariables.notify()");
logger.debug("Task ID:" + task.getId());
logger.debug("Task name:" + task.getName());
logger.debug("Task proc ID:" + task.getProcessInstanceId());
logger.debug("Task def key:" + task.getTaskDefinitionKey());
DelegateExecution execution = task.getExecution();
Set<String> executionVariables = execution.getVariableNamesLocal();
for (String variableName : executionVariables) {
// If the variable starts by "cmprop_"
if (variableName.startsWith("cmprop_")) {
// Publish it at the task level
task.setVariableLocal(variableName, execution.getVariableLocal(variableName));
}
}
}
}
Hello I am new to web services.
I am able to create simple web service which accept input string and return another string using eclipse.
But when it comes to JSONObject i am facing problems,while invoking web service
public class HelloWorld {
private int rowNumber;
public byte[] readJSON(JSONObject jsonObject ) throws Exception
{
rowNumber=0;
File excelFile = new File("Test2.xlsx");
OutputStream outStream = new FileOutputStream(excelFile);
XSSFWorkbook workbook = new XSSFWorkbook();
XSSFSheet sheet = workbook.createSheet("TestSheet");
XSSFRow row ;
XSSFCell cell;
JSONArray msg = (JSONArray) jsonObject.get("messages");
Iterator<String> iterator = msg.iterator();
while (iterator.hasNext()) {
row = sheet.createRow(rowNumber);
cell= row.createCell(0);
cell.setCellValue(iterator.next());
rowNumber=rowNumber+1;
}
workbook.write(outStream);
outStream.close();
Path path = Paths.get("Test2.xlsx");
byte[] data = Files.readAllBytes(path);
return data;
}
public float addValue(float value) {
return (value + 10);
}
}
so help me to consume the web service.
SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. this error i am getting when i try to invoke client. and another thing input parameter as JSONObject is allowed?
You can use the package Package javax.ws.rs.
import javax.ws.rs.*;
Here would be a short of example of the library in action:
Here is the HTML:
<div>
Welcome and happy <span id="today"></span>.
What's your name?
<input id="name" type="text" autofocus />
<button id="submit" onclick="greet()">Submit</button>
</div>
<div id="greet">
<!-- greeting goes here -->
</div>
<script>
// fills in <span id="today">...</span> with today's day of the week
// returned from /rest/today server endpoint
function today() {
$.get("/rest/today", function(theday) {
$("#today").text(theday);
});
};
// fills in <div id="greeting">...</div> with the greeting
// returned from calling the /rest/hello?name=... server endpoint
// with the name from the input text box
function greet() {
var thename = $("#name").val();
$.get("/rest/hello", { name: thename }, function(thehello) {
$("#greet").text(thehello);
})
.fail(function(jqXHR, textStatus, errorThrown) {
// displays server error message, e.g. if called with empty name
$("#greet").text(textStatus + ": " + errorThrown);
});
};
$(today); // execute today() after DOM is ready, see https://api.jquery.com/ready/
</script>
</body>
</html>
With corresponding java code:
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
/**
* REST service that greets requests.
*
* This is a "root resource class" as explained in
* https://jersey.java.net/documentation/latest/jaxrs-resources.html
*/
#Path("/")
public class HelloService {
#GET
#Path("/today")
public String today() {
return DayOfWeek.today();
}
#GET
#Path("/hello")
public Response hello(#QueryParam("name") String name) {
if (name == null || name.isEmpty()) {
return Response.status(Response.Status.BAD_REQUEST).build();
} else {
return Response.ok("hello " + name).build();
}
}
}
In order to work with JSON objects, you'll need to use Gson.toJson(). Do something along the lines of this:
String json = new Gson().toJson(some_object);
return Response.ok(json, MediaType.APPLICATION_JSON).build();
I hope this was helpful!
You can try to use Jackson: very good library in which you define you Java object model class that you can convert to JSON or parse from JSON.
You will find a lot of examples
When I use the following method :
public String getProjectList() {
projNames = new ArrayList<>();
projNames.add("Project1");
projNames.add("Project2");
projNames.add("Project3");
return new Gson().toJson(projNames);
in the following code :
$(document).ready(function() {
$.getJSON('DBDropDown', function(resp) { // on sucess
var $select = $('#someselect');
$select.find('option').remove();
$select.prepend("<option value='Select Project'></option>").val('');
$.each(resp, function(key, value) { // Iterate over the JSON object.
$('<option>').val(key).text(value).appendTo($select); // Create HTML <option> element, set its value with currently iterated key and its text content with currently iterated item and finally append it to the <select>.
});
}).fail(function() { // on failure
alert("Request failed.");
});
});
and my JSP call is :
response.getWriter().write(MusicDatabase
.getInstance()
.getProjectList()
I am able to get the dropdown menu. But when I use this method in place of getProjectList I dont get a response when I check chrome developer tools and debug.
public String Names() throws URISyntaxException{
names = new ArrayList<>();
URI uri = new URI("https://jira.xxxxx.com");
JiraRestClientFactory jrcf = new AsynchronousJiraRestClientFactory();
JiraRestClient jrc = jrcf.createWithBasicHttpAuthentication(uri, "xxx", "xxxx");
Iterable<BasicProject> allproject = jrc.getProjectClient().getAllProjects().claim();
for(BasicProject project : allproject){
names.add(project.getName());
}
return new Gson().toJson(names);
}
I am not getting any response and console throws ClassDefNotFound Exception when I already have all the classes needed. Help me if you have gone through this type of issue.
Thanks
EDIT: This occurs during any component AJAX call.
I am building a web application using ICEFaces 3.2.0 community along with Spring Security 3.2 Everything has been going very well up until a few days ago. I have an ACE AutoCompleteEntry component in the page with a backing bean attached to the value as the following example:
<ace:autoCompleteEntry id="autoCompleteState"
label="State"
labelPosition="top"
value="#{autoCompleteEntry.selectedText}"
rows="10" width="160"
filterMatchMode="startsWith">
<f:selectItems value="#{autoCompleteEntry.states}"/>
</ace:autoCompleteEntry>
The backing bean attached is as follows:
#ManagedBean(name=AutoCompleteEntry.BEAN_NAME)
#SessionScoped
public class AutoCompleteEntry implements Serializable {
public static final String BEAN_NAME = "autoCompleteEntry";
public static final String STATE_FILENAME = "State_Names.txt";
public static final String RESOURCE_PATH = "/resources/selectinputtext/";
public AutoCompleteEntry() {
}
public List<SelectItem> states;
public List<SelectItem> getStates() {
if(states == null) {
states = new ArrayList<SelectItem>();
for(String state : readStateFile()) {
states.add(new SelectItem(state));
}
}
return states;
}
private String selectedText = null;
public String getSelectedText() {return selectedText;}
public void setSelectedText(String selectedText) {this.selectedText = selectedText;}
private static List<String> readStateFile() {
InputStream fileIn = null;
BufferedReader in = null;
try {
FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext ec = fc.getExternalContext();
fileIn = ec.getResourceAsStream(AutoCompleteEntry.RESOURCE_PATH + STATE_FILENAME);
if(fileIn != null) {
in = new BufferedReader(new InputStreamReader(fileIn));
List<String> loadedStates = new ArrayList<String>(53);
String read;
while((read = in.readLine()) != null) {
loadedStates.add(read);
}
return loadedStates;
}
}catch (IOException failedRead) {
failedRead.printStackTrace();
}finally {
try {
if(in != null) {
in.close();
}
}catch (IOException failedClose) {
failedClose.printStackTrace();
}
}
List<String> errorReturn = new ArrayList<String>(1);
errorReturn.add("Error Loading State List");
return errorReturn;
}
}
The problem is that each time I attempt to test the component instead of bringing up a list of the States it redirects to an absolute path of my main page, which results in a 404. In developer tools I see an error of:
> Uncaught TypeError: Cannot read property 'value' of undefined
bridge.uncompressed.js.jsf:2701
namespace.onAfterUpdate.viewIDElement bridge.uncompressed.js.jsf:2701
apply bridge.uncompressed.js.jsf:122
(anonymous function) bridge.uncompressed.js.jsf:484
(anonymous function) bridge.uncompressed.js.jsf:363
(anonymous function) bridge.uncompressed.js.jsf:240
broadcast bridge.uncompressed.js.jsf:483
(anonymous function) bridge.uncompressed.js.jsf:1928
sendEvent jsf.js.jsf:1447
AjaxEngine.req.sendRequest jsf.js.jsf:1333
request jsf.js.jsf:1834
fullSubmit bridge.uncompressed.js.jsf:2309
submit bridge.uncompressed.js.jsf:2314
iceSubmit compat.uncompressed.js.jsf:1523
onclick
The developer tools log shows:
> [window] persisted focus for element "autoCompleteState_input"
bridge.uncompressed.js.jsf:1252
[window] full submit to localhost:8181/HHCA_Portal/pages/secure/HHCA.jsf
javax.faces.execute: #all
javax.faces.render: patientRecordsForm
javax.faces.source: autoCompleteState_input
view ID: v33tl98j
event type: unknown bridge.uncompressed.js.jsf:1252
XHR finished loading: "localhost:8181/HHCA_Portal/pages/secure/HHCA.jsf".
jsf.js.jsf:1334
AjaxEngine.req.sendRequest jsf.js.jsf:1334
request jsf.js.jsf:1834
fullSubmit bridge.uncompressed.js.jsf:2309
ice.ace.AjaxRequest ace-jquery.uncompressed.js.jsf:20854
ice.ace.ab ace-jquery.uncompressed.js.jsf:20779
ice.ace.Autocompleter.getUpdatedChoices autocompleteentry.js.jsf:695
ice.ace.Autocompleter.onObserverEvent autocompleteentry.js.jsf:637
(anonymous function)
I have spent many hours working on this and other issues, and I have run out of ideas. If someone has some kind of assistance I would really appreciate the help.
If you are using JSF 2 then you can add your own exception handler , this should be able to capture ajax requests.
<factory>
<exception-handler-factory>
test.MyExceptionHandlerFactory
</exception-handler-factory>
</factory>
see the examples here ,
http://balusc.blogspot.com/2012/03/full-ajax-exception-handler.html
http://wmarkito.wordpress.com/2012/04/05/adding-global-exception-handling-using-jsf-2-x-exceptionhandler/