Not stringifying it, like this:
myReader.readAsText(new Blob([this.importContext], { type:
"application/json" }));
gives:
myReader.result "[object Object]"
Le vendredi 15 septembre 2017 15:50:51 UTC+2, Sander Elias a écrit :
>
> Hmm, the myReader.result is already a string, so stringifying it d
Hi Sander,
Have tried with Firefox and it displays the same:
myReader.result
"{\"multiple\":false,\"createUpdate\":null,\"createMissingBundles\":false,\"createMissingMessages\":false}"
Could you please develop on "as you are stringify's the bare string" ? I
don't know what a polyfill for formD
Hi Sander,
Yes, it helps a lot, thanks.
I inserted this code:
var myReader = new FileReader();
myReader.onload = function (event) {
console.log("myReader.result",JSON.stringify(myReader.result));
};
myReader.readAsText(new Blob([JSON.stringify(this.importContext)], { type:
"application/json"
Hi Sander,
Thanks again for all this trouble. I made this modification so I replaced
event.formData.append("import-context", new
Blob([JSON.stringify(this.importContext)], { type: "application/json"}));
by
event.formData.append("import-context", new
Blob([JSON.stringify(this.importContext)],
Sorry, the stringified value is:
{"multiple":false,"createUpdate":null,"createMissingBundles":false,"createMissingMessages":false}
Le vendredi 15 septembre 2017 11:21:15 UTC+2, nicolas duminil a écrit :
>
> Hi Sander,
>
> Yes, this is the
Hi Sander,
Yes, this is the ouput value:
ImportInputContext {multiple: false, createUpdate: NaN,
createMissingBundles: false, createMissingMessages: false}
Do you see anything wrong here ?
Many thanks in advance for your help.
Nicolas
Le vendredi 15 septembre 2017 03:14:48 UTC+2, Sander Elia
Hi Sander,
Thanks for your reply. Looking at this link, I don't see any relation with
the issue I posted. Could you please explain ?
Many thanks in advance,
Nicolas
Le lundi 11 septembre 2017 17:02:28 UTC+2, Sander Elias a écrit :
>
> Hi Nicolas,
>
> I think your answer is here:
> https://sta
Does anyone fell concerned please ?
Le mercredi 6 septembre 2017 17:40:50 UTC+2, nicolas duminil a écrit :
>
> Hello,
>
> From an Angular component, I need to call a JAX-RS service having this
> signature:
>
> @POST
>
> @Path("/import")
>
&
Hello,
I need to call a JAX-RS service which returns an excel file and i need to
download locally this file. I have googled to see how to do it in Angular
and found lots of samples for Angular 2 which don't work in Angular 4 and
HttpClient.
For example I found this:
public downloadFile2(bundl
Hello,
>From an Angular component, I need to call a JAX-RS service having this
signature:
@POST
@Path("/import")
@Produces(MediaType.*APPLICATION_JSON*)
@Consumes(MediaType.*MULTIPART_FORM_DATA*)
*public* Response uploadExcelFile(FormDataMultiPart form) *throws*
Exception
I need
looks like you're
> sending JSON but leaving the default content type of "text/plain" which
> your server does not appear to support.
>
> On Fri, Aug 25, 2017, 08:31 nicolas duminil <
> nicolas...@simplex-software.fr > wrote:
>
>> Greetings,
>
Greetings,
I have a JAX-RS resource which signature is as follows:
@POST
@Path("myPath")
@Produces({MediaType.APPLICATION_OCTET_STREAM})
@Consumes(MediaType.APPLICATION_JSON)
public Response myResource(MyObject) throws Exception { ... }
where MyObject is defined as:
@XmlRootElement
pu
Hi Sander,
Yes, you were right, I found the problem. Basically, the back-end returns
an object of class BundleList which contains a List named bundles.
Hence the Java to JSON serializing process creates a ket/value pair having
the name "bundles" with the value a List. This explains the
behavio
Hi Elias,
Thanks again for your help.
The console logs shows the following:
{bundles: Array(11)}
1. 0: {codePk: "DynamicBundle", label: "DynamicBundle", isActive: "1"}
2. 1:{codePk: "TranscludeBundlesLoop", label: "Transclude bundles
with a loop", isActive: "1"}
3. 2:{code
Hi Sander,
There is something very misterious here and I'll try to explain:
I have the following service:
@Injectable()
export class BundleService {
private url = environment.bundleServiceCallUrl;
constructor(private http: HttpClient) {
}
public getBundles(): Observable> {
const params = new Ht
Hi Sander,
Yes, you're right, this is what I got. However, here is my code:
this.bundleService.getBundles().subscribe((bundlesArray: Array) => {
console.log("*** Got bundles:", bundlesArray);
console.log("*** Types:", typeof bundlesArray, Array.isArray(bundlesArray));
for (let bundle of bundlesAr
Hello,
I'm trying to iterate through an Array, as follows:
myArray = new Array();
...
console.log(myArray);
console.log("*** myArray.length", myArray.length);
for (let m of myArray) {
console.log(m);
}
Running this code, correctly displays the content of myArray array, there
are 7 MyStuff ele
Greetings,
I recently tried to start and Angular tutirial and, after having ran the
famous command:
ng --ng4 angular-hello-world
I found myself with a new project having 23 118 files ! What's the point of
such a project ? Who could reasonably use something like that ? I'm doing
Java and Java
Greetings,
I recently tried to start and Angular tutirial and, after having ran the
famous command:
ng --ng4 angular-hello-world
I found myself with a new project having 23 118 files ! What's the point of
such a project ? Who could reasonably use something like that ? I'm doing
Java and Java
19 matches
Mail list logo