Help coderanch get a
new server
by contributing to the fundraiser

Ayan Biswas

Ranch Hand
+ Follow
since Jul 10, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ayan Biswas

You can always use something like DWR (Direct web remoting) for AJAX call in your app.

10 years ago
This is what worked for me.

Hope this helps someone else.
10 years ago
I am using SPring mvc 3 with Thymeleaf.I have a list in my jsp page and each row in the bean is accompanied by a button.When I click on that button I want to get the index of that row.I am not able to do so.
I have the following list in my Jsp page

How can I send the index number of this arraylist indside the function doAjaxCallRemoveIdentifier().How can I do that?
10 years ago
The reason I want to avoid using jquery is that
1) I have to explicitly send the values of the of each attribute of a bean and then receive them inside the method in the controller.
I would be much simpler if I could just use something like this in the method signature in the method that gets called by the ajax request

If I can do something like this, then, i would get the values that the user entered in the form through the Bean mentioned in @ModelAttribute .
10 years ago
I am using Thymeleaf in my App.To process ajax requests I am using jquery to call the contrller .Like this :

Here is the methos in my controller


Is it possible to avoid jquery in Thymeleaf for the ajax call?
10 years ago


B) If you are expecting the valueChangeEvent listener to be fired automatically when the user updates the GUI, that's not how that works, either. JSF is based on HTTP, HTTP doesn't connect-and-converse the way client/server does, but instead works with paired request/response messages, with requests being initiated by commandButtons, commandLinks or explicit entry of a URL in the user's browser navigation control. The valueChangeListener gets invoked ONLY if all of the submitted data is valid, and then only if the control that it is attached to has an actual change of value.


Sorry I did not get this point. I can see that the control in getting tranferred to the method bound to the ManagedBean when the value is chaged in GUI. The problem is that the bean property that is getting set in the method is not getting retrieved in the GUI
11 years ago
JSF
@Tim Holloway I apologize for being impatient.

Despite some questionable examples from Oracle, JSP's JSTL and JSF are a bad mix.


I have changed my code in the JSP page in the following way


In the method bound to ValueChangeListener I have done the necessary adjustments

After doing this also it is not working.
11 years ago
JSF
I have added a value chage listener in a JSP page in JSF 2.0 and in the method I have set a bean property like this

The checkValidRole method is like this :


I can see that inside the checkValidRole method when flag is false setShowAlert is getting set to true but in the JSP page the bean property is not getting retrieved properly.It is always showing false.I can see the follwing snippet when I do a view source of the page in the browser

The corresponding bean concernBean is registered as a session bean
What mistake am I doing here?
11 years ago
JSF
I am trying to send JSON object to and from a restful webservice implemented through a Jersey API
Here is my code for the service


Here is my code for the client



But this shows the following error

Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class java.lang.Class, and MIME media type, application/octet-stream, was not found

Can anybody help?Is there any tutorial that explains how to do this?
11 years ago
I solved the above problem by using "${sessionScope.userList}" instead of "#session.userList"

But the problem that I have now is that when I use <s:property> tag inside <display:table> tag the value is not getting displayed .So I can see the values in <display:column> tag but not the ones that I try to display using <s:property> tag.
11 years ago
I have the following arraylist in my action class

I try to display it using display tables tag in the jsp page but no value is getting displayed


11 years ago
I am using java mail api to send emails in my application.The email is getting sent properly.But I am struggling with the content where I have a jsp page that includes 2 other jsp pages(header and footer).How to send this jsp page as the content.Currently I am using the following way to set the content of the email
Certainly this is extremely tedious.Is there a way out?I am calling the content setter method (for the email) from an action class in Struts 2
11 years ago
JSP
I have a jsp page with 2 forms(the forms reside in 2 different jsp page and I have just included the pages in the parent jsp page ).Now , if I click a particular submit button the corresponding action gets called but the entire page gets refreshed.What I want is that partial refresh of the pages .How can I do that(I am using struts 1.2)?
12 years ago
Here is my code to unmarshall

Here is my OjectFactory class

And here is my DWLAdminService class

While unmarshalling I find that the fileds in TxResponse does not get set but fields in responseControl get set.!!What can be the possible reason for that..?