Computing repeatControls property of a repeat generate designer error - eclipse

I am trying to compute the repeatControls property of a repeat but get an error
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:repeat id="repeat1" rows="30" value="#{javascript:10}">
<xp:this.repeatControls><![CDATA[${javascript:"true"}]]> </xp:this.repeatControls>
</xp:repeat>
</xp:view>
Here is the error
Description Resource Path Location Type
Could not generate a .java file for the page /test.xsp: Could not find the runtime class for the tag xp:repeat, due to a problem invoking com.ibm.xsp.component.xp.XspDataIterator.getJavaClass(class com.ibm.xsp.page.parse.types.FacesInstance). test.xsp test.nsf/XPages line 1 com.ibm.designer.domino.ide.resources.designerproblem
Is this some kind of bug in DDE or am doing it wrong?
I have tried putting the "true" without quotes as well
I am using notes 9 beta 1

The Repeat (xp:repeat) control specifies the following tooltip for the repeatControls property.
Repeat Controls (boolean:repeatControls)
Specifies if the controls should be created multiple times or the single set of controls should be iterated over multiple times.
The repeatControls property accepts boolean values; specifically either "true" or "false". In Domino Designer from the All Properties View despite the presence of the blue diamond (indicating it can be computed), this property should not be computed.
At design time, the repeatControls property value is used to inform how the compiled XPage is generated hence invalid values prevent this from succeeding; this is the error being reported by Domino Designer and has been logged with the team with reference "DEGN95SMPT".

Related

Passing an external parameter from a jsp to an xsl (Eclipse)

Setting the scene:
I'm working on a webapp in Eclipse, with a bunch of JSPs and XSLs. And I need to hide some features depending on some users' attributes. This is the third job in the series.
For the previous 2 jobs, I was able to achieve my goals because either the required changes were on JSPs (straightforward) or on XSLs for which the objects existed.
I.e. We have the following sequence:
- searchForm.jsp (a form with some criteria you set up and submit),
- resultsList.jsp (a list of search results - clicking on any result brings the full record for the result),
- displayItem.jsp (the full record),
- record.xsl (the xsl that transforms displayItem.jsp).
Thus for the 2 previous jobs, the features I needed to hide were either on these JSPs themselves or on the xsl, in which case the (relevant) JSPs had:
<c:set target="${item}" property="xsltParameter" value="xxxx=Y"/>
where 'item' is an existing object and 'xxxx' a (usually but not necessarily global) parameter defined in the xsl.
For example:
<xsl:param name="xxxx">N</xsl:param>
Thus, if my changes were on the xsl, I would reuse the 'item' object to pass on my parameter and process it in the XSL(s).
E.g. I'd put on the jsp:
<c:set target="${item}" property="xsltParameter" value="abcd=AAA"/>
and add to the xsl:
<xsl:param name="abcd"></xsl:param>
This way I was able to pass my own parameters to the xsl.
For this last job however:
- The XSL (filters.xsl) is quite short and self-contained.
- It appears on the same page as resultsList.jsp, (therefore after searchForm.jsp) but has no connection I can see with it.
- On the JSPs, there's NO (appropriate) target object I can (re)use.
- I've already tried on a/the JSP the way I know to create variables/parameters:
<c:set var="xyz" value="${abcd}"/>
but this doesn't seem to work (when I create a corresponding xyz global parameter in filters.xsl).
My issues are:
- I'm struggling to create an object (if that's what I need to do).
- I may need to do something else, but I'm not sure what (hence my post).
Plan B
In desperation, with plan B I'm creating as a proof-of-concept, a static xml file (param-val.xml), in the same location as the XSLs, in which I put my external parameter/criterion:
<paramroot>
<paramval>abcd</paramval>
</paramroot>
What I'd like to do is using the document() function, extract this parameter and use it either within filters.xsl if possible or otherwise a go-between prefilters.xsl that filters.xsl would import. And this is where I'd need some help/tips/etc.
<xsl:param name="theXML" select="'prefilters.xml'" />
<xsl:variable name="myDoc" select="document($theXML)" />
I've been reading stuff on the web and tested a few things, but I'm stuck (rusty on some topics and learning others). How can I grab and use the 'abcd' in either filters or prefilters?
Any suggestions on how best to handle this?
Sorry for the lenghty post. Any help would be greatly appreciated.
Many thanks and regards.

Set xlsx to recalculate formulae on open

