Questions tagged [databinder]
73 questions
3
votes
1 answer
Getting a 302 http redirect location with Databinder-Dispatch
With databinder-dispatch 0.8.3 I'm trying to get the redirect url from a 302 http response, but I get the following exception:
Caused by: dispatch.StatusCode: Unexpected response code: 302
Here's what I've attempted, with some help:
import…

Carlos López-Camey
- 2,504
- 1
- 17
- 20
3
votes
3 answers
http(/* argument here */) How is this Object (Http) being used without an explicit or implicit method?
In the example for coding with Json using Databinder Dispatch Nathan uses an Object (Http) without a method, shown here:
import dispatch._
import Http._
Http("http://www.fox.com/dollhouse/" >>> System.out )
How is he doing this?
Thank you for all…

Randin
- 1,875
- 3
- 17
- 14
3
votes
1 answer
Spring MVC custom editor and select-options bad performance
Im using custom editor in Spring MVC to map string valuest to my domain objects. Simple case: User object refers to Company (User.company -> Company). In User form I register data binder:
protected void initBinder(WebDataBinder binder) throws…

Bad Pitt
- 524
- 1
- 6
- 15
2
votes
1 answer
Akka REST service + dispatch
I followed the example here. It works, fine. But now I need to perform some business logic in case get:Get =>
Required business logic includes using dispatch library. In a nutshell, I do a request to some page, get the data, wrap it in some class,…

George
- 8,368
- 12
- 65
- 106
2
votes
2 answers
How do I set up databinder dispatch to use in Eclipse?
I want to write some simple HTTP requests in Scala, but the Databinder Dispatch library only has instructions for sbt. As I'm a relative Eclipse newbie, can someone provide instructions on how I use it in my Scala project in Eclipse?
I'm using…

ACyclic
- 5,904
- 6
- 26
- 28
2
votes
1 answer
Error while Embedding Xpath Code and Inline Server Tags
Grid View template field -
<% if ((Convert.ToInt64(XPath("NoOfGuests")) < 0))
{ %>
…

patel
- 1,533
- 4
- 14
- 15
2
votes
2 answers
Boolean and array data binding using Jackson
I am trying deserialize the result returned from an API call. However, the result can either contain a Boolean or an array.
If the result is Boolean, the JSON content received in the response looks like:
{
"succeeded": true,
"version": 1.0
}
If…

alwaysAStudent
- 2,110
- 4
- 24
- 47
2
votes
1 answer
databinder dispatch not properly handling HTTP 302 and authentication
I am using dispatch 0.11.0, Scala 2.10 and trying to get this code to work
val svc = url("https://my-server/img/cat.jpg").as(username, password)
val respBody = Http(svc OK as.Response(_.getResponseBodyAsStream))
respBody onComplete {
case…

Bob
- 8,424
- 17
- 72
- 110
2
votes
3 answers
Databinder.Eval double quotes
I have a problem and I can't figure it out how to solve it. I search for solutions but they did not work. So, I have a Datalist with ItemTemplate. I need to add google analytics on onclick event to tags. I tried to add the onclick event like
…

Coder
- 886
- 1
- 12
- 28
2
votes
4 answers
Using the setAllowedFields() method in Spring
I'm using Spring 3.2.0. I have registered a few custom property editors for some basic needs as follows.
import editors.DateTimeEditor;
import editors.StrictNumberFormatEditor;
import java.math.RoundingMode;
import java.net.URL;
import…

Tiny
- 27,221
- 105
- 339
- 599
2
votes
1 answer
checking value through IF in repeater

GenericUser
- 221
- 3
- 19
2
votes
3 answers
using values within if conditions in mark up
I want to use a value that is pulled from the SQL within the if statement. Ideally i want to do the equivalent of
<% If DataBinder.Eval(Container, "DataItem.BookID") == 1 Then%>
Is there a way to do this with the correct syntax?

Sophie
- 795
- 3
- 9
- 13
1
vote
1 answer
Externalize @InitBinder initialization into WebBindingInitializer
There are two major means of data binding initialization, but there is a drawback in the oldschool one, that I can't figure out. This annotation way is great :
@InitBinder("order")
public void initBinder(WebDataBinder binder) {
// Problem is…

lisak
- 21,611
- 40
- 152
- 243
1
vote
0 answers
Using DataBinder for casting the whole object in one step
Is it possible to cast the whole object using DataBinder.Eval() instead of casting it by property. e.g.:
// instead of this
var p = new Person();
p.FirstName = Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "FirstName"));
p.Age =…

sam
- 1,211
- 2
- 13
- 15
1
vote
1 answer