Making the objectheader sticky and rest of the page scrollable - html

I have a page with an ObjectHeader and 4 panels. All the panels have a table with a horizontal scrollbar. I want to freeze the object header at the top whenever the page is scrolled. I tried the sticky property but it is not applicable for ObjectHeader but it is applicable to IconTab Bar. But in my case, I can't use IconTab Bar. I also tried some CSS but failed Please help. Below is my XML code.
XML Code :
<mvc:View xmlns:html="http://www.w3.org/1999/xhtml" xmlns:mvc="sap.ui.core.mvc" xmlns:t="sap.ui.table" xmlns="sap.m"
controllerName="sap.hmel.pymt.adv.controller.PaymentAdviceApp" displayBlock="true">
<App>
<pages>
<Page showHeader="false" showNavButton="true" navButtonPress="onCallPayAdvice">
<ObjectHeader title="" fullScreenOptimized="true" >
<attributes>
<ObjectAttribute title="Total Credit Values" text="+ ₹ {credModel>/header/TotalCreditItem}"/>
<ObjectAttribute title="Total Debit Values" text="- ₹ {credModel>/header/TotalDebitItem}"/>
<ObjectAttribute title="Balance" text=" ₹ {credModel>/header/TotalBalance}"/>
</attributes>
<statuses>
<ObjectStatus title="Selected Credit Values" text="+ ₹ {detail>/crdTotal}" state="{detail>/utrState}"/>
<ObjectStatus title="Selected Debit Values" text="- ₹ {detail>/invTotal}" state="{detail>/totalState}"/>
<ObjectStatus title="Balance" text=" ₹ {detail>/balance} {detail>/Waers}" state="{detail>/balState}"/>
</statuses>
</ObjectHeader>
<Panel expandable="true" headerText="Payment Document ( Subtotal : + ₹ {credModel>/header/PaymentSum})" class="sapUiMediumMarginBegin"
id="paymentPanel">
<ScrollContainer vertical="true">
<Table class="sapUiLargeMarginBottom" items="{credModel>/Payment}" growingThreshold="5" fixedLayout="false" id="paymentDocument"
growing="true" growingScrollToLoad="true" inset="false" mode="MultiSelect" selectionChange="onRowSelectionChangePayment">
<columns>
</columns>
<items>
<ColumnListItem id="columnTempId">
<cells>
</cells>
</ColumnListItem>
</items>
</Table>
</ScrollContainer>
</Panel>
<Panel expandable="true" headerText="Credit Note (Subtotal : + ₹ {credModel>/header/CreditSum})" class="sapUiMediumMarginBegin">
<ScrollContainer vertical="true">
<Table sticky="HeaderToolbar,ColumnHeaders" class="sapUiLargeMarginBottom" items="{credModel>/Credit}" id="creditNote" growing="true"
growingScrollToLoad="true" growingThreshold="5" mode="MultiSelect" selectionChange="onRowSelectionChangeCredit">
<columns>
</columns>
<items>
<ColumnListItem id="column">
<cells>
</cells>
</ColumnListItem>
</items>
</Table>
</ScrollContainer>
</Panel>
<Panel expandable="true" headerText="Invoice (Subtotal : - ₹ {credModel>/header/InvoiceSum})" class="sapUiMediumMarginBegin">
<ScrollContainer vertical="true">
<Table class="sapUiLargeMarginBottom" items="{credModel>/Invoice}" fixedLayout="false" id="invoice" growingThreshold="5" growing="true"
growingScrollToLoad="true" inset="false" mode="MultiSelect" selectionChange="onRowSelectionChange">
<columns>
</columns>
<items>
<ColumnListItem id="columnTemp">
<cells>
</cells>
</ColumnListItem>
</items>
</Table>
</ScrollContainer>
</Panel>
<Panel expandable="true" headerText="Debit Note (Subtotal : - ₹ {credModel>/header/DebitSum})" class="sapUiMediumMarginBegin">
<ScrollContainer vertical="true">
<Table class="sapUiLargeMarginBottom" items="{credModel>/Debit}" growingThreshold="5" fixedLayout="false" id="debitNote" growing="true"
growingScrollToLoad="true" inset="false" mode="MultiSelect" selectionChange="onRowSelectionChangeDebit">
<columns>
</columns>
<items>
<ColumnListItem id="columnId">
<cells>
</cells>
</ColumnListItem>
</items>
</Table>
</ScrollContainer>
</Panel>
<footer>
<Bar>
<contentRight>
<Button text="Create" type="Accept" id="btnCreateId" press="onCreate"/>
<Button text="Cancel" type="Reject" icon="sap-icon://decline" press="onCancel"/></contentRight>
</Bar>
</footer>
</Page>
</pages>
</App>

