If I view the HTML generated by one of my Jasper reports in IE7 I see the following:
<BR /><BR />
<A name="JR_PAGE_ANCHOR_0_1">
<TABLE style="WIDTH: 1000px" cellSpacing="0" cellPadding="0" bgColor="#ffffff" border="0">
<-- table body omitted -->
</TABLE>
The two BR tags are added via the JRHtmlExporterParameter.HTML_HEADER parameter. After these tags and before the beginning of the report table that there's an unclosed anchor tag that is generated by Jasper reports. The fact that this tag is not correctly closed is messing up the formatting of my report because IE is hyperlinking the entire report TABLE. I'm not using this anchor tag, so if I could prevent Jasper from generating it, that would solve my problem.
Incidentally, this problem only occurs in IE, in Firefox everything works fine because the anchor tag is properly closed.
Thanks in advance,
Don
I took Phil's advice and dove into the Jasper source code. I've fixed the problem and submitted it to the project. Details of the cause and resolution are available here.
That's odd code, the <br /> tags are XHTML-style, while the unclosed a tags are good old HTML, like the upper case tag names. If you serve such page with plain HTML header/content-type, perhaps IE will be happy.
When you write that Firefox closes the tag, I suppose you mean it correctly doesn't extend the hyperlink span over block tags. Note that FF's view source can display closing tags that are not there when you save the page to disk!
Frankly, I don't know if you can get rid of these anchors with some config. If nobody comes with a real solution, maybe you can download Jasper's source code and search JR_PAGE_ANCHOR in it, looking if the code generating it is conditionally driven.
Or, if you can, you can apply post-processing of the generated code.
In excel export A1 cell transfor to JR_PAGE_ANCHOR_0_1.Some of tips are setting IS_ONE_PAGE_PER_SHEET property doing true, IS_DETECT_CELL_TYPE doing true but these are not working for me.
To avoid from this situation , configure your xlsx report configuration is worked for me (set ignore anchor is key point);
private final SimpleXlsxReportConfiguration xlsxReportConfiguration;
JRAbstractExporter exporter;
this.xlsxReportConfiguration = new SimpleXlsxReportConfiguration();
...
xlsxReportConfiguration.setIgnoreAnchors(true);
...
exporter = new JRXlsxExporter();
exporter.setConfiguration(xlsxReportConfiguration);
Related
In CrafterCMS, in a content type, I have a field type RTE,
If I use the source option and write following code:
<p><span>Test</span></p>
<div class="item_icon"><i class="fa fa-location-arrow"></i></div>
after update it and be back the code is
<p><span>Test</span></p>
(last part was deleted)
Is this the expected behavior? can it be changed by configuration?
The Crafter team is working on an upgrade of TinyMCE in Crafter CMS 3.0, see here: https://github.com/craftercms/craftercms/issues/793
If you need a fix right away, you can try to use " ", or use a tag with: "display:none" for example: <span style="display:none">Something</span>
I'm trying to create a form in orbeon forms with a repeated section, but Orbeon generates extra tags around my xml and then gets confused.
I've posted about this problem before:
Orbeon forms generates duplicate tags
The method described in the answer works great, and makes it possible to save the data to the database with data-format-version=edge. The view in the review page is also correct. I just can't seem to find out how to use this in the 'view' or 'edit' pages, I've tried passing the request parameter data-format-version=edge, both through the embedding api and in the URL of none-embedded orbeon but it does not seem to work.
Any ideas?
Edit:
When viewing a form ( http://localhost:8080/orbeon/fr/test/test/view/6fcd81f2612019deab5bb9f4031a92bc1b2b62ec) with the following xml in the database (xml column of orbeon_form_data):
<form>
<section-1>
<control-1/>
<mygrid>
<mygrid-iteration>
<control-5>vijf</control-5>
<control-6>zes</control-6>
</mygrid-iteration>
<mygrid-iteration>
<control-5/>
<control-6/>
</mygrid-iteration>
</mygrid>
</section-1>
The repeated sections are not shown correctly. When I edit the form (http://localhost:8080/orbeon/fr/test/test/edit/6fcd81f2612019deab5bb9f4031a92bc1b2b62ec). I can see in the form inspector that the xml has changed:
<form>
<section-1>
<control-1/>
<mygrid>
<mygrid-iteration>
<mygrid-iteration>
<control-5>vijf</control-5>
<control-6>zes</control-6>
</mygrid-iteration>
<mygrid-iteration>
<control-5/>
<control-6/>
</mygrid-iteration>
</mygrid-iteration>
</mygrid>
</section-1>
</form>
Notice the extra 'mygrid-iteration' tag. I've tried localhost:8080/orbeon/fr/test/test/edit/6fcd81f2612019deab5bb9f4031a92bc1b2b62ec?data-format-version=edge and many variations, but it doesn't seem to make any difference.
Here is my data when i view in SQL Developer tool
introduction
topic 1
topic end
and after i read it using a ResultSet,
ResultSet result = stmt.executeQuery();
result.getString("description")
and display in JSP page as
<bean:write name="data" property="description" />
but it will display like this
introduction topic 1 topic end
how can i keep the display same as in the SQL Developer?
Newlines aren't preserved in HTML. You need to either tell the browser it's preformatted:
<pre>
<bean:write name="data" property="description"/>
</pre>
Or replace the newlines with HTML line breaks. See this question for examples.
how can i keep the display same as in the SQL Developer?
The data presumably contains line breaks, e.g. "\r\n" or "\n". If you look at the source of your JSP, you'll probably see them there. However, HTML doesn't treat those as line breaks for display purposes - you'll need to either use the <br /> tag, or put each line in a separate paragraph, or something similar.
Basically, I don't think this is a database problem at all - I think it's an HTML problem. You can experiment with a static HTML file which you edit locally and display in your browser. Once you know the HTML you want to generate, then work on integrating it into your JSP.
Just wanted a clear answer for a direct question -- google results have been all over the place or don't address the combos you'll see below.
I'm generally a JSP newbie and have been screwing around with the following code.
<form:input id="theId" path="path.copied.directly.fromSomewhereElse"
cssClass="contentTextInput" cssStyle="width: 229px" />
When I put that into my JSP page and load my website, it works fine and looks as my cssClass defines it. Then I start messing with it because I want it to display a default value.
<form:input id="theId" path="path.copied.directly.fromSomewhereElse"
value="blah" cssClass="contentTextInput" cssStyle="width: 229px" />
Suddenly, HTTP 500, an org.apache.jasper.JasperException! So I decide to remove the path altogether, while leaving in the value. This is just step 1 in something I know works because of prior experience. The code is now:
<form:input id="theId" value="someClass.valueIWantAsDefault"
cssClass="contentTextInput" cssStyle="width: 229px" />
That actually throws an exception, too -- but then I remove the form prefix and it works-- mostly. You see, the cssClass's effects are now gone; it looks like a regular, unaffected input textbox. Here's the code so far.
<input id="theId" value="someClass.valueIWantAsDefault"
cssClass="contentTextInput" cssStyle="width: 229px" />
What exactly do these attributes (and prefix) do that makes this mix-and-match work?
I'm guessing you're dealing with a jsp page that relies on a JSP custom tag library that's part of the Spring Framework. Here are the docs for the <form:input> tag. value is not a valid attribute for this custom tag as you can see in the docs link I provided above. When you remove the form:, you're turning the tag into a plain old HTML <input> tag which is why your error is going away at that point. It's also why your css stops working. cssClass is not the correct attribute for the HTML <input> tag. It's simply class. They called it cssClass in the jsp custom tag lib most likely to avoid a lower level collision with the Object.getClass() method (long story, just take my word for it).
i am using diaply tags library for displaying my tables.But i cant use the <% %>
tagst there.If i try to us it it gives me error.but i can use tag there.
If i try to use followin code in my jsp it give an error sayin shoul hav a matcheing ending tag.
i have follown java code in jsp
List<Course> = (List<Course>)request.getAattribute("crc");
here Course is a class/bean.
can anyone suggest me such library that i can use with struts for auto paging,displaying list in tables,and with other features provided by display tag.I want to use struts and i want the view to look good and yet easy to devlop.that is i want to achieve high class userinterface with littel effortr toward displaying o/p / view.
can anyone provide the example of disploay tag with struts
You can use the name attribute of the table tag (normally like this:)
<display:table name="crc" ...>
</display:table>
To use the crc List as the basis of Javabeans to display.
See http://displaytag.sourceforge.net/1.2/displaytag/tagreference.html#display-el:table for more information about the table tag.