The edit JSP page does not appear...

Hi!
I make a simple JSF application, I would like to show a DB table in a h:dataTable component and edit a given row after click, but the edit JSP page does not appear. I click the on link in the table, but the list is loaded again and not the edit page...:(
(no exception in application server console)
Please help me!
my code:
**************************************** listmydata.jsp***************************
               <h:dataTable
                         value="#{myBean.myDataList}"
                         var="myDataItem"
                         binding="#{myBean.myDataTable}"
               >
                    <h:column>
                         <f:facet name="header">
                              <h:outputText value="Ajdi"/>
                         </f:facet>
                         <h:commandLink action="#{myBean.editMyData}">
                              <h:outputText value="#{myDataItem.id}"/>
                         </h:commandLink>
                    </h:column>
********************************* MyBean.java *******************************
package bean;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import javax.faces.component.html.HtmlDataTable;
import javax.faces.context.FacesContext;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import wrapper.MyData;
public class MyBean {
     private List myDataList;
     private HtmlDataTable myDataTable;
     private MyData myDataItem;
     protected Connection Conn;
     // *********************** actions ***********************
     public String editMyData() {
          myDataItem = (MyData)getMyDataTable().getRowData();
          return "editmydata";
     public String saveMyData() {
          try {
               updateDataInDB();
          catch (SQLException e) {
               System.out.println(e);
               System.err.println(e);
               e.printStackTrace();
          catch (NamingException e) {
               System.out.println(e);
               System.err.println(e);
               e.printStackTrace();
          return "listmydata";
     // *********************** setter ***********************
     public void setMyDataList(List myDataList) {
          this.myDataList = myDataList;
     public void setMyDataTable(HtmlDataTable myDataTable) {
          this.myDataTable = myDataTable;
     public void setMyDataItem(MyData myDataItem) {
          this.myDataItem = myDataItem;
     // *********************** getter ***********************
     public List getMyDataList() {
          if (myDataList == null || FacesContext.getCurrentInstance().getRenderResponse()) {
               loadMyDataList();
          return myDataList;
     public HtmlDataTable getMyDataTable() {
          return myDataTable;
     public MyData getMyDataItem() {
          return myDataItem;
     // *********************** others ***********************
     public void loadMyDataList() {
          try {
               getDataFromDB();
          catch (NamingException e) {
               System.out.println(e);
               System.err.println(e);
               e.printStackTrace();
          catch (SQLException e) {
               System.out.println(e);
               System.err.println(e);
               e.printStackTrace();
     void getDataFromDB() throws NamingException, SQLException {
          myDataList = new ArrayList();
          java.sql.PreparedStatement PreStat = ownGetConnection().prepareStatement("SELECT id, name, value FROM BEA_JSF_SAMPLE");
          PreStat.execute();
          java.sql.ResultSet Rs = PreStat.getResultSet();
          while(Rs.next()) {
               MyData OneRecord = new MyData();
               OneRecord.setId(Rs.getLong(1));
               OneRecord.setName(Rs.getString(2));
               OneRecord.setValue(Rs.getString(3));
               myDataList.add(OneRecord);
     void updateDataInDB() throws SQLException, NamingException {
          String sql = new String("UPDATE BEA_JSF_SAMPLE SET name=?,value=? WHERE id=?");
          java.sql.PreparedStatement PreStat = ownGetConnection().prepareStatement(sql);
          PreStat.setString(1,myDataItem.getName());
          PreStat.setString(2,myDataItem.getValue());
          PreStat.setLong(3,myDataItem.getId().longValue());
          PreStat.execute();
          ownGetConnection().commit();
     Connection ownGetConnection() throws SQLException, NamingException {
          if (Conn == null) {
               InitialContext IniCtx = new InitialContext();
               DataSource Ds = (DataSource)IniCtx.lookup("JDBCConnectToLocalhost_CRS");
               Conn = Ds.getConnection();
          return Conn;
******************************* editmydata.jsp *****************************
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<html>
<body>
<f:view>
<h:form>
     <h:panelGrid columns="2">
          <h:outputText value="Name"/>
          <h:inputText id="name" value="#{myBean.myDataItem.name}"/>
          <h:outputText value="Value"/>
          <h:inputText id="value" value="#{myBean.myDataItem.value}"/>
     </h:panelGrid>
     <h:commandButton action="#{myBean.saveMyData}" value="Save"/>
</h:form>
</f:view>
</body>
</html>

I have put his lines in the faces-config.xml and now it works:
     <navigation-rule>
          <from-view-id>*</from-view-id>
          <navigation-case>
               <from-outcome>editmydata</from-outcome>
               <to-view-id>editmydata.jsp</to-view-id>
          </navigation-case>
     </navigation-rule>
     <navigation-rule>
          <from-view-id>*</from-view-id>
          <navigation-case>
               <from-outcome>listmydata</from-outcome>
               <to-view-id>listmydata.jsp</to-view-id>
          </navigation-case>
     </navigation-rule>
I don't understand, that I define the next JSP page in the bean java file, which must be shown, but I must define this in the faces-config.xml as well.
for example:
     public String editMyData() {
          myDataItem = (MyData)getMyDataTable().getRowData();
          return "editmydata";
is it right or Do I make a mistake somewhere?

Similar Messages

  • The music search on the I tunes store does not appear after the latest upgrade to my I phone 4

    The music search feature on the I Tunes store does not appear.  Unable to search since the latest upgrade.

    If you're sure where your library is run this script iTunesXMLPath. The library folder is the folder that file is in. Your media folder is recorded under Edit > Preferences > Advanced and is usually a subfolder of the library folder.
    I recommend you backup your library with the method in this user tip.
    tt2

  • The application called VirusScan that comes preloaded on the macbook will no longer open, claiming that it is corrupt and that I must reinstall it.  After looking in the app store it does not appear that said application is available for re-downloading.

    The application called VirusScan that comes preloaded on the macbook will no longer open, claiming that it is corrupt and that I must reinstall it.  After looking in the app store it does not appear that said application is available for re-downloading. Is there a special, non-app store place where I am to go for this?
    Also, I installed MacKeeper about two-three months ago and am questioning its performance. Looking for input as to whether or not this application helps or hinders my system.

    I'll back up Csound on the MacKeeper thing.  In fact, I actually wrote the following about it:
    http://www.reedcorner.net/news.php/?p=245
    Remove is ASAP.  Do not use the provided uninstalled, as there are widespread reports of pop-ups advertising MacKeeper on your system after incompletely removing it.  Try this:
    http://applehelpwriter.com/2011/09/21/how-to-uninstall-mackeeper-malware/
    As for VirusScan, Barney is right on the money that it does not come preinstalled on any Mac shipped new from Apple.  However you have gotten it, your best bet is removing it.  See my Mac Malware Guide for more information that will help you understand and avoid Mac malware without relying on anti-virus software.
    http://www.reedcorner.net/guides/macvirus
    (Note that my pages contain links to other pages that promote my services, and this should not be taken as an endorsement of my services by Apple.)

  • HT2731 I have a student who is trying to set up an account however it is asking for Credit Card information.  The choice of NONE does not appear as an option with the credit cards.  Any assistance?

    I have a student trying to set up an App Store account (she has an Apple ID), however she is being asked for credit card information.  The option of NONE does not appear as one of the choices with the other credit cards.
    Any assistance?

    There are instrctions on this page for how to create a new account (it won't work with existing account) without giving a credit card number : http://support.apple.com/kb/HT2534 e.g. select a free app in the store and click on 'create Apple id' when 'buying' it.

  • Mac user, OSX 10.9.4. CS6, in the new Blur gallery the pin with adjusters does not appear for any of the three blur filters. This may have occurred since taking adobe watermark add-on and updating Bridge. any ideas?

    Mac user, OSX 10.9.4. CS6, in the new Blur gallery the pin with adjusters does not appear for any of the three blur filters. This may have occurred since taking adobe watermark add-on and updating Bridge. any ideas?

    I am using Mac OSX 10.10.1 (memory 8 GB 1600 MHz DDR3, graphics Nvidia GeForce GT 650M 1024 MB)
    and my version of Photoshop is CC.
    I ran into  the same problem: I am able to place and view Blur Gallery pins but the adjustment wheel or outer control arounf the pin that allows you to tweak the blur value disappeared after being initially available. Additionally, the placed pin or pins appear to flicker on screen (while in blur gallery mode) until committing the change with the OK button. I have tried restarting both the computer and Photoshop, as well as what some other users have suggested such as View>Show>Edit pins turned on. Nothing has helped so far. I am still able to adjust the blur amount  from the Blur Tools slider. thank you.

  • I am running IE 11 on Windows 7 Home Premium 64 Bit Service Pack 1. When I attempt to install Flash Player, it goes through all of the steps, tells me the player is installed, and welcomes me. I cannot open the player and it does not appear in the Start M

    I am running IE 11 on Windows 7 Home Premium 64 Bit Service Pack 1. When I attempt to install Flash Player, it goes through all of the steps, tells me the player is installed, and welcomes me. I cannot open the player and it does not appear in the Start Menu, Task Manager, System Tray, or anywhere else. When I try to open a file, the site tells me Flash player is not installed. I have even downloaded it to a separate folder and ran the install with IE shut down completely. And Shockwave in ENABLED but in 32 bit .I have been trying to get this to work for about 3 weeks now.  HELP!!!

    Flash Player is a browser add-on, not an executable program.
    If you need to open a local SWF file you will need the standalone player (Projector) from http://www.adobe.com/support/flashplayer/downloads.html
    Note that the download is the player, not an installer, so you will need to make the file association manually.

  • Under bookmarks the Organize bookmark option does not appear, new computer Firefox 4.0, and Windows 7, how to make it appear, thanks

    Under bookmarks the Organize bookmark option does not appear, new computer Firefox 4.0, and Windows 7, how to make it appear, thanks

    "Organize Bookmarks" has been renamed to "Show All Bookmarks" in the bookmarks menu.

  • Hi. Unfortunately my ethernet card was not working anymore. This is the message "This computer does not appear to have any PCI Ethernet card. How can I fix it?

    Hi. Unfortunately my ethernet card was not working anymore. This is the message "This computer does not appear to have any PCI Ethernet card. How can I fix it?

    i would try an SMC reset, the following article tells how to do this:
    http://support.apple.com/kb/HT3964
    if it still gives that message, you need to take it to apple store or apple service provider to have a new card installed. the apple site gives listings of providers and stores in your area:
    https://locate.apple.com

  • CC 2014 nik efex - My Nik Efex filters are not working in Photoshop CC 2014 - they appear under plug-ins and seem to work, but after running and clicking okay, no new layer appears - seems to have no effect.  The separate menu panel does not appear either

    My Nik Efex filters are not working in Photoshop CC 2014 - they appear under plug-ins and seem to work, but after running and clicking okay, no new layer appears - seems to have no effect.  The separate menu panel does not appear either.  Help with this?

    BINGO !!!!
    Thanks so much Woodsroad. I had the exact same problem with my Dell Windows 7 64 bit with AMD Radeon 6700 Video card.
    All the video tests passed with flying colors.
    The sniffer rename trick fixed the problem.
    Thank goodness for the internet!

  • HT1386 I have iTunes (up to date) and an iPhone 4s. When I connect it using the USB cable it does not appear in the top right corner. Other devices do and also the cable is fine as it charges and the PC sees it as a device. I've looked online and have no

    I'm new to this and I think I typed a long heading!
    Anyway the issue is I have iTunes and just updated it to the latest. I also have various Apple devices however my iPhone won't sync with iTunes. When I connect it using the USB cable it does not appear in the top right corner as does other devices. The cable is fine as it charges and also my PC sees the device. However it does not appear in iTunes so I can't sync music to it.
    I've searched the web but all asume iTunes can see the device.
    Help!?

    Hi David,
    If you are having issues with your iPhone not being recognized by iTunes on your Windows machine, you may find the troubleshooting steps in the following article helpful:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    Regards,
    - Brenden

  • Ever since my last update I have been unable to add songs from my i tunes library onto my i phone.  The "add to" button does not appear for me when I connect my i phone.  Can anyone shed some light on this for me?

    Ever since my last update I have been unable to add songs from my i tunes library onto my i phone.  The "add to" button does not appear for me when I connect my i phone.  Can anyone shed some light on this for me?

    Thanks for that 'sberman' - because my iPhone is backed-up to my work computer (only at this stage) I have had to call our IT Department in Adleaide. (4 times this morning). The last guy managed to get the phone into 'DFU Mode' - no more recovery mode screen - (kind of 'asleep' perhaps) from my understanding of same. I am awaiting a call again from IT so they can get my computer to actually recognise my iPhone on the C Drive. This also happened to  one of my colleagues in Newman (WA). She got so frustrated with the whole process that she bought another phone the next time she was in 'civilisation.' She hasn't had any problems since. (Cross fingers).
    Thanks again, Sandra2474.

  • When an image is inserted here using clipboard, it appears in the editor, but it does not appear in

    when an image is inserted here in forum po editor using clipboard, it appears in the editor, but it does not appear in the post. When the image is inserted from a file, it works

    Im not completely sure, why you are pointing out the very same thing I'm pointing out too. If you re-read my original post thoroughly, you will find - at its very end - the sentence "When the image is inserted from a file, it works". Since I'm not aware of the way how to insert the image from a file in a procedure other, then clicking the "camera" icon, I hold such a sentence for more then enough to point out, that the camera icon works fine for me (if you re-read my post thoroughly and pay detailed attention of my expression "using clipboard", then you shall definitely evaluate this expression as covering both ways an image can reach the cliboard, eg. Copying from a graphical editor/processor or dragging&dropping a graphical file).
    However more then this, your post does in fact NOT reply to the fact, why the WYSIWYG editor box allows the insertion of an image from clipboard, but then fails to upload it and thus it is not displayed in the post.
    For the sake of completness, I must also point out, that your last sentence of your post "And that's what it is there for" does not bring much clarity about that thing - while I fully understand, as one can observe from my "When the image...it works" sentence, the functionality, purpose and propper handling of the "camera" icon, I cannot agree with such a behaviour of the editor, that allows an operation to be done (What You See) that does not affect the outcoming result (Is What You Get).
    From the theory of designing (G)UIs one may learn, that in such a case the operation should either fulfill completly (eg. display the clipboard-inserted image in the resulting post) or fail completly in the beginning (when Pasting the image into the text), either silently (just not displaying the image in the editor field) or with an error warning such as "Insertion of images/bitmaps from clipboard is not permitted". For Windows-like environments (such as, but not limited to, Microsoft Explorer, KDE, Gnome, IceWm....) the change of the dragging cursor to display a kind of "No way" or "no entry" pictogram, is also advisable.
    For the sake of completness of my reaction I also might percieve your last sentence as a kind of irony or sarcasm, which however I definitely do not find appropriate behaviour, more over I might call it an "arogant rudeness" in case of such a "VIP" member with more then 9000 posts in the time when this post is being written, with a hint of overworking, malicous intends, inattention, ego-centricism or any other personal failure(s) or a combination of them, that you should - in case they are present - definitely pay attention to in your private life.
    Moreover, let me please point out, that Im not much pleased about the way this forum works with its users, since I find the bug I have discovered, only a small one (a category B one might say in the A-B-C scheme, eg. a category, that does not directly influence or prohibit the execution of the main business cases, however it may result in discomfort, data loss or operation repetition, such a category would be most possibly a category C in the A-B-C-D scheme). Therefore I must explicitly express my annoyance that you have the guts to handle the post I did like this, when - in my opinion - the post has been written in such a manner that it was merly a polite point out of a small bug, thus it was kept as brief as possible, but fully covering the description of the scenario, alternate scenarios and their outcomes. Moreover, I'm definitely displeased, that you allow yourself to post such a post, that - instead of exploring the matter - throws the whole matter on the head and inside-out, or, one may say, kicks the bucket, and forces the original author, in this case me, for re-accounting for himself, moreover the ambivalency of your post opens such many possibilities to account for, that the time and resources the self-accounting autor has to spent, heavily overweighting the importance, significance and impact of the bug itslef.
    So let me please advise you for the next time:
    - to explore posts with more thoroughness, evaluating their expressions and sentences much more deeply, rather then just glance through on their surface
    - think twice before answering and try to figure out how such answer might be percieved
    - try to do less posts, but with higher quality
    - try to employ more politeness and correct behaviour
    - approach the matter with more humble and curious attitude rather then with a "I-know-everyting-better" standpoint
    With regards
    Lukas Plachy
    Misstypes corrected by rheingold.

  • (LDOM) The file just loaded does not appear to be executable.

    Sorry if this is not the right forum - it seems to be the closest one for things about LDOMs; plese let me know if I should post somewhere else.
    I have installed LDoms_Manager-1_2.zip on a T5220 Server; following the book ("Logical Domains 1.2 Administration Guide") I set up the control domain etc, then a guest domain (cranachan) - so far all appears well. I downloaded the dvd iso of Solaris 10 (sol-10-u7-ga-sparc-dvd.iso) and added it to the guest as described, started the domain and issued "boot vdisk_iso:f -v" - this seemed to work well, but there was an error that turned out to be that I had given the wrong path for the system disk.
    So I started over - removed the guest domain and the disk definitions for both guest and control domain, and removed the guest; then recreated everything. This time, when I "boot vdisk_iso:f -v" I get:
    The file just loaded does not appear to be executable.
    Any idea what may have happened? It makes no sense to me; not unless the iso file has been corrupted, but it doesn't seem to have been modified, and I can mount it as a loop-back fs in linux.

    I have the same problem with a Netra T1 system. Solaris 10 installed fine and it won't boot. It did have Solaris 8 on the system, but I put in new drives to start my Solaris 10 install.
    I tried booting to single user cd-rom (ok boot cdrom -s) and ran this:
    # installboot /usr/platform/SUNW,UltraAX-i2/lib/fs/ufs/bookblk /dev/rdsk/c1t0d0s1
    (SUNW,UltraAX-i2 was derived from # uname -i)
    It didn't help.
    I also tried "setenv diag-switch? false" at the okay prompt. It didn't help
    Any thoughts?

  • How do i delete duplicates from my music library. After updating my iTunes the "Show Duplicates" option does not appear in the menu

    How do i delete duplicates from my music library. After updating my iTunes the "Show Duplicates" option does not appear in the menu

    If you are on Version 11.0.1 rather than 11 Apple put it back in
    View > Show Duplicates
    Option + View > Show Exact Duplicates
    so if you are on 11 upgrade to 11.0.1 and you will have it

  • After choosing my device the "add music" button does not appear.  I just downloaded ITunes 11.  Any suggestions?

    After choosing my device the "add music" button does not appear.  I just downloaded ITunes 11.  Any suggestions?

    Read the User's Guide and learn how to add content to the device.

Maybe you are looking for