This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 236636 - Display of Record Details Fails in Iframe when length too large
Summary: Display of Record Details Fails in Iframe when length too large
Status: VERIFIED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Cosmos (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: John Todd CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-11 10:17 EDT by Martin D Simmonds CLA
Modified: 2012-01-03 13:48 EST (History)
3 users (show)

See Also:


Attachments
proposed look & feel of new records display frame (166.58 KB, image/jpeg)
2008-07-08 14:39 EDT, John Todd CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin D Simmonds CLA 2008-06-11 10:17:51 EDT
When the record details are displayed from the Graph Response viewer an Iframe displays the XML.  Iframe only uses the GET function. There is a limit on the number of characters you can pass.  If the limit is reached, it produces a length error message.
Comment 1 Sheldon Lee-Loy CLA 2008-06-13 08:31:40 EDT
Deferring to i12 since these bugs are not critical or blocking.
Comment 2 Sheldon Lee-Loy CLA 2008-06-23 11:13:36 EDT
You can use the following api to format a XML string.

this.UIContext.xmlFormatter.format(xmlString)

Comment 3 John Todd CLA 2008-07-08 12:27:10 EDT
Is there a test case for this?

- JT
Comment 4 Sheldon Lee-Loy CLA 2008-07-08 12:46:35 EDT
(In reply to comment #3)
> Is there a test case for this?
> 
> - JT
> 

You can try and edit the Example MDR xml files.  Modify the xml files to add more content.
Comment 5 John Todd CLA 2008-07-08 13:00:58 EDT
Approaching 8K, I get 'Connect was reset' in the IFrame and no errors in either firebug or the java console.

> this.UIContext.xmlFormatter.format(xmlString)
and what does this do exactly? i.e. how does it apply to this specific situation?

- JT
Comment 6 Sheldon Lee-Loy CLA 2008-07-08 13:16:24 EDT
(In reply to comment #5)
this.UIContext.xmlFormatter.format(xmlString)

Takes in a xml string and formats it.   It indents the string and color codes element tag name and attributes.  It also color codes comments.

We should not use iframe because of the limitation suggested by this bug.  Instead we should use a div element and set the contents of the div element to the formatted string.  Maybe you can change the template file by removing the iframe and replacing it with:

<div>{$xmlFormatString}</div>

In the dojo class you can define the xmlFormatString as

this.xmlFormatString = this.UIContext.xmlFormatter.format(xmlString);
Comment 7 John Todd CLA 2008-07-08 14:39:13 EDT
Created attachment 106868 [details]
proposed look & feel of new records display frame

I tried xmlFormatter and have attached a screenshot of what it might look like.

- JT
Comment 8 John Todd CLA 2008-07-08 15:24:45 EDT
Since we are displaying the xml details in a separate frame, can we stop also displaying them in the details pane?

Reasoning is that xmlFormatter requires raw xml and the details pane can't display  raw XML as text, so if we wanted to support both, we need the xml in both formats.
easier to just have one I think.

- JT
Comment 9 Sheldon Lee-Loy CLA 2008-07-08 15:33:46 EDT
(In reply to comment #8)
> Since we are displaying the xml details in a separate frame, can we stop also
> displaying them in the details pane?
> 
> Reasoning is that xmlFormatter requires raw xml and the details pane can't
> display  raw XML as text, so if we wanted to support both, we need the xml in
> both formats.
> easier to just have one I think.
> 
> - JT
> 

Yes I agree.  We don't need to duplicate the xml in the details pane.  This will clean up the details pane view as well.
Comment 10 John Todd CLA 2008-07-08 16:48:40 EDT
These changes are checked in.

- JT
Comment 11 John Todd CLA 2008-07-09 08:40:26 EDT
The record detail now only displays in the pop up window.

- JT
Comment 12 Sheldon Lee-Loy CLA 2008-08-28 12:54:22 EDT
Verified with build (COSMOS-1.0.0-200808271150)