Saving using java.io.*;

When the user hits the saved button on my application, they should be able to save the file. I am using code which works fine in other programs but not in this one. here it is:
private void SaveJButtonActionPerformed( ActionEvent event )
     String fileName=new String("");
     fileName=JOptionPane.showInputDialog("SAVE AS?");
     final FileWriter outputFile = new FileWriter(fileName);
     final BufferedWriter outputBuffer = new BufferedWriter(outputFile);
     final PrintWriter printstream = new PrintWriter(outputBuffer);
     Album[] printList = myList.getList();
     for (int i=0; i<6; i++)
     printstream.println(printList.printDate());
     printstream.close();
}I am getting the error "unreported exception java.io.IOException; must be caught or declared to be thrown"
That error is related to the line final FileWriter outputFile = new FileWriter(fileName);
Is it because i am using the filewriter in an Action Event Method rather than a main?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

String fileName=new String("");You should create String objects in this manner:
String fileName = "";Your compiler tells you "unreported exception java.io.IOException; must be caught or declared to be thrown" because you do not have a catch clause when attempting to use a constructor that may throw it.
What happens if an error occurs while creating outputFile with the fileName parameter? You need to plan for that, and that's what the compiler is telling you. The FileWriter constructor you're calling throws IOException. IOExceptions (Input/Output Exceptions) occur when there is a problem, usually on the OS-level, accessing / modifying / using a File. This does not mean that you will actually encounter an IOException when using the FileWriter constructor- but you need to catch the IOException just in case.
Here is how you catch an exception:
try {
   someMethod();
} catch (SomeException e) {
   System.out.println("Oh no! An error occured, I should tell the user! " + e.getMessage());
   System.exit(-1);
}In your case, someMethod is replaced by the FileWriter constructor...

