Hi there,
We have a datagrid with images on each row, we are able to return the images correctly from the BLOB field. When assigning the images to the image control, the images are all displaying one row lower than they should be. The dataset is correct, it just seems to be the assignment of the image that is giving us issues. The image control in the first row of the grid is displaying the default 'no-image' of the control and not our default.
Seems there is a delay between our assignment and the control rendering. The assignment of the image to the image control happens via a local storage variable with javascript. Anyone able to help us align the images correctly?
Thanks in advance.
Cause:
The following error...
The URL: GET appdesigner.rollbase.com/.../2wBDAAQDAwMDAgQ…dcavddzPbL2w+b2S9n7jmgBx9LRbClzBW1rhSleVaaUuLt7OMVX2/Mvze3h7ZcfacgAB//2Q== 414 (Request-URI Too Large)
..was occuring because when mapping the tt-cimage JSDO element to the imgPart element, the src attribute was assigned the image bytestream
<img src=".../2wBDAAQDAwMDAgQ…dcavddzPbL2w+b2S9n7jmgBx9LRbClzBW1rhSleVaaUuLt7OMVX2/Mvze3h7ZcfacgAB//2Q==" .../>
The client would then process the src value as a target URL and run a GET operation on the server.
the correct value for src should be
"data:image/jpg;base64,.../2wBDAAQDAwMDAgQ…dcavddzPbL2w+b2S9n7jmgBx9LRbClzBW1rhSleVaaUuLt7OMVX2/Mvze3h7ZcfacgAB//2Q=="
In other words we need to prepend "data:image/jpg;base64," to the image bytestream.
This can be achieved on the client via JS. However in the case of datagrids, the value is assigned AFTER the JSDO read operation is complete for the grid item. This causes the src value to be assigned to the next image grid element.
Resolution:
Build the content type directly on the AppServer, ie prepend the "data:image/jpg;base64," to the CLOB temp table field that stores the image bytestream.
ASSIGN phDataset:GET-BUFFER-HANDLE(1)::tt-cimage = "data:image/jpg;base64," + BASE64-ENCODE(encdmptr)
has anyone got any ideas for me?
This is pretty urgent.
A screenshot would help understand the issue. Also do share the javascript code that you use. Thanks.
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
A screenshot would help understand the issue. Also do share the javascript code that you use. Thanks.
Flag this post as spam/abuse.
The code to display the image is it within the data mapping?
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
The code to display the image is it within the data mapping?
Flag this post as spam/abuse.
great - Can you upload the image to here showing the data mapping.
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
great - Can you upload the image to here showing the data mapping.
Flag this post as spam/abuse.
Is the image on the grid called imgPart? I dont see any mapping to that.
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
Is the image on the grid called imgPart? I dont see any mapping to that.
Flag this post as spam/abuse.
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
Is the image on the grid called imgPart? I dont see any mapping to that.
Flag this post as spam/abuse.
Flag this post as spam/abuse.
Have you tried moving the mapping to the imgPart and not the local variable?
Use something like this for the JS behind the imgPart
element.attr("src","data:image/jpg;base64," + value);
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
Have you tried moving the mapping to the imgPart and not the local variable?
Use something like this for the JS behind the imgPart
element.attr("src","data:image/jpg;base64," + value);
Flag this post as spam/abuse.
The JS behind the local variable is it just:-
Appery("imgPart").attr("src","data:image/jpg;base64," + value);
Also, in chrome if you inspect the element then goto resources and view the JSON dataset for the grid. Copy this JSON dataset throw it into http://json.parser.online.fr/ and the answer should become clear. You are looking at what the JSON dataset says for imgPart
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
The JS behind the local variable is it just:-
Appery("imgPart").attr("src","data:image/jpg;base64," + value);
Also, in chrome if you inspect the element then goto resources and view the JSON dataset for the grid. Copy this JSON dataset throw it into http://json.parser.online.fr/ and the answer should become clear. You are looking at what the JSON dataset says for imgPart
Flag this post as spam/abuse.
Is imgPart an image on your grid? If so, try removing the JS behind the imgPart mapping
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
Is imgPart an image on your grid? If so, try removing the JS behind the imgPart mapping
Flag this post as spam/abuse.
I need to see the JSON dataset for the grid. Could you drop this into http://json.parser.online.fr/ and see whats in imgPart?
No problems :)
My beer account is available for donations in PUG - Dusseldorf ;)
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
No problems :)
My beer account is available for donations in PUG - Dusseldorf ;)
Flag this post as spam/abuse.
Hi There,
After my image has been returned correctly, it is being run again and is looking at remote address, 54.208.2.17:443 and the request URL begins with appdesigner.rollbase.com followed by the value of the image. This is causing error 414 (Request-URI Too Large), therefor causing the image control to be cleared.
Why would this be happening? and what can one do to prevent this from happening?
Thanks in advance.
Why do you pass the image bytestream in the request URL?
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
Why do you pass the image bytestream in the request URL?
Flag this post as spam/abuse.
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
Why do you pass the image bytestream in the request URL?
Flag this post as spam/abuse.
Flag this post as spam/abuse.
The dataset should return in the response body, so such an error shall not occur.
The URL: GET appdesigner.rollbase.com/.../2wBDAAQDAwMDAgQ…dcavddzPbL2w+b2S9n7jmgBx9LRbClzBW1rhSleVaaUuLt7OMVX2/Mvze3h7ZcfacgAB//2Q== 414 (Request-URI Too Large)
is a request (not a response) sent from the client to the server to read data.
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
The dataset should return in the response body, so such an error shall not occur.
The URL: GET appdesigner.rollbase.com/.../2wBDAAQDAwMDAgQ…dcavddzPbL2w+b2S9n7jmgBx9LRbClzBW1rhSleVaaUuLt7OMVX2/Mvze3h7ZcfacgAB//2Q== 414 (Request-URI Too Large)
is a request (not a response) sent from the client to the server to read data.
Flag this post as spam/abuse.
Cause:
The following error...
The URL: GET appdesigner.rollbase.com/.../2wBDAAQDAwMDAgQ…dcavddzPbL2w+b2S9n7jmgBx9LRbClzBW1rhSleVaaUuLt7OMVX2/Mvze3h7ZcfacgAB//2Q== 414 (Request-URI Too Large)
..was occuring because when mapping the tt-cimage JSDO element to the imgPart element, the src attribute was assigned the image bytestream
<img src=".../2wBDAAQDAwMDAgQ…dcavddzPbL2w+b2S9n7jmgBx9LRbClzBW1rhSleVaaUuLt7OMVX2/Mvze3h7ZcfacgAB//2Q==" .../>
The client would then process the src value as a target URL and run a GET operation on the server.
the correct value for src should be
"data:image/jpg;base64,.../2wBDAAQDAwMDAgQ…dcavddzPbL2w+b2S9n7jmgBx9LRbClzBW1rhSleVaaUuLt7OMVX2/Mvze3h7ZcfacgAB//2Q=="
In other words we need to prepend "data:image/jpg;base64," to the image bytestream.
This can be achieved on the client via JS. However in the case of datagrids, the value is assigned AFTER the JSDO read operation is complete for the grid item. This causes the src value to be assigned to the next image grid element.
Resolution:
Build the content type directly on the AppServer, ie prepend the "data:image/jpg;base64," to the CLOB temp table field that stores the image bytestream.
ASSIGN phDataset:GET-BUFFER-HANDLE(1)::tt-cimage = "data:image/jpg;base64," + BASE64-ENCODE(encdmptr)
Meyrick Flanegan |
Developer - Managed Services |
Email: mflanegan@elcb.co.za |
|
ELCB Information Services (Pty) Ltd |
Customer Service Email elcb@elcb.co.za · www.elcb.co.za |
E A S T L O N D O N Tel: +27(43) 704 0700 Fax: +27(43) 704 0701 |
J O H A N N E S B U R G Tel: +27(11) 879 6179 Fax: +27(11) 454 0384 |
P O R T E L I Z A B E T H Tel: +27(41) 373 0529 Fax: +27(86) 650 0135 |
Cause:
The following error...
he URL: GET appdesigner.rollbase.com/.../2wBDAAQDAwMDAgQ…dcavddzPbL2w+b2S9n7jmgBx9LRbClzBW1rhSleVaaUuLt7OMVX2/Mvze3h7ZcfacgAB//2Q== 414 (Request-URI Too Large)
..was occuring because when mapping the tt-cimage JSDO element to the imgPart element, the src attribute was assigned the image bytestream
<img src=".../2wBDAAQDAwMDAgQ…dcavddzPbL2w+b2S9n7jmgBx9LRbClzBW1rhSleVaaUuLt7OMVX2/Mvze3h7ZcfacgAB//2Q==" .../>
The client would then process the src value as a target URL and run a GET operation on the server.
the correct value for src should be
"date:image/jpg;base64,.../2wBDAAQDAwMDAgQ…dcavddzPbL2w+b2S9n7jmgBx9LRbClzBW1rhSleVaaUuLt7OMVX2/Mvze3h7ZcfacgAB//2Q=="
In other words we need to prepend "date:image/jpg;base64," before the image bytestream.
This can be achieved on the client via JS. However in the case of datagrids, the value is assigned AFTER the JSDO read operation is complete for the grid item. This causes the src value to be assigned to the next image grid element.
Resolution:
Build the content type directly on the AppServer, ie prepend the "date:image/jpg;base64," to the CLOB temp table field that stored the image bytestream.
ASSIGN phDataset:GET-BUFFER-HANDLE(1)::tt-cimage = "date:image/jpg;base64," + BASE64-ENCODE(encdmptr)
Flag this post as spam/abuse.