Related

Telerik Freezing header columns

From few days I have been trying to use freezing columns headers. I have followed knowledgebase of telerik reporting services. But still unable to get solutions.
<Table DataSourceName="sqlDataSource1" Width="3.531in" Height="0.48in" Left="0.4in" Top="0.4in" FreezeRowHeaders="False" FreezeColumnHeaders="True" Name="table1">
<Body>
<Cells>
<TableCell RowIndex="0" ColumnIndex="0" RowSpan="1" ColumnSpan="1">
<ReportItem>
<TextBox Width="1.177in" Height="0.24in" Left="1.8in" Top="0.2in" Value="= Fields.FirstName" Name="textBox7" StyleName="" />
</ReportItem>
</TableCell>
<TableCell RowIndex="0" ColumnIndex="1" RowSpan="1" ColumnSpan="1">
<ReportItem>
<TextBox Width="1.177in" Height="0.24in" Left="1.8in" Top="0.2in" Value="= Fields.InsertDate" Name="textBox2" StyleName="" />
</ReportItem>
</TableCell>
<TableCell RowIndex="0" ColumnIndex="2" RowSpan="1" ColumnSpan="1">
<ReportItem>
<TextBox Width="1.177in" Height="0.24in" Left="1.8in" Top="0.2in" Value="= Fields.LastName" Name="textBox4" StyleName="" />
</ReportItem>
</TableCell>
</Cells>
<Columns>
<Column Width="1.177in" />
<Column Width="1.177in" />
<Column Width="1.177in" />
</Columns>
<Rows>
<Row Height="0.24in" />
</Rows>
</Body>
<Corner />
<RowGroups>
<TableGroup Name="detailTableGroup">
<Groupings>
<Grouping />
</Groupings>
</TableGroup>
</RowGroups>
<ColumnGroups>
<TableGroup Name="tableGroup">
<ReportItem>
<TextBox Width="1.177in" Height="0.24in" Left="0in" Top="0in" Value="First Name" Name="textBox1" />
</ReportItem>
</TableGroup>
<TableGroup Name="tableGroup1">
<ReportItem>
<TextBox Width="1.177in" Height="0.24in" Left="0in" Top="0in" Value="Insert Date" Name="textBox3" />
</ReportItem>
</TableGroup>
<TableGroup Name="tableGroup2">
<ReportItem>
<TextBox Width="1.177in" Height="0.24in" Left="0in" Top="0in" Value="Last Name" Name="textBox5" />
</ReportItem>
</TableGroup>
</ColumnGroups>
</Table>
I am using above xml code for telerik reporting.
Thanks in advance
The configuration seems fine at first glance. Have you checked that the feature is supported (and makes sense) only for displaying in viewers in interactive mode?

SAPUI5 Responsive table multi select set selected records

I have a SAPUI5 responsive table with multi-select mode. And I need to show the selected records when loading data to the table. Couldn't find a way to set selected records in the responsive table.
<Table id="idProductsTable"
inset="false"
mode="MultiSelect"
alternateRowColors="true"
items="{
path: '/ProductCollection',
sorter: {
path: 'Name'
}
}">
<headerToolbar>
<OverflowToolbar>
<Title text="Products" level="H2"/>
<ToolbarSpacer/>
<Label text="Multi selection modes" labelFor="idComboBoxSuccess"></Label>
<ComboBox id="idComboBoxSuccess" selectedKey="Default" selectionChange=".onSelectionChange">
<core:Item text="Default" key="Default"></core:Item>
<core:Item text="ClearAll" key="ClearAll"></core:Item>
</ComboBox>
</OverflowToolbar>
</headerToolbar>
<columns>
<Column width="12em">
<Text text="Product" />
</Column>
<Column minScreenWidth="Tablet" demandPopin="true">
<Text text="Supplier" />
</Column>
<Column minScreenWidth="Tablet" demandPopin="true" hAlign="End">
<Text text="Dimensions" />
</Column>
</columns>
<items>
<ColumnListItem>
<cells>
<ObjectIdentifier
title="{Name}"
text="{ProductId}"/>
<Text
text="{SupplierName}" />
<Text
text="{Width} x {Depth} x {Height} {DimUnit}" />
</cells>
</ColumnListItem>
</items>
</Table>
Is there a way to set the selected rows in the table and display selected records.
You can use selected property in ColumnListItem.
<ColumnListItem selected="{YourSelectedBoolean}">
<cells>
<ObjectIdentifier title="{Name}" text="{ProductId}"/>
<Text text="{SupplierName}" />
<Text text="{Width} x {Depth} x {Height} {DimUnit}" />
</cells>
</ColumnListItem>
Fiddle