Similar Messages

  • Saving the password of a user in active directory using java

    Hello, i am trying to use java to build a class that creates a user in Active directory 2012.But the problem is that when the user is created the password is not being saved.
    Can anybody help on this knowing that i tried to save in the fields userPassword and unicodePwd.
    Thanks.

    DirContext ctx = new InitialDirContext(pr);
              BasicAttributes entry = new BasicAttributes(true);
              String entryDN = "cn=CharbelHad,ou=test users,dc=test,dc=dev";
              Attribute cn = new BasicAttribute("cn", "ChHad");
              Attribute street = (new BasicAttribute("streetAddress", "Ach"));
              Attribute loginPreW2k = (new BasicAttribute("sAMAccountName", "[email protected]"));
              Attribute login = (new BasicAttribute("userPrincipalName", "[email protected]"));
              Attribute sn = (new BasicAttribute("sn", "Chl"));
              Attribute pwd = new BasicAttribute("unicodePwd", "\"Ch@341\"".getBytes("UTF-8"));
    Attribute userAccountControl = new BasicAttribute("userAccountControl", "512");
              Attribute oc = new BasicAttribute("objectClass");
              oc.add("top");
              oc.add("person");
              oc.add("organizationalPerson");
              oc.add("user");
              // build the entry
              entry.put(cn);
              entry.put(street);
              entry.put(sn);
              entry.put(userAccountControl);
              entry.put(pwd);
              entry.put(login);
              entry.put(loginPreW2k);
              entry.put(oc);
              ctx.createSubcontext(entryDN, entry);

  • Saving information from web using java.

    hi all
    can anyone tell me how to go to the specified url and then save all the information in it to a text file in a local system using java. i also want to know are there any modules in java similar to LWP module in perl for downloading the information from a specified website...

    http://java.sun.com/docs/books/tutorial/networking/urls/index.html

  • How to save report in PersonalCategory  after creating it using java panel?

    Hi,
    Anybody knows How to save report in PersonalCategory  after creating it using java panel?
    I dont want to save it in public folder. I want to save report (webi) in user's personal category.
    can anybody send me source code?
    It will help me a lot.
    Thanks in advance
    Amol Mali

    Hi teda,
    i'm assuming that you have seen my post that i did successfuly save report in user's personal category.
    Actually the report is created in webi java panel using RE SDK and  is saved in Report Sample Folder then i'm saving it in user's personal category by following code
    string query = "Select SI_PERSONAL_CATEGORIES From CI_INFOOBJECTS Where "
                         + "SI_INSTANCE=0 And SI_ID=" + reportID;
                    InfoObjects infoObjects = infoStore.Query(query);
                    InfoObject infoObject = infoObjects[1];
                    Webi wreport = (Webi)infoObject;
                    ObjectRelativeIDs personalIDs = wreport.PersonalCategories;
                /personalIDs.Add(Convert.ToInt32(categoryID));
                   infoStore.Commit(infoObjects);
    But the report is presents in the Folder also and in user's personal category also.
    I dont want the report to be in the folder (Report Sample) if i saved it in user's personal category.
    How can i do that?
    any idea.
    Please help me.
    Thanks in advance
    Amol Mali
    Edited by: amol mali on Jan 9, 2009 7:55 PM

  • SAP BO Report Scheduling and Save as report using Java SDK

    Hi All,
    We have a java product which is integrated with SAP BO using Java SDK and we have certain java screen through which we select report prompt values and webi report gets run.
    Now we want to give a functionality to save report to BO repository.
    When user select certain check box from java screen a separate copy of the webi report should get saved under default folder on BO repository.
    Also, we want user to choose the scheduling option from java screen only (and not the one which we use from BI Launchpad) due to certain access restriction. User does not have access to BI Launchpad. Only he can run report by selecting values through Java screen.
    If i need to create a separate screen for scheduling as well as saving webi report then also i am ok with it.
    P.S. i guess we need to work on Java SDK level. But could somebody please help me with the right direction?
    Let me know in case requirement is not clear.

    Hi Ketan,
    As you are on version BI 4.0 SP5 and would be migrating to BI 4.1, the best SDKs to use would be the Restful Webservices SDKs.
    You have the options to schedule a webi report with prompts as well as the save feature which you require.
    Please refer to the webi restful guides avialble at
    For BI 4.0 SP5
    http://help.sap.com/businessobject/product_guides/boexir4/en/xi4sp5_webi_restful_ws_en.pdf
    For BI 4.1 SP4
    http://help.sap.com/saphelpiis_sbo41sp4wi-sdk/frameset.htm
    Refer to the below blog to understand the Restfull Webservices SDKs.
    http://scn.sap.com/community/restful-sdk/blog/2013/09/07/scripting-web-intelligence-the-restful-raylight-web-services--learing-it
    More blogs on Rest are available at
    http://scn.sap.com/community/restful-sdk/content#filterID=contentstatus%5Bpublished%5D~objecttype~objecttype%5Bblogpost%5D
    You can find the samples from the below link
    http://scn.sap.com/community/restful-sdk/content#filterID=contentstatus%5Bpublished%5D~objecttype~objecttype%5Bdocument%5D
    You would need to refer to the community below in case you have concerns about Rest SDKs.
    http://scn.sap.com/community/restful-sdk
    Thanks,
    Prithvi

  • Using Java 5, how to develop customizable web-pages  like iGoogle ?

    Is it possible to develop customizable web-pages like iGoogle does, using Java 5 ( simply using JSPs, servlets, JSFs, AJAX etc. and without using portals) ?
    A simple example explaining how to provide 3-4 header graphics options ( like igoogle does) will be helpful. (iGoogle seems to create a cookie, which appears to be used to render the selected header-graphics).
    TIA
    Edited by: DevelopingJava2005 on Jul 7, 2008 9:36 AM

    Without using portals?
    Google uses RSS feeds to compile their mashups on iGoogle. The positioning of those boxes are managed with AJAX and upon placement are saved into a session so they stay there for each visit after.
    Please be a little more clear as to what you are looking for. Yes, it is possible to develop web pages using the technologies you specified to simulate something like iGoogle, so give us some more details on what exactly you're looking for.
    Code wouldn't hurt either.

  • Update database logon in reports using java

    Please review the code below and let me know where did I go wrong! I am able to login to CMS and able to retrieve the list of reports. Now, I am trying to update the database credentials for a single report using java (My requirement is to update all 200 reports though!).
    This is the 100th time I go this error message: Failed to open the connection.report.lib.ReportSDKServerException: Failed to open the connection.
    I also wrote a sample java program which tries to connect to the sql server database with same login credentials - this works perfectly fine. But, if I use the same connection url, driver name and login credentials, this report fails to update for whatever reason. Please help me ASAP..Thanks!
    import com.crystaldecisions.sdk.exception.*;
    import com.crystaldecisions.sdk.framework.*;
    import com.crystaldecisions.sdk.occa.infostore.*;
    import com.crystaldecisions.sdk.occa.managedreports.*;
    import com.crystaldecisions.sdk.occa.report.application.*;
    import com.crystaldecisions.sdk.occa.report.data.*;
    import com.crystaldecisions.sdk.occa.report.lib.*;
    import java.util.Iterator;
    class ChangeDataSource {
        public static void main(String args[]){
             String cms = "134.X.X.X:6400";
             String username = "Administrator";
             String password = "";
             String auth = "secEnterprise";
             IEnterpriseSession enterpriseSession = null;
             ISessionMgr sessionMgr = null;//CrystalEnterprise.getSessionMgr();   
             Exception failure = null;
             boolean loggedIn = true;
             ReportClientDocument clientDoc = null;
             if (enterpriseSession == null)
              try
                  sessionMgr = CrystalEnterprise.getSessionMgr();
                  enterpriseSession = sessionMgr.logon(username, password, cms, auth);
                  System.out.println("\nLOGIN SUCCESSFUL\n");
              catch (Exception error)
                  loggedIn = false;
                  failure = error;
              if (!loggedIn)
                   System.out.println("\nLOGIN FAILED\n");
              else
                  // Query for the sample report from the Enterprise CMS.
                  try {
                        IInfoStore iStore = (IInfoStore) enterpriseSession.getService("InfoStore");
                        IInfoObjects infoObjects = iStore.query("Select SI_ID From CI_INFOOBJECTS Where SI_INSTANCE=0 AND SI_PARENT_FOLDER=771");
                        System.out.println("\ninfoObjects size = "+infoObjects.getResultSize());
                        IReportAppFactory reportAppFactory = (IReportAppFactory)enterpriseSession.getService("RASReportFactory");
                        IInfoObject infoObject = (IInfoObject)infoObjects.get(0);      
                        clientDoc = new ReportClientDocument();
                        clientDoc = reportAppFactory.openDocument(infoObject,0, java.util.Locale.US);
                        System.out.println("Report "+ infoObject.getTitle() +" Opened");     
                        switch_tables(clientDoc.getDatabaseController());
                   }catch(ReportSDKException re){                    
                        re.printStackTrace();
                   }catch(SDKException re){
                        re.printStackTrace();
         private static void switch_tables(DatabaseController databaseController) throws ReportSDKException {
              //Declare the new connection properties that report's datasource will be switched to.
              //NOTE: These are specific to using JDBC against a particular MS SQL Server database.  Be sure to use the
              //DisplayConnectionInfo sample to determine what your own connection properties need to be set to.
              final String TABLE_NAME_QUALIFIER = "dbname.dbo.";
              final String DATABASE_NAME = "dbname";
              final String DBUSERNAME = "userid";
              final String DBPASSWORD = "pword";
              final String SERVERNAME = "134.X.X.X";
              final String CONNECTION_URL = "jdbc:sqlserver://134.X.X.X:1433;DatabaseName=dbname";
              final String DATABASE_CLASS_NAME = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
              final String DATABASE_DLL = "crdb_jdbc.dll";
              //Obtain collection of tables from this database controller.
              Tables tables = databaseController.getDatabase().getTables();
              System.out.println("\nTables size = "+tables.size());
              //Set the datasource for all main report tables.
              for (int i = 0; i < tables.size(); i++) {
                   //ITable currTable = tables.getTable(i);     
                   ITable table = tables.getTable(i);
                   //Keep existing name and alias.
                   table.setName(table.getName());
                   table.setAlias(table.getAlias());
                   //System.out.println("Table Name = "+table.getName()+" Alias "+table.getAlias());
                   //Change properties that are different from the original datasource.
                   table.setQualifiedName(TABLE_NAME_QUALIFIER + table.getName());
                   System.out.println(table.getQualifiedName());
                   //Change connection information properties.
                   IConnectionInfo connectionInfo = null;
                   try{
                        connectionInfo = table.getConnectionInfo();
                        //System.out.println("conn info: "+connectionInfo);
                   }catch(Exception re) {
                        re.printStackTrace();
                   //Set new table connection property attributes.
                   PropertyBag propertyBag = new PropertyBag();
                   //Overwrite any existing properties with updated values.
                   propertyBag.put("Trusted_Connection", "false");
                   propertyBag.put("Connection URL", CONNECTION_URL);
                   propertyBag.put("Database Class Name", DATABASE_CLASS_NAME);
                   propertyBag.put("Server", SERVERNAME);
                   //propertyBag.put("Database Name", DATABASE_NAME);
                   propertyBag.put("Server Type", "JDBC (JNDI)");
                   //propertyBag.put("URI", null);
                   propertyBag.put("Use JDBC", "true");
                   propertyBag.put("Database DLL", DATABASE_DLL);
                   connectionInfo.setAttributes(propertyBag);
                   System.out.println("\n Properties SET\n");
                   //Set database username and password.
                   //NOTE: Even if these the username and password properties don't change when switching databases, the
                   //database password is *not* saved in the report and must be set at runtime if the database is secured. 
                   connectionInfo.setUserName(DBUSERNAME);
                   connectionInfo.setPassword(DBPASSWORD);
                   connectionInfo.setKind(ConnectionInfoKind.SQL);
                   table.setConnectionInfo(connectionInfo);
                   //Update old table in the report with the new table.
                   try {
                        databaseController.setTableLocation(table, tables.getTable(i));               
                        }catch(ReportSDKException re) {
                        re.printStackTrace();
                   System.out.println("\n All tables updated\n");

    I have exactly same error. I can confirm that CRJavaHelper.changeDataSourceReportClientDocument clientDoc,
                    String reportName, String tableName,
                    String username, String password, String connectionURL,
                    String driverName,String jndiName)
    has very slow performance.
    Obviously the line:
                        clientDoc.getDatabaseController().setTableLocation(origTable, newTable);
    works very slow. I also have JDBC defined in report and also stored procedure, that returns recordset (cursor) in 0.48 sec.
    I am using CR Reports Server XI R2 and custom JAVA client program that renders report to pdf.
    Lines from java program:
    rpt = new ReportClientDocument();
    String report = "C:
    temp
    CrystalReport1.rpt";
    rpt.open(report, com.crystaldecisions.sdk.occa.report.application.OpenReportOptions._openAsReadOnly);
    CRJavaHelper.changeDataSource(rpt, "The specified item was not found.", "", "jdbc:oracle:thin:@oratest:1521:oratest","oracle.jdbc.driver.OracleDriver", "");
    CRJavaHelper.addDiscreteParameterValue(rpt, "", "P_INET_ID", id);
    rpt.refreshReportDocument();
    PDFExportFormatOptions pdfOptions = new PDFExportFormatOptions();
    ExportOptions exportOptions = new ExportOptions();
    exportOptions.setExportFormatType(ReportExportFormat.PDF);
    exportOptions.setFormatOptions(pdfOptions);
    InputStream is = rpt.getPrintOutputController().export(exportOptions);

  • How to open Word Document using java?

    Respected Sir/ Madam,
    I am doing my project in Network Security using java. I have to transfer the files from server to the client. Each transferred file should have some of the access privileges such as read, write and exeucte. If the transferred file is a word document means then automatically the client should open Microsoft word and if the file is having Read Permission alone then the save, Save As, cut,copy, paste options in the MS - Word should be disabled. This is similar for all the files that i have transferred. That is if the transferred file is excel, audio, video,txt file the corresponding application should be opened properly. How could I acheive this. If the file is having write permission then if the user clicks the save option then the contents of the file should be saved in the server machine not in the client machine, Could we achieve this???? Can anyone help me regarding this? Please give me your views about this query?

    Respected Sir / Madam,
    Thank you very much for your reply. Could we use Microsoft API inside java program to achieve my doubts?? Could U explain it more????

  • Need help on processing XML doc using Java store procedure

    I am currently working on project to read, parse XML document and store data in XML document into database columns. I use JAVA API-OracleXMLSave in my java store procedure to do it, which use URL of XML doc to read, parse doc and store the data to database columns. My java store procedure works fine when XML doc is saved in server, but got "ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException: No such file or directory" if XML doc is in client's PC instead of in server. I think the problem comes from the URL that created using OracleXMLSave
    --createURL(fileName) based on the filename. what will be the filename if XML document located in Client PC like C:\myprojects\xmldoc.xml?
    Thank you in advance if anyone can give some hints.

    I am currently working on project to read, parse XML document and store data in XML document into database columns. I use JAVA API-OracleXMLSave in my java store procedure to do it, which use URL of XML doc to read, parse doc and store the data to database columns. My java store procedure works fine when XML doc is saved in server, but got "ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException: No such file or directory" if XML doc is in client's PC instead of in server. I think the problem comes from the URL that created using OracleXMLSave
    --createURL(fileName) based on the filename. what will be the filename if XML document located in Client PC like C:\myprojects\xmldoc.xml?
    Thank you in advance if anyone can give some hints.

  • How to do SAVE AS DRAFT using java mail api

    Hello,
    I want to know how to do SAVE AS DRAFT using Java mail Api.
    thanks

    Hello,
    I want to know how to do SAVE AS DRAFT using Java
    mail Api.
    thanksI don't think you can. That sounds like a feature of a mail client app itself. The Java mail API is for when you're ready to actually send the thing. Saving drafts is storing them somewhere like you would any other data; nothing to do with the mail API.

  • Capturing Screen using java

    Hi,
    Is there anyway I can do a printscreen using java and then send the image over the network?
    axlrose82

    hi,
    I'm using java.awt.robot to do a print screen and trying to save the image or sending it over the network.
    I tried to use applets but I got a "XTEST extension not installed on this X server: Error 0". Have you any idea how I can get around this?
    Thanks for the help.
    Sri.
    My code for the applet is as follows:
    import java.io.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.Robot;
    import com.sun.image.codec.jpeg.*;
    import java.awt.*;
    import java.awt.Image.*;
    import java.awt.image.BufferedImage;
    import javax.imageio.*;
    import javax.imageio.stream.FileImageOutputStream;
    import java.util.*;
    public class CaptureScreen extends JFrame{
    JButton button1 = new JButton("ScreenCapture");
    JButton button2 = new JButton("Quit");
    Image img = null;
    JFrame jframe = null;
    JLabel jl = null;
    ActionListener al = new ActionListener(){
         public void actionPerformed(ActionEvent e){
              String id = ((JButton)e.getSource()).getText();
              if(id.equals("ScreenCapture")){
              System.out.println("Screen capture button pressed");
              getImage();
              else if(id.equals("Quit")){
              jframe.dispose();
              System.exit(0);
    public void getImage(){
         System.out.println("Getting Image");
         try {
         Robot robot = new Robot();
         // Capture the whole screen
         area = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
         BufferedImage bufferedImage = robot.createScreenCapture(area);
         Image image = toImage(bufferedImage);
         jl.setText("get image");
         try
              { // this try set turns the image into a jpg that is saved to the hard drive in the program dir.
              FileOutputStream output = new FileOutputStream("Screen.jpg");
              JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(output);
              encoder.encode(bufferedImage);
              output.flush();
              output.close();
         catch(IOException e)
         catch (AWTException awte) {
         awte.getMessage();
         //repaint();
    // This method returns an Image object from a buffered image
    public static Image toImage(BufferedImage bufferedImage) {
    return Toolkit.getDefaultToolkit().createImage(bufferedImage.getSource());
    public void paint(Graphics g){
    public void Startproc(){
         Container cp = getContentPane();
         jframe = new JFrame();
         jframe.setSize(500,500);
         jframe.setLocation(10,100);
         JPanel jp1 = new JPanel();
         JPanel jp2 = new JPanel();
         jl = new JLabel("Hello");
         cp.setLayout(new FlowLayout());
         button1.addActionListener(al);
         button2.addActionListener(al);
         jp1.add(button1);
         jp1.add(button2);
         jp2.add(jl);
         cp.add(jp1);
         cp.add(jp2);
    public static void main(String[] args){
         CaptureScreen capturescr = new CaptureScreen();
         capturescr.Startproc();
         capturescr.setSize(500,500);
         capturescr.setVisible(true);

  • Read Text file using Java Script

    Hi,
    I am trying to read a text file using Java Script within the webroot of MII as .HTML file. I have provided the path as below but where I am not able to open the file. Any clue to provide the relative path or any changes required on the below path ?
    var FileOpener = new ActiveXObject("Scripting.FileSystemObject");
    var FilePointer = FileOpener.OpenTextFile("E:\\usr\\sap\\MID\\J00\\j2ee\\cluster\\apps\\sap.com\\xapps~xmii~ear\\servlet_jsp\\XMII\\root\\CM\\OCTAL\\TestTV\\Test.txt", 1, true);
    FileContents = FilePointer.ReadAll(); // we can use FilePointer.ReadAll() to read all the lines
    The Error Log shows as :
    Path not found
    Regards,
    Mohamed

    Hi Mohamed,
    I tried above code after importing JQuery Library through script Tag. It worked for me . Pls check.
    Note : You can place Jquery1.xx.xx.js file in the same folder where you saved this IRPT/HTML file.
    <HTML>
    <HEAD>
        <TITLE>Your Title Here</TITLE>
        <SCRIPT type="text/javascript" src="jquery-1.9.1.js"></SCRIPT>
        <script language="javascript">
    function Read()
    $.get( "http://ldcimfb.wdf.sap.corp:50100/XMII/CM/Regression_15.0/CrossTab.txt", function( data ) {
      $(".result").html(data);
      alert(data);
    // The file content is available in this variable "data"
    </script>
    </HEAD>
    <BODY onLoad="Read()">
    </BODY>
    </HTML>

  • How to Develop a HTTP Webserver Using JAVA

    i need to develop a HTTP web server using Java. it should work like this when you run the web server giving the specific port number on command prompt , while i browse localhost :port number it should display the HTML pages where that i saved in HDD. can some one help me to do this task.....

    Anunatalie wrote:
    ... . can some one help me to do this task.....
    Yes

  • I am trying to use java  file as Model layer and jsf as presentation layer

    I am trying to use java file as Model layer and jsf as presentation layer and need some help
    I successfully get the value of h:outputText from java file by doing simple binding operation but I am facing problems when I am trying to fill h:dataTable
    I create java file
    package oracle.model;
    import java.sql.;*
    import java.util.;*
    *public class TableBean {*
    Connection con ;
    Statement ps;
    ResultSet rs;
    private List perInfoAll = new ArrayList();
    *public List getperInfoAll() {*
    perInfoAll.add(0,new perInfo("name","username","blablabla"));
    return perInfoAll;
    *public class perInfo {*
    String uname;
    String firstName;
    String lastName;
    *public perInfo(String firstName,String lastName,String uname) {*
    this.uname = uname;
    this.firstName = firstName;
    this.lastName = lastName;
    *public String getUname() {*
    return uname;
    *public String getFirstName() {*
    return firstName;
    *public String getLastName() {*
    return lastName;
    right click on the file and choose 'create data control'
    then i wrote the jsf file:
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<f:view>*
    *<h:dataTable id="dt1" value="#{bindings.perInfoAll}"*
    var="item" bgcolor="#F1F1F1" border="10"
    cellpadding="5" cellspacing="3" rows="4" width="50%"
    dir="LTR" frame="hsides" rules="all"
    *>*
    *<f:facet name="header">*
    *<h:outputText value="This is 'dataTable' demo" id="ot6"/>*
    *</f:facet>*
    *<h:column id="c2">*
    *<f:facet name="header">*
    *<h:outputText value="First Name" id="ot1"/>*
    *</f:facet>*
    *<h:outputText style="" value="#{item.firstName}"*
    id="ot2"/>
    *</h:column>*
    *<h:column id="c4">*
    *<f:facet name="header">*
    *<h:outputText value="Last Name" id="ot9"/>*
    *</f:facet>*
    *<h:outputText value="#{item.lastName}" id="ot8"/>*
    *</h:column>*
    *<h:column id="c3">*
    *<f:facet name="header">*
    *<h:outputText value="Username" id="ot7"/>*
    *</f:facet>*
    *<h:outputText value="#{item.uname}" id="ot4"/>*
    *</h:column>*
    *<f:facet name="footer">*
    *<h:outputText value="The End" id="ot3"/>*
    *</f:facet>*
    *</h:dataTable>*
    *</center>*
    *</af:document>*
    *</f:view>*
    but nothing is appear in my table
    I know that there is something wrong in calling the binding object
    I need help pls and where can i find some help to deal with another tag types
    thanks

    i dragged the "perInfoAll" from my "Data Controls" and choosed adf table (even I know that new table with adf tags well be generated and i want table with jsf tags)
    and this code is generated
    *<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"*
    *"http://www.w3.org/TR/html4/loose.dtd">*
    *<%@ page contentType="text/html;charset=UTF-8"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>*
    *<f:view>*
    *<af:document id="d1">*
    *<af:messages id="m1"/>*
    *<af:form id="f1">*
    *<af:table value="#{bindings.perInfoAll1.collectionModel}" var="row"*
    *rows="#{bindings.perInfoAll1.rangeSize}"*
    *emptyText="#{bindings.perInfoAll1.viewable ? 'No data to display.' : 'Access Denied.'}"*
    *fetchSize="#{bindings.perInfoAll1.rangeSize}"*
    *rowBandingInterval="0"*
    *selectionListener="#{bindings.perInfoAll1.collectionModel.makeCurrent}"*
    *rowSelection="multiple" id="t1">*
    *<af:column sortProperty="uname" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.uname.label}"*
    *id="c1">*
    *<af:inputText value="#{row.bindings.uname.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.uname.label}"*
    *required="#{bindings.perInfoAll1.hints.uname.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.uname.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.uname.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.uname.tooltip}"*
    *id="it3">*
    *<f:validator binding="#{row.bindings.uname.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="firstName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.firstName.label}"*
    *id="c2">*
    *<af:inputText value="#{row.bindings.firstName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.firstName.label}"*
    *required="#{bindings.perInfoAll1.hints.firstName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.firstName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.firstName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.firstName.tooltip}"*
    *id="it2">*
    *<f:validator binding="#{row.bindings.firstName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="lastName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.lastName.label}"*
    *id="c3">*
    *<af:inputText value="#{row.bindings.lastName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.lastName.label}"*
    *required="#{bindings.perInfoAll1.hints.lastName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.lastName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.lastName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.lastName.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{row.bindings.lastName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *</af:table>*
    *</af:form>*
    *</af:document>*
    *</f:view>*
    but when run it i see the following errors
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    :(

  • Using Java, How can I Update, Add, Delete nodes in XML Files.

    Hi,
    I want to store the student record (like Name, Age, school name, total mark etc.,) as nodes in the XMLfile. Also I should able to Update, Add, Delete any nodes (student record) in the XML file. How can I achieve this...using Java
    I am able to read the content of the xml file using xml-parser. But my problem is
    updating the xml file.
    pls suggest some solutions or links with " example source code"
    Thanks :-)

    There are 2 kinds of XML parsers : SAX and DOM. DOM seems to suit your need. You can use JAXP APIs to add, delete or change nodes or attributes.
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/TOC.html provides contents that would satisfy most of the needs.
    To save a DOM modified XML file use java IO APIs to write to the same file from which it was read using a Document object ( doc.getNodeValue() ).

Maybe you are looking for