In Java how do I create a structured tree using FileVisitor

泄露秘密 提交于 2020-01-06 03:31:06
问题 Given a starting path I want to create a tree like object representing the filesystem using Java, showing all the folders down to level x but not ordinary files. . So using FileVisitor I know that every time just before Im going to browse a new subfolder that the preVisitDirectory() method will be called and once it had completed parsing all its children the postVisitDirectory() will be called, but my problem is knowing how to attach this directory to its parent. i.e in my case I want to

How create table use j2html?

拟墨画扇 提交于 2019-12-11 04:53:37
问题 I get acquainted with j2html and I try a make table, but have some problems: main().with( table( tr( td().with( img().withSrc(imagePath+photo) ) td().with( span(name) ), td().with( span(String.valueOf(quantity)) ) after img().withSrc(imagePath+photo) I see mistake, but I don't understand what want from me Idea May be you can show how create table with image+name+ some quontity + colspan for several cells 回答1: (pre v.1.0.0): The tag-methods don't accept DomContent children, so you need to do