XSL:FO - Page break on two dynamic areas? - xslt

I'm using XSLFast and was wondering if the following is possible:
I have a page with static content and one area containing a table that outputs XML-data. The table is set to a specific height so that the page breaks when the height is reached and continues outputting one the next page.
Now,
I want to add another area containing such a table with the exact feature. Is that possible on one side?

I have never used XSLFast, but...
XSL 1.1 allows an fo:simple-page-master to have multiple fo:region-body. (See https://www.w3.org/TR/xsl/#fo_simple-page-master.) I do not know if XSLFast supports it, but with a formatter that supports multiple fo:region-body, you could put the red table and the blue table in separate fo:flow and direct them to the two different fo:region-body. The formatter would then make another page whenever either fo:region-body overflowed.

Related

Oracle/APEX Adding a row to an Interactive Grid with a Dynamic Action

Currently using APEX 5.1.4
My goal is to have the user press a button, which triggers a new row to be added to the bottom of the IG. This row would also need to have some default values pre-populated, such as the sequence column I have functioning as a primary key.
Doesn't matter how exactly, but I was considering doing it with Javascript. However, none of the methods I have found online, regarding adding a row with Javascript, work.
Also, I have the header bar of the IG removed, so finding the native Add Row Button probably is not an option.
--EDIT--
I found some Javascript that successfully allows me to add a row, however, it adds the row directly underneath the currently selected row. I do not see any methods to automatically select the last row of the IG, and it still doesn't solve that the row needs to have some dynamic values upon instantiation.
Here is the javascript:
This shows all of the available functions that can be invoked ( with .invoke() ):
apex.region("id-region-emp").widget().interactiveGrid("getActions").list()
These following lines both instantiate a new empty row on the IG:
("row-add-row" adds to top of IG, "insert-record" adds underneath currently selected row.)
apex.region("id-region-emp").widget().interactiveGrid("getActions").invoke("row-add-row")
apex.region("id-region-emp").widget().interactiveGrid("getActions").invoke("insert-record")
Better to use below code:
apex.region("detaildataset").widget().interactiveGrid("getActions").invoke("selection-add-row");
Before applying this code make interactiveGrid editable by clicking on attributes and also apply primary key on one column and then apply this code in Execute javascript code:
apex
.region("detaildataset")
.widget()
.interactiveGrid("getActions")
.invoke("selection-add-row");

How do I start a table at a certain point on the first page of my document and have it continue to the next if necessary? XSL-fo

I have a table I want to start at some point on this first page I'm making and I understand that if I put a block container with position absolute with properties top and left I will get the inside content to start from that point I need. But the content won't go to the next page and it will be cut off at the end of this current one.
I also know that if I put a block:container position as relative it will go on to the next page like I need it too. But it's starting point cannot be defined like it can with position: absolute. So I am stuck! Anyone know how to do this?
There's multiple alternatives:
Use space-before on the fo:table so that it's pushed down the page the required distance.
Make an fo:simple-page-master for the first page that has an fo:region-body (with the applicable region-name) that has a top margin that will put the top of the fo:region-body at the required distance. If your FO processor supports XSL 1.1, you can have multiple fo:region-body in an fo:simple-page-master, so if there's other stuff at fixed positions before the table on the first page, you have the option of putting them in separate flows.

Infragistics UltraGrid - How to use displayed values in group by headers when using an IEditorDataFilter?

I have a situation where I'm using the IEditorDataFilter interface within a custom UltraGrid editor control to automatically map values from a bound data source when they're displayed in the grid cells. In this case it's converting guid-based key values into user-friendly values, and it works well by displaying what I need in the cell, but retaining the GUID values as the 'value' behind the scenes.
My issue is what happens when I enable the built-in group by functionality and the user groups by a column using my editor. In that case the group by headers default to using the cell's value, which is the guid in my case, so I end up with headers like this:
Column A: 7F720CE8-123A-4A5D-95A7-6DC6EFFE5009 (10 items)
What I really want is the cell's display value to be used instead so it's something like this:
Column A: Item 1 (10 items)
What I've tried so far
Infragistics provides a couple mechanisms for modifying what's shown in group by rows:
GroupByRowDescriptionMask property of the grid (http://bit.ly/1g72t1b)
Manually set the row description via the InitializeGroupByRow event (http://bit.ly/1ix1CbK)
Option 1 doesn't appear to give me what I need because the cell's display value is not exposed in the set of tokens they provide. Option 2 looks promising but it's not clear to me how to get at the cell's display value. The event argument only appears to contain the cell's backing value, which in my case is the GUID.
Is there a proper approach for using the group by functionality when you're also using an IEditorDataFilter implementation to convert values?
This may be frowned upon, but I asked my question on the Infragistic forums as well, and a complete answer is available there (along with an example solution demonstrating the problem):
http://www.infragistics.com/community/forums/p/88541/439210.aspx
In short, I was applying my custom editors at the cell level, which made them unavailable when the rows were grouped together. A better approach would be to apply the editor at the column level, which would make the editor available at the time of grouping, and would provide the expected behavior.

How to prevent page break in QTextDocument block or frame?

Is it possible to prevent page break anywhere inside table in QTextDocument?
In my QTextDocument I have a plenty of larger images created from small image blocks. Adding large images seeems to be a waste of resources, so an obvious solution seems to be creating a table, putting small image in each cell.
The problem is that now these tables can have page breaks after each row. The only way to prevent it I know is to call setPageBreakPolicy() for each table/frame format, but this requires obligatory page break before each larger image. I would like to have these page breaks only if necessary (larger image does not fit).
Is it possible to do what I want?
For a QTextTable, you can prevent splitting it over multiple pages by setting the headerRowCount property of the QTextTableFormat equal to the number of rows in the table. This property sets the number of rows that are repeated when a page boundary is crossed, repeating the table header. If you set you entire table to be the header, the whole table is always placed on a single page.
One warning: do not do this with tables that potentially do not fit on a single page. Qt will mess things up in this case.
I hope Qt will add some extra flags to the pageBreakPolicy property in the future, so that we can create unbreakable tables/frames in a clean way.

Long check list ui pattern for web

I have a data entry page where the user is required so make some selections from a list. Currently it is just a check list with about 10 items they can tick, but is will expand soon to about 230. What is a good UI paradigm for dealing with a large number of selectable items? I am considering dual list type control.
Dual list, BUT, for a large # of non-groupable elements:
MUST have ability to select multiple elements (Duh!)
SHOULD have ability to select ALL elements with a click
SHOULD have ability to search (in either list), and select all matching elements
Also, if the lists are REALLY big (1k+), you may run into trouble with slow rendering.
If so, you can also "paginate" the list - e.g. display only first N elements, allow selection from those, and then ability to shift the "frame" to next N elements.
(all the above, BTW, are real attributes of a solution we implemented in an enterprise web app needing a selection list with 30k possible values which could not be grouped).
Are the items grouped in any way? If so, a collapsible tree-type navigation might be useful.
It really depends on the situation and how much space you have but in most cases I prefer the dual list control, aka list builder, you where thinking about.
Here's a nice link for inspiration (requires silverlight): http://good.ly/qh7aeg8
Here's an accessible way using only HTML and Javascript:
Use the HTML fieldset tag to chunk them into logical groups;
use (say) JQuery to show/hide each group;
add navigation at the top to jump to each group.
If you hide all the groups initially, users can click the link for the groups they want to complete. Further, if you add a rollover (could just be a tooltip title attribute on the links for accessibility) with a description of each group, users will have a 'preview' before visiting it.
Finally, if the labels are short enough, give the fieldsets a width and make them into columns using CSS float or absolute positioning.
Try to stick to valid (X)HTML, CSS and Javascript - there are plenty of precedents for this.