I have a word document that has a 4 level deep multilevel list. I would like to modify the list styles (temporarily) to show the entire depth of the numbers. For instance, rather than just showing (iii), I want to modify it to show 1.1(a)(iii). I have seen instructions of attaching the style to the list, but I'm not sure how to write the style to show what I want.
So, all of the searching and the replies have not resulted in a working solution, yet, but I did discover that the .docx file is a zipped collection of xml files. So, after looking inside the docx file and the numbering.xml sub-file, I found the following section that seems to define the style for the numbering I am looking to change:
<w:abstractNum w:abstractNumId="93" w15:restartNumberingAfterBreak="0">
<w:nsid w:val="5FE75E67"/>
<w:multiLevelType w:val="multilevel"/>
<w:tmpl w:val="9C366D9C"/>
<w:lvl w:ilvl="0">
<w:start w:val="1"/>
<w:numFmt w:val="decimal"/>
<w:pStyle w:val="ArticleCL1"/>
<w:lvlText w:val="%1"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="720"/>
</w:tabs>
<w:ind w:left="0" w:firstLine="0"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Times New Roman"/>
<w:b/>
<w:i w:val="0"/>
<w:caps/>
<w:smallCaps w:val="0"/>
<w:sz w:val="22"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="1">
<w:start w:val="1"/>
<w:numFmt w:val="decimal"/>
<w:pStyle w:val="ArticleCL2"/>
<w:lvlText w:val="%1.%2"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="720"/>
</w:tabs>
<w:ind w:left="720" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Times New Roman"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="22"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="2">
<w:start w:val="1"/>
<w:numFmt w:val="lowerLetter"/>
<w:pStyle w:val="ArticleCL3"/>
<w:lvlText w:val="(%3)"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="720"/>
</w:tabs>
<w:ind w:left="720" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Times New Roman"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="22"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="3">
<w:start w:val="1"/>
<w:numFmt w:val="lowerRoman"/>
<w:pStyle w:val="ArticleCL4"/>
<w:lvlText w:val="(%4)"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="1440"/>
</w:tabs>
<w:ind w:left="1440" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Times New Roman"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="22"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="4">
<w:start w:val="1"/>
<w:numFmt w:val="lowerLetter"/>
<w:pStyle w:val="ArticleCL5"/>
<w:lvlText w:val="%5."/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="2160"/>
</w:tabs>
<w:ind w:left="2160" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Times New Roman"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="24"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="5">
<w:start w:val="1"/>
<w:numFmt w:val="decimal"/>
<w:pStyle w:val="ArticleCL6"/>
<w:lvlText w:val="%6."/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="2160"/>
</w:tabs>
<w:ind w:left="2160" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Times New Roman" w:hint="default"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="22"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="6">
<w:start w:val="1"/>
<w:numFmt w:val="bullet"/>
<w:lvlRestart w:val="0"/>
<w:pStyle w:val="ArticleCL7"/>
<w:lvlText w:val="·"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="1440"/>
</w:tabs>
<w:ind w:left="1440" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="24"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="7">
<w:start w:val="1"/>
<w:numFmt w:val="bullet"/>
<w:lvlRestart w:val="0"/>
<w:pStyle w:val="ArticleCL8"/>
<w:lvlText w:val="·"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="2160"/>
</w:tabs>
<w:ind w:left="2160" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="24"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="8">
<w:start w:val="1"/>
<w:numFmt w:val="bullet"/>
<w:pStyle w:val="ArticleCL9"/>
<w:lvlText w:val="·"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="2880"/>
</w:tabs>
<w:ind w:left="2880" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:color w:val="auto"/>
<w:sz w:val="24"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
Hopefully, this means that I can change the w:lvlText w:val="(%3) for w:ilvl="2" using VBA. Still investigating.
Thanks!
Rod
Well, it turns out that you can, indeed, directly modify a multiLevelList style at any level if you know how to refer to it. Using the xml file I referenced, I found that the third level style, ArticleC_L3, had it's number format set to "(%3)" which is what I wanted to change. It was in an abstract with AbstractNumId="93". The following code changes that setting:
wDoc.ListTemplates(94).ListLevels(3).NumberFormat = "%1.%2.%3"
You will notice that the ListTemplates number is one higher, and the ListLevels ID is likewise one higher. In either case, to find the precise place you need to refer to, the best workflow I have found is:
1. In the word doc, click on the number/bullet for the level you are trying to change.
2. Click the little dropdown arrow in the styles box so you can see what the style name is for that level.
3. Look in numbering.xml to see which number style is using that style name. For me the line read <w:pStyle w:val="ArticleCL3"/>
4. Follow the xml tree up to find out what level of the numbering style this is. For me the line read <w:lvl w:ilvl="2">
5. Continue to follow the xml tree up to find out what Template number the level is in. For me the line read <w:abstractNum w:abstractNumId="93" w15:restartNumberingAfterBreak="0">
6. Now you can refer to the exact level format as in the line I shared at the start.
Thanks for eveyone's help!
Rod
Presumably, something based on:
Sub ApplyMultiLevelStyleNumbers()
Dim LT As ListTemplate, i As Long
Set LT = ActiveDocument.ListTemplates.Add(OutlineNumbered:=True)
For i = 1 To 4
With LT.ListLevels(i)
.NumberFormat = Choose(i, "%1", "%1.%2", "%1.%2.%3", "%1.%2.%3.%4")
.Font.Bold = True
.ResetOnHigher = True
.StartAt = 1
.LinkedStyle = "ArticleC_L" & i
End With
Next
End Sub
The above assumes your four styles are named ArticleC_L1 - ArticleC_L4.
Related
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.
Oracle 11g2.
For example:
select XMLType(
'<main>
<article>
<title>1.txt</title>
<type>market</type>
<author>
<name>J. Smith</name>
<age>32</age>
</author>
</article>
<comment>For information</comment>
</main>').getStringVal() from dual;
Could you help me modify this select statement ?
I'd like to get varchar output as :
<title>1.txt</title>
<type>market</type>
<author>
<name>J. Smith</name>
<age>32</age>
</author>
unfortunately, using extract('/main/article') as:
select XMLType(
'<main>
<article>
<title>1.txt</title>
<type>market</type>
<author>
<name>J. Smith</name>
<age>32</age>
</author>
</article>
<comment>For information</comment>
</main>').extract('/main/article').getStringVal() from dual;
lose format of the text (all output in one row).
Thank you in advance.
You can do this (well, including the article node) via XMLTABLE and XMLSERIALISE to do the pretty printing, e.g.:
Query
with sample_data as (select XMLType(
'<main>
<article>
<title>1.txt</title>
<type>market</type>
<author>
<name>J. Smith</name>
<age>32</age>
</author>
</article>
<comment>For information</comment>
</main>') xdata from dual)
select xmlserialize(document x.col1 as varchar2(4000) indent size = 2)
from sample_data sd
cross join xmltable('/main/article'
passing sd.xdata
columns col1 xmltype path '.') x;
Result
<article>
<title>1.txt</title>
<type>market</type>
<author>
<name>J. Smith</name>
<age>32</age>
</author>
</article>
As #Boneist shows you can use xmlserialize() for the formatting, but as you only seem to have a single article node in your document you can still use your extract():
select xmlserialize(document XMLType(
'<main>
<article>
<title>1.txt</title>
<type>market</type>
<author>
<name>J. Smith</name>
<age>32</age>
</author>
</article>
<comment>For information</comment>
</main>').extract('/main/article')
as varchar2(200) indent) as article
from dual;
Or you can use an XMLQuery:
select xmlserialize(document xmlquery('/main/article'
passing XMLType(
'<main>
<article>
<title>1.txt</title>
<type>market</type>
<author>
<name>J. Smith</name>
<age>32</age>
</author>
</article>
<comment>For information</comment>
</main>')
returning content)
as varchar2(200) indent) as article
from dual;
ARTICLE
--------------------------------------------------------------------------------
<article>
<title>1.txt</title>
<type>market</type>
<author>
<name>J. Smith</name>
<age>32</age>
</author>
</article>
I have a treeTableView and in its header I have a Label and Textbox. I want the width of textbox to increase also when the column is increased by resizing of it.
How to do that?
How to get dynamic column width? Or how to set dynamic width to textbox as per column?
Code:
<TableView fx:id="tableView" layoutX="1.0" layoutY="1.0"
minHeight="580.0" prefWidth="434.0" AnchorPane.bottomAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0" HBox.hgrow="ALWAYS" VBox.vgrow="ALWAYS">
<columns>
<TableColumn style="-fx-font-family: Calibri; -fx-font-size: 11px;" text="MessageId">
<cellValueFactory>
<PropertyValueFactory property="messageId" />
</cellValueFactory>
</TableColumn>
<TableColumn prefWidth="110.0" style="-fx-font-family: Calibri; -fx-font-size: 11px;" text="Digest Reference">
<cellValueFactory>
<PropertyValueFactory property="digestReference" />
</cellValueFactory>
</TableColumn>
<TableColumn prefWidth="115.0" style="-fx-font-family: Calibri; -fx-font-size: 11px;" text="Message Reference">
<cellValueFactory>
<PropertyValueFactory property="messageRef" />
</cellValueFactory>
</TableColumn>
<TableColumn prefWidth="115.0" style="-fx-font-family: Calibri; -fx-font-size: 11px;" text="Deal Number">
<cellValueFactory>
<PropertyValueFactory property="dealNo" />
</cellValueFactory>
</TableColumn>
<TableColumn style="-fx-font-family: Calibri; -fx-font-size: 11px;" text="Digest Value">
<cellValueFactory>
<PropertyValueFactory property="digestValue" />
</cellValueFactory>
</TableColumn>
<TableColumn prefWidth="100.0" style="-fx-font-family: Calibri; -fx-font-size: 11px;" text="Updated Date Time">
<cellValueFactory>
<PropertyValueFactory property="updateTime" />
</cellValueFactory>
</TableColumn>
</columns>
<columnResizePolicy>
<TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
</columnResizePolicy>
</TableView>
JAVA Code:
for (TableColumn<NonRepudiation, ?> tableColumn : tableView.getColumns()) {
double width = tableColumn.getWidth();
VBox vBox = new VBox();
vBox.autosize();
vBox.setPrefWidth(tableColumn.getMaxWidth());
double width = tableColumn.getWidth();
VBox vBox = new VBox();
vBox.autosize();
vBox.setPrefWidth(tableColumn.getMaxWidth());
HBox lableBox = new HBox();
lableBox.setPrefWidth(width);
lableBox.getStyleClass().add("labelBoxTxt");
StackPane HL = new StackPane();
HL.getStyleClass().add("greyBorder");
Label label = new Label(tableColumn.getText());
label.setPrefWidth(width);
label.alignmentProperty().setValue(Pos.TOP_LEFT);
TextField textField = new TextField();
textField.setPrefWidth(width);
textField.textProperty().addListener(filterTable(tableColumn));
HBox textInputBox = new HBox();
textInputBox.getChildren().add(textField);
lableBox.getChildren().add(label);
HBox.setMargin(textField, new Insets(3,3,3,0));
vBox.getChildren().addAll(lableBox, HL, textInputBox);
tableColumn.setGraphic(vBox);
}
Basically you need to use HBox.setHgrow() method. Here refactored code of yours:
for ( TableColumn tableColumn : tableView.getColumns() ) {
// build label
Label label = new Label( tableColumn.getText() );
HBox lableBox = new HBox( label );
lableBox.getStyleClass().add( "labelBoxTxt" );
lableBox.setAlignment( Pos.CENTER );
// build hor line
StackPane HL = new StackPane();
HL.getStyleClass().add( "greyBorder" );
// build text field
TextField textField = new TextField();
HBox.setHgrow( textField, Priority.ALWAYS );
HBox.setMargin( textField, new Insets( 3 ) );
HBox textInputBox = new HBox( textField );
// put together
VBox vBox = new VBox( lableBox, HL, textInputBox );
tableColumn.setText( "" );
tableColumn.setGraphic( vBox );
}
I found the solution.
Set a css class to your talbe view.
<TableView styleClass="k-table-view"
Then add css class to vbox
vBox.getStyleClass().add("k-column-graphic");
Add css rule
.k-table-view .column-header > .label {
-fx-content-display: graphic-only;
}
.k-column-graphic {
-fx-alignment: center-left;
}
I am having dynamic width for the graphic.
I'm having an issue with getting the table caption and border to output in PDF. I'm using docx4j 3.0.0 but I also had the same issue with 2.8.1.
I have a xhtml fragment generated by TinyMCE. I do some processing to get it the way docx4j wants it, and convert it to openXML using XHTMLImporterImpl.
I use the marshaller to get the docx format working and Docx4j.toPDF for the pdf format.
It works for most cases, italics, underline, bold, alignment, images, etc.
When it comes to table caption and border, it works in the docx format, but not the PDF format. It simply excludes the table with these properties. I think xhtml -> openXML is working properly, but the Docx4j.toPDF is not supporting these properties or something. I tried searching the web with no luck. I was wondering if someone already knew about this.
The error I get is
java.lang.StringIndexOutOfBoundsException: String index out of range: 9
at java.lang.String.substring(String.java:1907)
at org.apache.fop.fo.expr.PropertyTokenizer.nextColor(PropertyTokenizer.java:239)
at org.apache.fop.fo.expr.PropertyTokenizer.next(PropertyTokenizer.java:175)
at org.apache.fop.fo.expr.PropertyParser.parseProperty(PropertyParser.java:118)
at org.apache.fop.fo.expr.PropertyParser.parse(PropertyParser.java:91)
at org.apache.fop.fo.properties.PropertyMaker.make(PropertyMaker.java:438)
at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:413)
at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:321)
at org.apache.fop.fo.FObj.processNode(FObj.java:122)
at org.apache.fop.fo.flow.table.TableFObj.processNode(TableFObj.java:232)
...
Caused by: org.docx4j.openpackaging.exceptions.Docx4JException: Exception exporting package
at org.docx4j.convert.out.common.AbstractExporter.export(AbstractExporter.java:79)
at org.docx4j.Docx4J.toFO(Docx4J.java:467)
at org.docx4j.Docx4J.toPDF(Docx4J.java:477)
The openXML looks like this for the table
<w:tbl>
<w:tblPr>
<w:tblW w:w="0" w:type="auto"/>
<w:tblCellSpacing w:w="20" w:type="dxa"/>
<w:tblInd w:w="115" w:type="dxa"/>
<w:tblBorders>
<w:top w:val="inset" w:color="#000000" w:sz="8"/>
<w:left w:val="inset" w:color="#000000" w:sz="8"/>
<w:bottom w:val="inset" w:color="#000000" w:sz="8"/>
<w:right w:val="inset" w:color="#000000" w:sz="8"/>
<w:insideH w:val="none"/>
<w:insideV w:val="none"/>
</w:tblBorders>
</w:tblPr>
<w:tblGrid>
<w:gridCol w:w="1045"/>
<w:gridCol w:w="903"/>
</w:tblGrid>
<w:tr>
<w:tc>
<w:tcPr>
<w:tcW w:w="1045" w:type="dxa"/>
<w:tcBorders>
<w:top w:val="outset" w:color="#000000" w:sz="8"/>
<w:left w:val="outset" w:color="#000000" w:sz="8"/>
<w:bottom w:val="outset" w:color="#000000" w:sz="8"/>
<w:right w:val="outset" w:color="#000000" w:sz="8"/>
</w:tcBorders>
</w:tcPr>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:ind w:left="0"/>
<w:jc w:val="left"/>
</w:pPr>
<w:r>
<w:rPr>
<w:b w:val="false"/>
<w:i w:val="false"/>
<w:color w:val="000000"/>
<w:sz w:val="22"/>
</w:rPr>
<w:t>Col 1</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="903" w:type="dxa"/>
<w:tcBorders>
<w:top w:val="outset" w:color="#000000" w:sz="8"/>
<w:left w:val="outset" w:color="#000000" w:sz="8"/>
<w:bottom w:val="outset" w:color="#000000" w:sz="8"/>
<w:right w:val="outset" w:color="#000000" w:sz="8"/>
</w:tcBorders>
</w:tcPr>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:ind w:left="0"/>
<w:jc w:val="left"/>
</w:pPr>
<w:r>
<w:rPr>
<w:b w:val="false"/>
<w:i w:val="false"/>
<w:color w:val="000000"/>
<w:sz w:val="22"/>
</w:rPr>
<w:t>Col2</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
<w:tr>
<w:tc>
<w:tcPr>
<w:tcW w:w="1045" w:type="dxa"/>
<w:tcBorders>
<w:top w:val="outset" w:color="#000000" w:sz="8"/>
<w:left w:val="outset" w:color="#000000" w:sz="8"/>
<w:bottom w:val="outset" w:color="#000000" w:sz="8"/>
<w:right w:val="outset" w:color="#000000" w:sz="8"/>
</w:tcBorders>
</w:tcPr>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:ind w:left="0"/>
<w:jc w:val="left"/>
</w:pPr>
<w:r>
<w:rPr>
<w:b w:val="false"/>
<w:i w:val="false"/>
<w:color w:val="000000"/>
<w:sz w:val="22"/>
</w:rPr>
<w:t>Row1</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="903" w:type="dxa"/>
<w:tcBorders>
<w:top w:val="outset" w:color="#000000" w:sz="8"/>
<w:left w:val="outset" w:color="#000000" w:sz="8"/>
<w:bottom w:val="outset" w:color="#000000" w:sz="8"/>
<w:right w:val="outset" w:color="#000000" w:sz="8"/>
</w:tcBorders>
</w:tcPr>
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:ind w:left="0"/>
<w:jc w:val="left"/>
</w:pPr>
<w:r>
<w:rPr>
<w:b w:val="false"/>
<w:i w:val="false"/>
<w:color w:val="000000"/>
<w:sz w:val="22"/>
</w:rPr>
<w:t>table</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
</w:tbl>
I think there's a bug with the default border color going in as #000000 instead of 000000. Is there a workaround by pre-processing the xhtml?
duplicates question http://www.docx4java.org/forums/pdf-output-f27/tabl-caption-and-border-issue-docx4j-3-0-0-t1763.html
I'll update both when answered
I've been working on this for a while and I managed to make this component work perfectly like this:
<h:form enctype="multipart/form-data">
<p:panelGrid columns="2">
<p:outputLabel value="Nombre:" for="nombre"/>
<p:inputText id="nombre" value="# {controladorProducto.producto.nombre}"/>
<p:outputLabel value="Descripción" for="descripcion"/>
<p:inputText id="descripcion" value="#{controladorProducto.producto.descripcion}"/>
<p:outputLabel value="Precio" for="precio"/>
<p:inputText id="precio" value="#{controladorProducto.producto.precio}"/>
<p:fileUpload id="fileuploader" value="#{controladorProducto.uploadedFile}"
mode="simple" />
<p:commandButton id="boton_cargar" value="Cargar" actionListener="#{controladorProducto.handleProductImageUpload}"
update="fotoProducto" ajax="true"/>
<p:outputLabel value="Imagen:" for="fotoProducto"/>
<p:graphicImage id="fotoProducto" value="#{controladorProducto.producto.imageToShow}"/>
<p:commandButton value="Insertar" action="#{controladorProducto.insertarProducto()}"/>
</p:panelGrid>
</h:form>
So as soon as I add any UI Component (you know, templates) it stops working. Here is the form with the template codes:
<ui:define name="top">
<h1>Buscador Clientes</h1>
<h:form id="form_growl">
<p:growl showDetail="false" />
</h:form>
</ui:define>
<ui:define name="left">
<h:form>
<p:menubar>
<p:menuitem value="Clientes" action="#{controladorCliente.buscarTodosClientes}" />
<p:separator/>
<p:menuitem value="Productos" action="#{controladorProducto.buscarTodosProductos}"/>
<p:separator/>
<p:menuitem value="Pedidos" url="#"/>
</p:menubar>
</h:form>
</ui:define>
<ui:define name ="content">
<h:form enctype="multipart/form-data">
<p:panelGrid columns="2">
<p:outputLabel value="Nombre:" for="nombre"/>
<p:inputText id="nombre" value="#{controladorProducto.producto.nombre}"/>
<p:outputLabel value="Descripción" for="descripcion"/>
<p:inputText id="descripcion" value="#{controladorProducto.producto.descripcion}"/>
<p:outputLabel value="Precio" for="precio"/>
<p:inputText id="precio" value="#{controladorProducto.producto.precio}"/>
<p:fileUpload id="fileuploader" value="#{controladorProducto.uploadedFile}"
mode="simple" />
<p:commandButton id="boton_cargar" value="Cargar" actionListener="#{controladorProducto.handleProductImageUpload}"
update="fotoProducto" ajax="true"/>
<p:outputLabel value="Imagen:" for="fotoProducto"/>
<p:graphicImage id="fotoProducto" value="#{controladorProducto.producto.imageToShow}"/>
<p:commandButton value="Insertar" action="#{controladorProducto.insertarProducto()}"/>
</p:panelGrid>
</h:form>
</ui:define>
</ui:composition>
Is there any problem, I've used the same template in other places of my project and it worked fine, its just here where it crashes. I get a NullPointerException and when i Debug it It didnt even call the bean.
At this point I´ve been looking around the Internet and I've not found anything.
Does anybody has any idea of why it doesnt works?
By the way, Im using NetBeans 7.3, GlassFish 3.1.2, Primefaces 3.5, JSF 2.1....
I hope someone answers me, I'd appreciate any help or clue on this.
This is the Error trace I get:
SEVERE: Se ha recibido 'java.lang.NullPointerException' al invocar la escucha de acción '#{controladorProducto.handleProductImageUpload}' para el componente 'boton_cargar'
SEVERE: java.lang.NullPointerException
at Controlador.ControladorProducto.handleProductImageUpload(ControladorProducto.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.el.parser.AstValue.invoke(AstValue.java:254)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:302)
at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:153)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:769)
at javax.faces.component.UICommand.broadcast(UICommand.java:300)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
SEVERE: JSF1073: se ha interceptado javax.faces.event.AbortProcessingException durante el procesamiento de INVOKE_APPLICATION 5 : UIComponent-ClientId=j_idt22:boton_cargar, Mensaje=java.lang.NullPointerException
SEVERE: java.lang.NullPointerException
javax.faces.event.AbortProcessingException: java.lang.NullPointerException
at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:182)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:769)
at javax.faces.component.UICommand.broadcast(UICommand.java:300)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at Controlador.ControladorProducto.handleProductImageUpload(ControladorProducto.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.el.parser.AstValue.invoke(AstValue.java:254)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:302)
at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:153)
... 38 more