Images aren't showing in gridtable

I can't see the image files I included in my asp.net page. The images are put into the linked access database table first, and I also included the images into the same folder as my web application.
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" AutoGenerateSelectButton="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnPageIndexChanging="GridView1_PageIndexChanging" CellPadding="5" Font-Names="Arial">
<Columns>
<asp:BoundField DataField="ProductID" HeaderText="Product ID" />
<asp:BoundField DataField="ProductName" HeaderText="Product Name" />
<asp:BoundField DataField="ProductPrice" HeaderText="Product Price" />
<asp:BoundField DataField="QtyInStock" HeaderText="Quantity in stock" />
<asp:ImageField DataImageUrlField="ProductImage" HeaderText="Image">
<ControlStyle BorderStyle="Groove" Height="260px" Width="300px" />
</asp:ImageField>
</Columns>
<EmptyDataRowStyle BackColor="White" />
<FooterStyle BackColor="White" />
<HeaderStyle BackColor="White" />
<PagerStyle BackColor="White" />
<RowStyle BackColor="White" />
</asp:GridView>
The product image field is where the images should be.

Sapui5 column adjusting

this is how my view file looks like:
<mvc:View
controllerName="abc"
xmlns:html="http://www.w3.org/1999/xhtml" xmlns:form="sap.ui.layout.form"
xmlns:l="sap.ui.layout" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
xmlns:core="sap.ui.core">
<App>
<pages>
<Page title="APP_TITLE" showHeader="false">
<content>
<Table id="configTable" mode="None" items="{ path : '/'}">
<columns>
<Column id="bname">
<Text text="BOOKING_NAME"></Text>
</Column>
<Column> <Button icon="sap-icon://message-information" text="Info" type="Emphasized" press="handleMessagePopoverPress"/>
</Column>
<Column hAlign="Right" id="addItem" width="2em"></Column>
</columns>
</Table>
</content>
<footer>
<Toolbar class="sapContrast sapContrastPlus" width="100%">
</Toolbar>
</footer>
</Page>
</pages>
</App>
which will produce the following UI:
as you can see that button just destroys the whole column, there is a lot of space under BOOKING_NAME how can I adjust the size of the button to the column so it doesn't scratch everything? if that's not possible how can I align the text to the center of the column, I tried vAlign="Middle" but nothing changed..... I don't find anything in the sapui5 doc
actually just solved this by adding another column in that layout and instead of using an button and icon I just implemented the icon
<mvc:View
controllerName="local.controller"
xmlns:html="http://www.w3.org/1999/xhtml" xmlns:form="sap.ui.layout.form"
xmlns:l="sap.ui.layout" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
xmlns:c="sap.ui.core">
and between the colum the following:
<c:Icon src="sap-icon://message-information" size="1em" id="infoDefaultCurrency" press="onInfoButtonPressed" />
Simple workaround will be using css.You can use sapui5 predefined margin class for this.
jQuery.sap.require("sap.m.MessageToast");
sap.ui.controller("local.controller", {
doSomething: function() {
sap.m.MessageToast.show("Hello UI5 World");
}
});
var oModel = new sap.ui.model.json.JSONModel({
people: [{
name: 'Joseph',
number: 1.618
},
{
name: 'DJ',
number: 0
}
]
});
var oView = sap.ui.xmlview({
viewContent: jQuery('#view1').html()
});
oView.setModel(oModel);
oView.placeAt('content');
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8">
<title>MVC with XmlView</title>
<script src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-libs="sap.m"></script>
<script id="view1" type="sapui5/xmlview">
<mvc:View controllerName="local.controller" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m">
<App>
<pages>
<Page title="APP_TITLE" showHeader="false">
<content>
<Table id="configTable" mode="None" items="/people">
<columns>
<Column id="bname">
<Text text="BOOKING_NAME" class="sapUiSmallMarginTop"></Text>
</Column>
<Column>
<Button icon="sap-icon://message-information" text="Info" type="Emphasized" press="handleMessagePopoverPress" />
</Column>
<Column hAlign="Right" id="addItem" width="2em"></Column>
</columns>
</Table>
</content>
<footer>
<Toolbar class="sapContrast sapContrastPlus" width="100%">
</Toolbar>
</footer>
</Page>
</pages>
</App>
</mvc:View>
</script>
</head>
<body class='sapUiBody'>
<div id='content'></div>
</body>
</html>
I have used sapUiSmallMarginTop in the sample

