Search Results

Search found 6 results on 1 pages for 'shilpa'.

Page 1/1 | 1 

  • ckeditor: toggle button in facelets

    - by Shilpa
    I am trying to toggle between CKEditor and textarea in a facelet(.xhtml) file. I have used the same code in a jsp file and it works fine. But in .xhtml file its not doing the toggle between ckeditor and plain editor.It loads ckeditor both the times.Can anyone please let me know what am I missing. Code of xhtml file: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ckeditor="http://ckeditor.com"> <head> <title>Welcome PAge</title> <script type="text/javascript" src="ckeditor/ckeditor.js"></script> <script type="text/javascript" src="ckeditor/adapters/jquery.js"></script> <script type="text/javascript" src="ckeditor/config.js"></script> </head> <body> <div>Welcome Page!!</div> <h:form> <center><p><h:outputText value="#{userBean.username} logged in"/></p></center> <center> <p> Questions: <h:inputTextarea id="editor1" class="ckeditor" rows="20" cols="75" /> <br></br> </p> </center> <h:commandButton value="Ckeditor" onclick="ckeditor.replace('editor1');" /> <h:commandButton value="Text editor" onclick="ckeditor.instances.editor1.destroy();" /> <h:commandButton value="Get Data" onclick="alert(ckeditor.instances.editor1.getData());" /> <br></br> <br></br> </h:form> </body> </html> Thanks in advance, Shilpa

    Read the article

  • Update MySQL table using data from a text file through Java

    - by Karthi Karthi
    I have a text file with four lines, each line contains comma separated values like below file My file is: Raj,[email protected],123455 kumar,[email protected],23453 shilpa,[email protected],765468 suraj,[email protected],876567 and I have a MySQL table which contains four fields firstname lastname email phno ---------- ---------- --------- -------- Raj babu [email protected] 2343245 kumar selva [email protected] 23453 shilpa murali [email protected] 765468 suraj abd [email protected] 876567 Now I want to update my table using the data in the above text file through Java. I have tried using bufferedReader to read from the file and used split method using comma as delimiter and stored it in array. But it is not working. Any help appreciated. This is what I have tried so far void readingFile() { try { File f1 = new File("TestFile.txt"); FileReader fr = new FileReader(f1); BufferedReader br = new BufferedReader(fr); String strln = null; strln = br.readLine(); while((strln=br.readLine())!=null) { // System.out.println(strln); arr = strln.split(","); strfirstname = arr[0]; strlastname = arr[1]; stremail = arr[2]; strphno = arr[3]; System.out.println(strfirstname + " " + strlastname + " " + stremail +" "+ strphno); } // for(String i : arr) // { // } br.close(); fr.close(); } catch(IOException e) { System.out.println("Cannot read from File." + e); } try { st = conn.createStatement(); String query = "update sampledb set email = stremail,phno =strphno where firstname = strfirstname "; st.executeUpdate(query); st.close(); System.out.println("sampledb Table successfully updated."); } catch(Exception e3) { System.out.println("Unable to Update sampledb table. " + e3); } } and the output i got is: Ganesh Pandiyan [email protected] 9591982389 Dass Jeyan [email protected] 9689523645 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1 Gowtham Selvan [email protected] 9894189423 at TemporaryPackages.FileReadAndUpdateTable.readingFile(FileReadAndUpdateTable.java:35) at TemporaryPackages.FileReadAndUpdateTable.main(FileReadAndUpdateTable.java:72) Java Result: 1 @varadaraj: This is the code of yours.... String stremail,strphno,strfirstname,strlastname; // String[] arr; Connection conn; Statement st; void readingFile() { try { BufferedReader bReader= new BufferedReader(new FileReader("TestFile.txt")); String fileValues; while ((fileValues = bReader.readLine()) != null) { String[] values=fileValues .split(","); strfirstname = values[0]; // strlastname = values[1]; stremail = values[1]; strphno = values[2]; System.out.println(strfirstname + " " + strlastname + " " + stremail +" "+ strphno); } bReader.close(); } catch (IOException e) { System.out.println("File Read Error"); } // for(String i : arr) // { // } try { st = conn.createStatement(); String query = "update sampledb set email = stremail,phno =strphno where firstname = strfirstname "; st.executeUpdate(query); st.close(); System.out.println("sampledb Table successfully updated."); } catch(Exception e3) { System.out.println("Unable to Update sampledb table. " + e3); } }

    Read the article

  • UnknownHostException while redirecting queries to google and getting results in JSon object

    - by shilpa
    Loading classifier from D:\PROJECT\classifiers\NERDemo\classifiers\ner-eng-ie.crf-3-all2008.ser.gz ... done [2.0 sec]. Original Query was riot in India. Parsing Queries and expanding tokens from the Ontologies.. {locations=[India], events=[riot]} Search query is null Something went wrong... java.net.UnknownHostException: ajax.googleapis.com at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at org.girs2.SearchHandler.makeQuery(SearchHandler.java:35) at org.girs2.GIRS.search(GIRS.java:37) at org.girs2.GIRS.main(GIRS.java:62) Exception in thread "main" java.lang.NullPointerException at org.girs2.GIRS.search(GIRS.java:44) at org.girs2.GIRS.main(GIRS.java:62)

    Read the article

  • Compresing View

    - by shilpa
    Hi all, in "iPhone tips" app when u scroll view from right to left,thay have show view being comppresed.It gives the effect like when u will open pages in book.Like when u go go next next page in a note book.How to achive this.Including the fonts in page will also get compressed.How to achive this.

    Read the article

  • UI design for screen which has number of data entry textFields.

    - by shilpa
    Hi all, my app is an e-commerce application. During the checkout process, I have "recipient" and "credit card" screens. In the recipient screen, there are number of fields for address entry, which makes it very clumsy. Same in the case of the credit card screen, where the user is asked to enter their credit card info and billing address. Can anyone suggest how to design these two pages?

    Read the article

1