<siteMapNode url="Customer support.aspx" title="Customer support" description=""/>
<siteMapNode url="ProductRegistration.aspx" title="Register products" description=""/>
<siteMapNode url="CustomerSurvey.aspx" title="Complete customer survey" description=""/>
<siteMapNode url="ContactUs.aspx" title="Contact us" description=""/>
<siteMapNode url="TechnicianSupport.aspx" title="Technician support" description=""/>
<siteMapNode url="CustomerIncidentDisplay.aspx" title="Display customer incidents" description=""/>
<siteMapNode url="IncidentUpdate.aspx" title="Update incidents" description="">
</siteMapNode>
<siteMapNode url="Administration.aspx" title="Administration" description=""/>
<siteMapNode url="ProductMaintenance.aspx" title="Maintain products" description=""/>
<siteMapNode url="CustomerMaintenance.aspx" title="Maintain customers" description=""/>
<siteMapNode url="TechnicianMaintenance.aspx" title="Maintain technicians" description=""/>
<siteMapNode url="IncidentCreation.aspx" title="Create incidents" description=""/>
<siteMapNode url="TechnicianIncidentSummary.aspx" title="Display techninican incidents" description=""/>
<siteMapNode url="IncidentAssignment.aspx" title="Assign incidents" description=""/>
<siteMapNode url="IncidentDisplay.aspx" title="Display incidents" description=""/>
<siteMapNode url="CustomerDisplay.aspx" title="Display customers" description=""/>
<siteMapNode url="Map.aspx" title="Site Map" description="">
</siteMapNode>
It doesn't turn out exactly right... When I add a TreeView to my Map.aspx webpage It shows Home as the only Parent Node. Home should be the main with Customer Support, Technician support, and administration as the next head nodes then all others under that.
Does this make sense?
Home is the root node that all the other nodes are under.
I've never used the TreeView personally, but when I used a SiteMapDataSource to build a navigation menu, I set ShowStartingNode="false" to skip the root node.
Related
First of all, let me clarify that I am using Blazor and what I want is to display the data from a web service (XML) to my Blazor RadzenDataGrid component.
I found out how to do it with a database model, which is posed as follows:
<RadzenDataGrid id="tabla_trabajadoresSinUs" style="display: none" AllowFiltering="true" AllowColumnResize="true"
FilterMode="FilterMode.Simple" PageSize="5" AllowPaging="true" AllowSorting="true" Data="#personas" TItem="SisPersona" ColumnWidth="150px"
FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
LogicalFilterOperator="LogicalFilterOperator.Or">
<Columns>
<RadzenDataGridColumn TItem="SisPersona" Property="Id" Title="Id" Frozen="true" TextAlign="TextAlign.Center" Width="100px" />
<RadzenDataGridColumn TItem="SisPersona" Property="Nombre" Title="Nombre" TextAlign="TextAlign.Center" Width="100px"/>
<RadzenDataGridColumn TItem="SisPersona" Property="Nif" Filterable="false" TextAlign="TextAlign.Center" Title="Código Tarea" Width="100px" />
<RadzenDataGridColumn TItem="SisPersona" Property="Direccion" Filterable="false" Title="Usuario I." Width="100px" />
</Columns>
</RadzenDataGrid>
#code {
DataBaseContext db = new DataBaseContext();
IEnumerable<SisPersona> personas;
protected override void OnInitialized() {
personas = db.SisPersonas;
}
}
But this is not what I really want, I integrated my web services in my project and through a method of my web service (GetStaffMemebers()) that I have in a class I want it to display that information in my RadzenDataGrid, is there supposed to be a way to do this?
The bottom line is that I don't know how to adapt a web service in this Blazor component.
Help is appreciated as always!
I am trying to extract a jar file with java 8 from IntelliJ using libraries of fontawesomefx-8.92, jfoenix and SQLite-JDBC-3.27.2.12, with this method :
File > Project Structure > artifacts > Add; and if I run the jar file from
out > artifacts > DemoCreditApp_jar > DemoCreditApp.jar , I encountered these errors :
Exception in Application start method java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown
Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(Unknown
Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source) Caused by: java.lang.RuntimeException: Exception in
Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown
Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown
Source)
at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoClassDefFoundError:
com/sun/javafx/css/converters/PaintConverter
at com.jfoenix.controls.JFXTextField$StyleableProperties.<clinit>(JFXTextField.java:212)
at com.jfoenix.controls.JFXTextField.<init>(JFXTextField.java:163)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.base/java.lang.Class.newInstance(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(Unknown
Source)
at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processStartElement(Unknown
Source)
at javafx.fxml/javafx.fxml.FXMLLoader.processStartElement(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source)
at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source)
at Views.Main.start(Main.java:27)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown
Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(Unknown
Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(Unknown
Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown
Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown
Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown
Source)
... 1 more Caused by: java.lang.ClassNotFoundException: com.sun.javafx.css.converters.PaintConverter
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown
Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown
Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
...23 more Exception running application Views.Main
I didn't understand what is meant by the error of the path, here is my code source of Main :
package Views;
import Controllers.PagePrincipaleController;
import Controllers.SqliteConnection;
import Controllers.Values;
import Models.Patient;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.TableView;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
/**
* Created by Amine Daikha
*/
public class Main extends Application {
#Override
public void start(Stage primaryStage) throws Exception {
Values.sqliteConnection = new SqliteConnection();
Values.courentPatient = new Patient();
Values.tableInfo = new TableView<Patient>();
FXMLLoader fxmlLoader = new FXMLLoader(Main.class.getResource("PagePrincipaleView.fxml"));
AnchorPane pane = fxmlLoader.load();
PagePrincipaleController pagePrincipaleController = fxmlLoader.getController();
pagePrincipaleController.setMain(this);
//fxmlLoader = new FXMLLoader(new File("src/Views/PagePrincipaleView.fxml").toURI().toURL());
//Parent root = null;
//root = fxmlLoader.load(getClass().getResource("..\\Views\\PagePrincipaleView.fxml").openStream());
//Parent root = FXMLLoader.load(getClass().getResource("PagePrincipaleView.fxml"));
//Parent root = FXMLLoader.load(getClass().getResource("Views\\ScrollesPaneView.fxml"));
primaryStage.setTitle("Transactions Commerciales");
primaryStage.setScene(new Scene(pane, 1050, 570));
primaryStage.setMaxWidth(1065);
primaryStage.setMaxHeight(600);
primaryStage.show();
Values.pagePrincipaleSage = primaryStage;
}
public static void main(String[] args) {
launch(Main.class,args);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<?import com.jfoenix.controls.JFXTextField?>
<?import com.jfoenix.controls.JFXButton?>
<?import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView?>
<?import com.jfoenix.controls.JFXComboBox?>
<AnchorPane fx:id="pagePrincipale" prefHeight="550.0" prefWidth="1050.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Controllers.PagePrincipaleController">
<children>
<TabPane prefHeight="570.0" prefWidth="1050.0" tabClosingPolicy="UNAVAILABLE">
<tabs>
<Tab text="CLIENTS">
<content>
<AnchorPane layoutX="-1.0" minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
<children>
<HBox layoutX="210.0" prefHeight="430.0" prefWidth="841.0">
<children>
<TableView fx:id="tableInfo" prefHeight="430.0" prefWidth="841.0">
<columns>
<TableColumn fx:id="idCol" prefWidth="150.0" text="Numéro de téléphone" />
<TableColumn fx:id="nomCol" prefWidth="158.0" text="Nom" />
<TableColumn fx:id="prenomCol" prefWidth="211.0" text="Prénom" />
<TableColumn fx:id="dateCol" prefWidth="163.0" text="Date de dernier opération" />
<TableColumn fx:id="prixColA" minWidth="4.0" prefWidth="157.0" text="Endettement actuel (DA)" />
</columns>
</TableView>
</children>
</HBox>
<VBox prefHeight="437.0" prefWidth="210.0">
<children>
<JFXTextField fx:id="rechercherClient" onAction="#rechercherClientAction" promptText="Rechercher un client">
<VBox.margin>
<Insets bottom="20.0" left="4.0" right="4.0" top="20.0" />
</VBox.margin>
</JFXTextField>
<Label prefHeight="35.0" prefWidth="210.0" text="Ajouter nouveau Client">
<VBox.margin>
<Insets bottom="25.0" top="20.0" />
</VBox.margin>
<font>
<Font size="18.0" />
</font>
<padding>
<Insets left="12.0" right="10.0" />
</padding>
</Label>
<JFXTextField fx:id="numTel" promptText="Numéro de téléphone">
<VBox.margin>
<Insets bottom="7.0" left="4.0" right="4.0" />
</VBox.margin>
</JFXTextField>
<Label fx:id="errLabelNumTel" textFill="#ee0a0a">
<VBox.margin>
<Insets bottom="15.0" left="13.0" right="4.0" />
</VBox.margin>
</Label>
<JFXTextField fx:id="nomClient" promptText="Nom">
<VBox.margin>
<Insets bottom="7.0" left="4.0" right="4.0" />
</VBox.margin>
</JFXTextField>
<Label fx:id="errLabelNom" textFill="#ee0a0a">
<VBox.margin>
<Insets bottom="15.0" left="13.0" right="4.0" />
</VBox.margin>
</Label>
<JFXTextField fx:id="prenomClient" layoutX="10.0" layoutY="90.0" promptText="Prénom">
<VBox.margin>
<Insets bottom="7.0" left="4.0" right="4.0" />
</VBox.margin>
</JFXTextField>
<Label fx:id="errLabelPrenom" textFill="#ee0a0a">
<VBox.margin>
<Insets bottom="15.0" left="13.0" right="4.0" />
</VBox.margin>
</Label>
<JFXTextField fx:id="prixInitialClient" promptText="Valeur de Credit">
<VBox.margin>
<Insets bottom="7.0" left="4.0" right="4.0" />
</VBox.margin>
</JFXTextField>
<Label fx:id="errLabelPrix" textFill="#ee0a0a">
<VBox.margin>
<Insets bottom="20.0" left="13.0" right="4.0" />
</VBox.margin>
</Label>
</children>
</VBox>
<JFXButton fx:id="effacerBtn" layoutX="830.0" layoutY="448.0" onAction="#effacer" prefHeight="40.0" prefWidth="190.0" style="-fx-background-color: #0fc4e4;" text="Effacer endettements" textFill="WHITE">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<JFXButton fx:id="modifierBtn" layoutX="530.0" layoutY="448.0" onAction="#modifier" prefHeight="40.0" prefWidth="190.0" style="-fx-background-color: #0fc4e4;" text="Modifier" textFill="WHITE">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<Label fx:id="errLabelClick" layoutX="526.0" layoutY="488.0" prefHeight="40.0" textFill="#bc0606">
<font>
<Font size="14.0" />
</font>
</Label>
<JFXButton fx:id="infoDetailleBtn" layoutX="226.0" layoutY="448.0" onAction="#infoDetaille" prefHeight="40.0" prefWidth="190.0" style="-fx-background-color: #0fc4e4;" text="Transactions" textFill="WHITE">
<font>
<Font name="System Bold" size="15.0" />
</font></JFXButton>
<JFXButton fx:id="ajouterClientBtn" layoutX="5.0" layoutY="424.0" onAction="#ajouterClient" prefHeight="38.0" prefWidth="195.0" style="-fx-background-color: #0e9615;" text="Ajouter" textFill="WHITE">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<FontAwesomeIconView glyphName="EDIT" layoutX="685.0" layoutY="475.0" size="18.0" text="" />
<FontAwesomeIconView fill="#dd0d0d" glyphName="REMOVE" layoutX="1003.0" layoutY="475.0" size="18.0" text="" />
<FontAwesomeIconView fill="WHITE" glyphName="PLUS" layoutX="154.0" layoutY="451.0" size="18.0" text="" wrappingWidth="23.142857551574707" />
<FontAwesomeIconView fill="#14860c" glyphName="ARROW_UP" layoutX="387.0" layoutY="470.0" />
<FontAwesomeIconView fill="#dd0d0d" glyphName="ARROW_DOWN" layoutX="376.0" layoutY="479.0" />
<FontAwesomeIconView fill="#dd0d0d" glyphName="POWER_OFF" layoutX="84.0" layoutY="518.0" onMousePressed="#ett" size="30.0" text="" wrappingWidth="20.714284896850586" />
<Label layoutX="906.0" layoutY="514.0" text="Amine DAIKHA © 2019" underline="true" />
</children>
</AnchorPane>
</content>
</Tab>
<Tab text="STATISTIQUES">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
<children>
<FontAwesomeIconView fill="#dd0d0d" glyphName="POWER_OFF" layoutX="84.0" layoutY="518.0" onKeyPressed="#ett" onMousePressed="#ett" size="30.0" text="" wrappingWidth="32.714284896850586" />
<Label layoutX="105.0" layoutY="25.0" text="Totale d'endettements: ">
<font>
<Font size="18.0" />
</font>
</Label>
<Label fx:id="totalEndettments" layoutX="310.0" layoutY="25.0" text="DA">
<font>
<Font size="18.0" />
</font>
</Label>
<Label layoutX="105.0" layoutY="93.0" text="les clients qui n'ont pas payé leurs endettements il y a : ">
<font>
<Font size="16.0" />
</font>
</Label>
<TableView fx:id="tableInfo1" layoutX="105.0" layoutY="130.0" prefHeight="113.0" prefWidth="841.0">
<columns>
<TableColumn fx:id="idCol1" prefWidth="150.0" text="Numéro de téléphone" />
<TableColumn fx:id="nomCol1" prefWidth="158.0" text="Nom" />
<TableColumn fx:id="prenomCol1" prefWidth="211.0" text="Prénom" />
<TableColumn fx:id="dateCol1" prefWidth="163.0" text="Date de dernier opération" />
<TableColumn fx:id="prixColA1" minWidth="4.0" prefWidth="157.0" text="Endettement actuel (DA)" />
</columns>
</TableView>
<TableView fx:id="tableInfo2" layoutX="105.0" layoutY="326.0" prefHeight="113.0" prefWidth="841.0">
<columns>
<TableColumn fx:id="idCol2" prefWidth="150.0" text="Numéro de téléphone" />
<TableColumn fx:id="nomCol2" prefWidth="158.0" text="Nom" />
<TableColumn fx:id="prenomCol2" prefWidth="211.0" text="Prénom" />
<TableColumn fx:id="dateCol2" prefWidth="163.0" text="Date de dernier opération" />
<TableColumn fx:id="prixColA2" minWidth="4.0" prefWidth="157.0" text="Endettement actuel (DA)" />
</columns>
</TableView>
<Label layoutX="105.0" layoutY="289.0" text="les clients qui leurs endettements passent : ">
<font>
<Font size="16.0" />
</font>
</Label>
<JFXComboBox fx:id="temps" layoutX="518.0" layoutY="93.0" />
<JFXComboBox fx:id="largent" layoutX="421.0" layoutY="289.0" />
<Label layoutX="906.0" layoutY="514.0" text="Amine DAIKHA © 2019" underline="true" />
</children></AnchorPane>
</content>
</Tab>
</tabs>
</TabPane>
</children>
</AnchorPane>
I have spent the whole day please guide me.
I am trying to add dataExporter component to my table.
First I had {Exporters} beside pagination facet , then after a lot of tries I got this error in the console
HTML nesting warning on closing changes: element update not explicitly closed
I solved it also but now there is nothing appears in the Exporter facet. I googled it and found that I need a form in my page because of this commandlink submit a form , so it needs a form.
My Question here is how to apply this example in my project.
Here is my code.
<ui:composition template="/template.xhtml">
<ui:define name="title">
<h:outputText value="#{bundle.ViewLfmTitle}"></h:outputText>
</ui:define>
<ui:define name="body">
<h:panelGroup id="messagePanel" layout="block">
<h:messages errorStyle="color: red" infoStyle="color: green"
layout="table" />
</h:panelGroup>
<p:dialog header="Add Task" widgetVar="dlg" position="center center"
onShow="PF('dlg').initPosition()" modal="true" closeOnEscape="true"
resizable="false">
<h:form>
<h:panelGrid columns="2">
<p:outputLabel value="#{bundle.CreateTaskLabel_name}" for="name" />
<p:inputText id="name"
value="#{ViewLfmJpaController.newTaskDTO.name}"
title="#{bundle.CreateTaskTitle_name}" />
<p:outputLabel value="#{bundle.CreateTaskLabel_durationPerMonth}"
for="durationPerMonth" />
<p:inputText id="durationPerMonth"
value="#{ViewLfmJpaController.newTaskDTO.duration}"
title="#{bundle.CreateTaskTitle_durationPerMonth}" />
<p:outputLabel value="#{bundle.CreateTaskLabel_startDate}"
for="startDate" />
<p:calendar id="startDate"
value="#{ViewLfmJpaController.newTaskDTO.startDate}"
title="#{bundle.CreateTaskTitle_startDate}" pattern="d MMM yyyy"
effect="fold">
<f:convertDateTime pattern="d MMM yyyy" />
</p:calendar>
<p:outputLabel value="#{bundle.CreateTaskLabel_endDate}"
for="endDate" />
<p:calendar id="endDate"
value="#{ViewLfmJpaController.newTaskDTO.endDate}"
title="#{bundle.CreateTaskTitle_endDate}" pattern="d MMM yyyy"
effect="fold">
<f:convertDateTime pattern="d MMM yyyy" />
</p:calendar>
<f:facet name="footer">
<p:commandButton value="Add"
actionListener="#{ViewLfmJpaController.addTask}" update="Matrix"
oncomplete="PF('dlg').hide()" />
</f:facet>
</h:panelGrid>
</h:form>
</p:dialog>
<p:dataTable id="Matrix" resizableColumns="true" scrollable="true"
scrollHeight="80%"
value="#{ViewLfmJpaController.selected.tasksDtoCollection}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {Exporters}"
var="item" resizeMode="expand" paginator="true" rows="10"
style="margin-bottom:20px">
<f:facet name="header">
Logical Framewrok Matrix
</f:facet>
<f:facet name="{Exporters}">
<p:commandLink>
<p:graphicImage name="../resources/images/pdf.jpg" width="24" />
<p:dataExporter type="pdf" target="Matrix" fileName="lfm" />
</p:commandLink>
</f:facet>
<p:column headerText="Index" colspan="1">
<c:forEach var="i" begin="1" end="#{ViewLfmJpaController.listSize}">
<p:outputLabel value="#{i}"></p:outputLabel>
</c:forEach>
</p:column>
<p:column headerText="Task Title">
<p:outputLabel value="#{item.name}"></p:outputLabel>
</p:column>
<p:column headerText="Start Date" colspan="3">
<p:outputLabel value="#{item.formatedStartDate}"></p:outputLabel>
</p:column>
<p:column headerText="End Date" colspan="3">
<p:outputLabel value="#{item.formatedEndDate}"></p:outputLabel>
</p:column>
<c:forEach var="i" begin="1"
end="#{ViewLfmJpaController.numberOfMonths}">
<p:column headerText="m ${i}" colspan="1"></p:column>
</c:forEach>
<p:column headerText="Exptected Outcomes" colspan="4">
<ui:repeat value="#{item.tasksExpectedOutcomesCollection}" var="teo">
<li><h:outputText value="#{teo.expectation}">
</h:outputText></li>
</ui:repeat>
</p:column>
</p:dataTable>
<p:commandButton value="Add Task" oncomplete="PF('dlg').show()"></p:commandButton>
</ui:define>
</ui:composition>
I FOUND THE SOLUTION BY MYSELF.
First : You have to know that you cannot make nested forms in your page.
Second : you have to know that to submit <p:dialog> </p:dialog> or to use <h:commandLink> </h:commandLink> you need to use form.
So I had removed the form in the dialog component and add a general component contains dialog and dataTable together
Such as the title suggests, i'm trying to bind the size of an Accordion dynamically to the size of the expanded TitledPane.
I tried to add an ChangeListener to the expandedPaneProperty of the accordion in the initialize method of the controller for the UI which contains the Accordion using following code:
private double prefHeight, prefWidth;
#Override
public void initialize(URL location, ResourceBundle resources) {
prefHeight = acc.getPrefHeight(); //double variables of controller
prefWidth = acc.getPrefWidth();
acc.expandedPaneProperty().addListener(new ChangeListener<Object>(){
#Override
public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {
TitledPane pane = acc.getExpandedPane();
if(pane != null){
acc.setPrefHeight(prefHeight + pane.getPrefHeight());
acc.setPrefWidth(prefWidth + pane.getPrefWidth());
}
}
});
}
The Problem is, that this code leads to a NullPointerException at line 3, which might indicate that the property might not be instatiated at this moment.
Update: Problem concerning NullPointerException was solved, i didn't initialized the Accordion properly.
The code is still not working, though.
The corresponding FXML:
<Accordion fx:id="acc" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.SettingsController">
<panes>
<TitledPane alignment="TOP_LEFT" animated="false" text="Alarm sound">
<tooltip>
<Tooltip text="Enables to choose an alarm sound." />
</tooltip>
<content>
<VBox alignment="TOP_CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="box">
<children>
<HBox alignment="TOP_CENTER" styleClass="hbox">
<children>
<Button mnemonicParsing="false" text="Reset to default" />
<Button mnemonicParsing="false" onAction="#saveAndExitOnClick" text="Save and exit" />
</children>
</HBox>
<ListView maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" VBox.vgrow="ALWAYS" />
</children>
</VBox>
</content></TitledPane>
<TitledPane animated="false" text="Style">
<tooltip>
<Tooltip text="Enables to choose a style for the program." />
</tooltip>
<content>
<VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="box">
<children>
<HBox alignment="TOP_CENTER" styleClass="h-box">
<children>
<Button mnemonicParsing="false" text="Reset to default" />
<Button mnemonicParsing="false" onAction="#saveAndExitOnClick" text="Save and exit" />
</children>
</HBox>
<ListView maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" />
</children>
</VBox>
</content></TitledPane>
<TitledPane animated="false" text="Language">
<tooltip>
<Tooltip text="Enables to choose a style for the program." />
</tooltip>
<content>
<VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="box">
<children>
<HBox alignment="TOP_CENTER">
<children>
<Button mnemonicParsing="false" text="Reset to default" />
<Button mnemonicParsing="false" onAction="#saveAndExitOnClick" text="Save and exit" />
</children>
</HBox>
<ListView maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" />
</children>
</VBox>
</content>
</TitledPane>
<TitledPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" styleClass="box" text="Other settings">
<content>
<ToolBar maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" orientation="VERTICAL" styleClass="box">
<items>
<Button contentDisplay="CENTER" maxWidth="1.7976931348623157E308" mnemonicParsing="false" text="Recenter Window" />
<Button maxWidth="1.7976931348623157E308" mnemonicParsing="false" text="Reset program to default settings" />
<Button maxWidth="1.7976931348623157E308" mnemonicParsing="false" text="Load custom alarm sound" />
<Button maxWidth="1.7976931348623157E308" mnemonicParsing="false" text="Apply custom style" />
</items>
</ToolBar>
</content>
</TitledPane>
<TitledPane maxHeight="1.7976931348623157E308" prefWidth="200.0" text="About">
<content>
<TextArea editable="false" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" text="Timer Program, written by QBW.
Version:
Fonts:
Font Awesome, License:
Alarm sounds:
Acknowledgement:
·Hans-Peter Habelitz for "Programmieren lernen mit Java"
·Christian Ullenboom for "Java ist auch eine Insel" and "Java SE8 Standardbibliothek"
·Anton Epple for "JavaFX 8 - Grundlagen und fortgeschrittene Techniken"
·The stackoverflow.com community
· Creators of alarm sound files:
·
·
·
·
·
· Creators of Font awesome
" wrapText="true" />
</content>
<tooltip>
<Tooltip text="Contains information about the program, its creator and license information" />
</tooltip>
</TitledPane>
</panes>
</Accordion>
How is it possible to solve that problem?
Is there any way at all to disable a link on a node?
For example, I would like to disable the "Dashboards" menu item/node, ie, clicking on it on the site will do nothing.
Is this possible?
thanks,
KS
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<siteMapNode title="" url="">
<siteMapNode title="BI Home" url="/Home.aspx"/>
<siteMapNode title="Scorecards" url="/Scorecards.aspx">
<siteMapNode title="Performance Scorecard" url="/Perfomance-Card.aspx"/>
<siteMapNode title="Quality Scorecard" url="/Quality-Card.aspx"/>
<siteMapNode title="Service Scorecard" url="/Service-Card.aspx"/>
<siteMapNode title="Financial Operations Scorecard" url="/FinancialOps-Card.aspx"/>
</siteMapNode>
<siteMapNode title="Dashboards">
<siteMapNode title="Executive Dashboard" url="/Executive-Dash.aspx"/>
<siteMapNode title="Operational Scorecard" url="/Operational-Card.aspx"/>
</siteMapNode>
<siteMapNode title="Manual Entry">
<siteMapNode title="Labor Hours" url="/Labor-Hours.aspx"/>
<siteMapNode title="Lost Time Accidents" url="/Lost-Time-Accidents.aspx"/>
<siteMapNode title="Action Items" url="/Action-Items.aspx"/>
</siteMapNode>
<siteMapNode title="Reports" url="/Reports.aspx"/>
</siteMapNode>
</siteMap>
Ok, so I settled for second best. What is second best?
Well, I set the main menu item to the same url as the first option beneath it.
But you cannot have duplicate urls in the sitemap nodes I hear you say!
Bypassed this by appending a querystring parameter to the end of the url.
I changed dashboards like so:
<siteMapNode title="Dashboards" url="/Executive-Dash.aspx?S=1"/>
Not very elegant but it is acceptable for my sce