我正在尝试在jsf中使用的el表达式中使用条件表达式,但它不起作用.
<h:outputText value="#{(sel.description !=null) && (sel.description !='') ? sel.description : 'Empty description'} - "/>
Run Code Online (Sandbox Code Playgroud)
但它不起作用,编译器说:
跟踪错误[line:118]实体名称必须紧跟实体引用中的"&".
你有什么建议吗?谢谢!
我需要在 html 页面上显示一个下拉列表。我希望用户如果没有找到他想要的值,也可以在组合框中添加自由文本。有没有可能而且不太复杂?我有引导程序和 jquery。谢谢!
我想用java解析一个Excel文件,所以我使用的是apache poi库,这里是maven依赖项:
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.14</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
这将包括一系列依赖项:
poi-ooxml-3.14.jar
poi-3.14.jar
commons-codec-1.10.jar
poi-ooxml-schemas-3.14.jar
xmlbeans-2.6.0.jar
stax-api-1.0.1.jar
curvesapi-1.03.jar
Run Code Online (Sandbox Code Playgroud)
当我尝试使用以下代码读取Office 365 Excel文件(.xslx)时:
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class ExcelConverter {
public static void main(String[] args) throws Exception{
String excelFilePath = "C:/temp/Book1.xlsx";
File myFile = new File(excelFilePath);
System.out.println("File exists: " + myFile.exists());
FileInputStream inputStream = new FileInputStream(myFile);
Workbook workbook = new XSSFWorkbook(inputStream);
}
}
Run Code Online (Sandbox Code Playgroud)
我收到以下控制台消息:
File exists: true
Exception in thread "main" org.apache.poi.POIXMLException: Strict OOXML isn't currently supported, please …Run Code Online (Sandbox Code Playgroud)