بتاريخ: 18 مارس 20179 سنة comment_284477 كيف يتم عمل ذلك زى المرفق كده ياريت لو اى لينك يساعدنى شكرا مقدما List files and directories from operating system in Java adf تقديم بلاغ
بتاريخ: 18 مارس 20179 سنة comment_284497 مبدئياً لا يوجد شئ اسمه Java ADF بالنسبة للطلب فهذا يتم من خلال io كل ما تحتاجه موجود في java.io تقديم بلاغ
بتاريخ: 18 مارس 20179 سنة comment_284543 I used something like that before but without tree to get all drivers then all contain files and so on Please find my sample code below import java.io.File; import javax.swing.filechooser.FileSystemView; public class getDirectories { public getDirectories() { super(); } public static void main(String[] args) { File[] drivers; FileSystemView fileSystemView = FileSystemView.getFileSystemView(); drivers = File.listRoots(); for(File drive : drivers) { System.out.println("Drive: " + drive); directory(drive); } } public static void directory(File dir){ File[] files = dir.listFiles(); for(File file:files){ if(file.listFiles() != null){ directory(file); System.out.println(" " + file.getName()); } } } } As I guess To implement this you can use use ChildPropertyTreeModel class to fill your tree nodes and then link it in value property of tree component on page Also See http://stackoverflow.com/questions/16437874/adf-populating-treetable-with-a-bean/16521119#16521119 تم تعديل 18 مارس 20179 سنة بواسطة repotec تقديم بلاغ
بتاريخ: 22 مارس 20179 سنة كاتب الموضوع comment_284731 I used something like that before but without tree to get all drivers then all contain files and so on Please find my sample code below import java.io.File; import javax.swing.filechooser.FileSystemView; public class getDirectories { public getDirectories() { super(); } public static void main(String[] args) { File[] drivers; FileSystemView fileSystemView = FileSystemView.getFileSystemView(); drivers = File.listRoots(); for(File drive : drivers) { System.out.println("Drive: " + drive); directory(drive); } } public static void directory(File dir){ File[] files = dir.listFiles(); for(File file:files){ if(file.listFiles() != null){ directory(file); System.out.println(" " + file.getName()); } } } } As I guess To implement this you can use use ChildPropertyTreeModel class to fill your tree nodes and then link it in value property of tree component on page Also See http://stackoverflow.com/questions/16437874/adf-populating-treetable-with-a-bean/16521119#16521119 شكرا كثيرا تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.