I am generating xlsx files and would like to not have to compute the values of all formulae during this process.
That is, I would like to set <v> to 0 (or omit it) for cells with an <f>, and have Excel fill in the values when it is opened.
One suggestion was to have a macro run Calculate on startup, but have been unable to find a complete guide on how to do this with signed macros to avoid prompting the user. A flag you can set somewhere within the xlsx would be far better.
Edit: I'm not looking for answers that involve using Office programs to make changes. I am looking for file format details.
The Python module XlsxWriter sets the formula <v> value to 0 (unless the actual value is known) and the <calcPr> fullCalcOnLoad attribute to true in the xl/workbook.xml file:
<calcPr fullCalcOnLoad="1"/>
This works for all Excel and OpenOffice, LibreOffice, Google Docs and Gnumeric versions that I have tested.
The place it won't work is for non-spreadsheet applications that cannot re-calculate the formula value such as file viewers.
If calculation mode is set to automatic, Excel always (re)calculates workbooks on open.
So, just generate your files with calculation mode set to "Automatic".
In xl/workbook.xml, add following node to workbook node:
<calcPr calcMode="auto"/>
Also check Description of how Excel determines the current mode of calculation.
You can use macros as suggested, however you will create a less secure and less compatible workbook without avoiding user interaction to force calculation.
If you opt by using VBA, you may Application.Calculate in Workbook_Open event.
In your XML contents, simply omit the <v> entity in each cell that have a formula, this will force Ms Excel to actualize the formula whatever the Excel options are.
Instead of:
<c r="B2" s="1">
<f>SUM(A1:C1)</f>
<v>6</v>
</c>
Have:
<c r="B2" s="1">
<f>SUM(A1:C1)</f>
</c>
If you have to actualize formula in an already given XML contents, then you can code easily a small parser that search for each <c> entities. If the <c> entity has a <f> entity, then delete its <v> entity.
Faced the same problem when exporting xlsx'es via openxml (with fastest SAX + template file approach w/o zip stream rewinds).
Despite Calculation option=Automatic, no recalculation on opening the file.
Furthermore no recalculation via Calculate Now and Calculate Sheet buttons.
Only upon selecting the cell and pressing enter ;(
Original formula: SUM(A3:A999)
Solution:
Create an internal hidden sheet
Place end row number (999 in my case) into any cell in hidden sheet (P1 in my case)
Reference row number in the cell via INDIRECT operator
Final formula: SUM(A3:INDIRECT("A"&Internal!P1))
Please refer to the attached gifs
before.gif
after.gif
P.S.
Theoretically, in P1 you can implement dynamic row number calculation via smth like =LOOKUP(2;1/(Sheet1!A:A<>"");ROW(Sheet1!A:A)), but my customers were satisfied with hardcoded row number solution

Single value input control not visible on JR Server

I have two parameters in report:
week ---> has isForPrompting="true" property
year ---> has isForPrompting="true" property
But when I add a single value input control and run the same report on JasperReports Server, only a pop up window is opening up and not the the single value input control.
Also If I add a single value input control to my other reports, its showing up when I run the reports on JR Server.
I really don't understand why the single value input control is not showing up for the current report when everything is running well on iReport designer?
Most common problem: Your input control doesn't match exactly. The input control ID has to match the parameter. Remember that it's case sensitive.

Cascading input control is empty while accessing a Jasper Report

I call a jasper report through an independent URL through which I pass one of the input controls needed to run the report.
E.g. http:// localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&reportUnit=xyz&ParentFolderUri=abcd&j_username=xyz&j_password=xyz&parameter1=value1& . . .
As you can see in the above independent URL, I pass the JasperServer username and password, reportUnit name and location and other mandatory parameters, along with the report input parameter, i.e., "parameter1" which can have a value like "value1".
I used a mandatory, read-only and visible input control for this input value. Its value would come from the independent URL, showed in the box but was read-only and hence could not be changed.
The report was working absolutely fine upto this point.
But the tragedy began when my client rejected this idea. He wanted a completely invisible input control to my report and the input value would be passed through the independent URL, just like illustrated above.
And then my client asked me to refer to this and made me work on cascading input controls.
Recently I added a cascading input control to this report. The input control type is a single select query, which utilizes two parameters that I pass to the report through the independent URL.
Now when the Jasper server responds to the independent URL with the input parameters, all the other static parameters work properly, except for the cascaded one.
When I click the select box of the cascaded input, I can see the desired options for a second, and then, it just goes empty while I'm viewing the select list.
But when I make the "Parameter1" input control visible, the cascading input control works!
And then I turn in invisible, the cascading input control turns into a beast that does things by itself and not listen to his master.
I am not able to understand why this is happening. Could anybody please provide me a solution to this?
I have found a temporary solution for this.
I made the "Parameter1" input control visible and read only.
Next, I used a stylesheet and defined a style rule that would affect that input control's display on the web page, making "display: none".
I passed the name of the stylesheet through the URL. So this stylesheet is used for the report.
Now, the "Parameter1" input control is invisible to the end user and my report still runs with no one knowing it's just a fix.

How to use a panel created inside a .fig file by other different .fig file?

I have two distinct files, myguide.fig (and its corresponding mygui.m) which contains the definition of an uitabgroup and the file caract.fig (and its corresponding caract.m) which contains a panel. I call the file caract.m from the file myguide.m and obtain the handle of the panel. Then I change the Parent property of the panel to assign it to one of the tabs of the uitabgroup. I only achieve that this works (setting the Visibility Property of caract.fig off) the first time I run myguide. If I try to run it a second time, I get the error message “Invalid handle object” for the handle of the panel returned. I do not understand what is happening.
Explained here:
http://undocumentedmatlab.com/blog/tab-panels-uitab-and-relatives/
Related articles:
http://undocumentedmatlab.com/blog/uitab-customizations/
http://undocumentedmatlab.com/blog/uitab-colors-icons-images/