Error loading fxml javafx8

I am trying to load the following fxml file. I simply get an exception thrown pointing to line 19. I can load this in scenebuilder just fine, via Show preview in window menu item. At first I thought one couldn't have rectangles be children of a stackpane but that is the very example Oracle uses for javadoc and StackPane. Is there a known best practice to debug failures to load and fxml file? It flags the first child under reticlefilter stackpane.
The two children in question are the light blue rectangle with the yellow reticle.
<?xml version="1.0" encoding="UTF-8"?>
<?import org.cornova.javafx.*?>
<?import javafx.scene.shape.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>
<VBox fx:id="sliceRealEstate" alignment="TOP_CENTER" onMouseDragged="#onMouseDragged" onMousePressed="#onMousePressed" onScroll="#onScroll" onScrollStarted="#onScrollStarted" pickOnBounds="false" stylesheets="#org/cornova/javafx/xpssdr.css" xmlns="http://javafx.com/javafx/8.0.40" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.cornova.xpssdr.controllers.SliceController">
<children>
<HBox fx:id="flagPole" pickOnBounds="false">
<children>
<Pane fx:id="flagPane" pickOnBounds="false" stylesheets="#org/cornova/javafx/xpssdr.css">
<children>
<StackPane fx:id="reticleFilter" alignment="BOTTOM_LEFT" pickOnBounds="false">
<children>
***<Rectangle fx:id="filter" fill="#3670ad" height="40.0" opacity="0.38" width="30.0" StackPane.alignment="CENTER" />***
<Rectangle fx:id="reticle" fill="#e8e82f" height="40.0" width="2.0" StackPane.alignment="CENTER" />
</children>
</StackPane>
<HBox fx:id="flag">
<children>
<VBox alignment="TOP_CENTER" spacing="10.0" style="-fx-background-color: black;" HBox.hgrow="NEVER">
<children>
<Button fx:id="close" mnemonicParsing="false" onAction="#close" text="cls">
<font>
<Font size="10.0" />
</font>
</Button>
<Button fx:id="lock" layoutX="10.0" layoutY="10.0" mnemonicParsing="false" onAction="#lock" text="lck">
<font>
<Font size="10.0" />
</font>
</Button>
<Button fx:id="record" layoutX="10.0" layoutY="29.0" mnemonicParsing="false" onAction="#record" text="rec">
<font>
<Font size="10.0" />
</font>
</Button>
<Button fx:id="play" layoutX="10.0" layoutY="48.0" mnemonicParsing="false" onAction="#play" text="play">
<font>
<Font size="10.0" />
</font>
</Button>
</children>
</VBox>
<VBox alignment="CENTER" style="-fx-background-color: black;" HBox.hgrow="NEVER">
<children>
<HBox alignment="CENTER" VBox.vgrow="ALWAYS">
<children>
<VBox alignment="CENTER" HBox.hgrow="NEVER">
<children>
<HBox alignment="CENTER" VBox.vgrow="NEVER">
<children>
<VBox alignment="TOP_CENTER">
<children>
<ComboBox fx:id="rcvsrc" prefWidth="65.0" />
<ComboBox fx:id="txsrc" prefWidth="65.0" />
</children>
</VBox>
<Label fx:id="filterwidth" text="200" HBox.hgrow="NEVER" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" fillHeight="false" VBox.vgrow="NEVER">
<children>
<Label fx:id="nbon" text="nb" />
<Label fx:id="apfon" text="nr" />
<Label fx:id="nron" text="apf" />
<Label fx:id="qskon" text="qsk" />
</children>
</HBox>
</children>
</VBox>
<HBox HBox.hgrow="ALWAYS">
<children>
<Label fx:id="txindicator" alignment="CENTER" contentDisplay="CENTER" graphicTextGap="0.0" styleClass="largeindicators" text="TX" textAlignment="CENTER" textFill="RED">
<font>
<Font size="28.0" />
</font>
</Label>
<Label fx:id="sliceind" alignment="CENTER" contentDisplay="CENTER" styleClass="largeindicators" text="A" textAlignment="CENTER">
<font>
<Font size="27.0" />
</font>
</Label>
</children>
</HBox>
</children>
</HBox>
<VBox VBox.vgrow="NEVER">
<children>
<HBox alignment="CENTER" VBox.vgrow="NEVER">
<children>
<Label fx:id="signalLevel" alignment="CENTER" styleClass="mediumindicators" text="S9" HBox.hgrow="NEVER">
<opaqueInsets>
<Insets />
</opaqueInsets>
</Label>
<Label fx:id="signalplus" text="+20" />
<TextField fx:id="frequency" maxHeight="-Infinity" maxWidth="161.0" onAction="#onFrequencyChange" onMouseEntered="#scale" prefHeight="40.0" prefWidth="144.0" promptText="144.123456" styleClass="mediumindicators" />
</children>
</HBox>
</children>
</VBox>
<HBox VBox.vgrow="NEVER">
<children>
<ButtonBar buttonMinWidth="30.0" HBox.hgrow="NEVER">
<buttons>
<Button fx:id="spkr" mnemonicParsing="false" onAction="#displaySpkrSubmenu" text="spkr">
<font>
<Font size="10.0" />
</font>
</Button>
<Button fx:id="dsp" mnemonicParsing="false" onAction="#displayDSPSubmenu" text="dsp">
<font>
<Font size="10.0" />
</font>
</Button>
<Button fx:id="mode" layoutX="125.0" layoutY="17.0" mnemonicParsing="false" onAction="#displayModeSubmenu" text="rtty">
<font>
<Font size="10.0" />
</font>
</Button>
<Button layoutX="220.0" layoutY="17.0" mnemonicParsing="false" onAction="#displayXRITSubmenu" text="x/rit" fx:id="xrit">
<font>
<Font size="10.0" />
</font>
</Button>
<Button fx:id="dax" layoutX="315.0" layoutY="17.0" mnemonicParsing="false" onAction="#displayDAXSubmenu" text="dax">
<font>
<Font size="10.0" />
</font>
</Button>
</buttons>
<padding>
<Insets bottom="5.0" right="5.0" top="5.0" />
</padding>
</ButtonBar>
</children>
</HBox>
</children>
</VBox>
</children>
</HBox>
</children>
</Pane>
</children>
</HBox>
</children>
</VBox>
Additional information:
Exact text from exception
11:11:24.191 [nioEventLoopGroup-2-3] DEBUG org.cornova.xpssdr.views.SliceView - javafx.fxml.LoadException:
file:/home/walt/NetBeansProjects/XPSSDR/dist/run293699722/XPSSDR.jar!/SliceFlag.fxml:19
Code that does the load.
public VBox create() throws IOException {
VBox pane = null;
try {
pane = sliceLoader.load();
controller = sliceLoader.getController();
controller.setRadio(radio);
controller.setPan(pan);
controller = sliceLoader.getController();
controller.setPanadapter(pan);
controller.setParent(this);
controller.setSlice(slice);
wire();
Platform.runLater(() -> {
controller.wire();
});
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug(e.getLocalizedMessage());
log.debug(e.getMessage());
log.debug(e.toString());
}
}
return pane;
}
The error was actually in the constructor to the controller. Late last night I, in an attempt to get the reticle displayed, when it was a ResizableCanvas I decided to change it to Rectangle such that it would simply take a fill(). As this was an existing app and existing controller that worked, such as it was, I didn't create it from SceneBuilder's View sample controller and had inadvertantly not changed the #FXML in the constructor of the controller. In FXMLLoader.java I was eventually able to trace it to the point it was trying to invoke something, the controller. Oddly though, it was pointing at the wrong controller, which I did verify was correct in the fxml. A puzzlement but not the current one. To you comment James about there is always a stack trace. No, many times there is not. It just strikes me perhaps I am missing some best practice on debugging these (JavaFX fxml loader issues which I've had several of these last couple of days.