#22 Update data is not so good

open
NotWorking (20)
5
2011-02-24
2011-02-23
Anonymous
No

I've down load the lastest version about jspx,to be honest,it's great。
Our project have used this framework since last year,find one bug,and find it is still there now,
when the datatable searches some data from db,and has some pages,in one page,I want edit one data,and there will be below,
well,it's cool,but when i click Update,the contents below will become the first data's content anywhere,well,in my mind,I want it still has the content I had
edited.
I will upload one img about this ,hope you could know what I'm talking.

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2011-02-23

    the result of editing the second data in this page

     
  • amr eladawy

    amr eladawy - 2011-02-24

    Hi Zhaozy, glad you find jspx usful to your work. regarding the mentioned issue. I can see that you are using the new demo, is it correct.

    if so you must had changed it to allow editing. if so, can you please send me the HTML code.

    one thing you may try. that is to make sure that u have specified a primary key in the DataTable, the PK is used to tell the DataTable how to update and delete the rows.

    this is an example on using PK
    <dataPk name="id" /> the name attribute is the name of the PK column in the DB table

    Waiting to hear from u

     
  • amr eladawy

    amr eladawy - 2011-02-24
    • labels: 1164858 --> NotWorking
    • assigned_to: nobody --> amreladawy
     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2011-02-28

    hi amr.eladawy:
    I'm very glad to receive your response,maybe i didn't make the problem clear last time.
    when i update one item in the datatable(not the first item per page),if the process is successful,that's ok and the table under the datatable is missing(but i think there may be need message to tell on the browser the result is ok or not),but if there are some errors in the code,and the data is not updated successfully,the table under the datatable is still there,and the content in it will change to the first item's,not the data i want to update.

    and there is my jspx file,the controller class has nothing.

    When i using the datapk's sql,there is also one bug,my datapk is like this:
    <datapk name="id" type="sql" sql="select max(id)+1 from users" datatype="number" />
    but when i look into the src,find one error i think,the method getSqlValue(),when pk.getType().equalsIgnoreCase(DataPK.SQL_TYPE)
    is true,we should return the sql's result in the db instead of returning the original pk.getSql() only.

    About the demo2,it looks beautifuler than the demo1 of course,but there has still some bugs,for example,the work about i18n is not
    correct sometime(oh,i forget to tell you that i'm chinese,there often has bugs about that),the java code is not the same as in the db sometimes,because i use mysql,and at code there has some errors about database's name(jspx).

    my email is zhaozhongyong@msn.cn,you can also send mail to this email address,

    Yours sincerely
    zhaozy

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2011-02-28

    using the database in the demo2

     
  • amr eladawy

    amr eladawy - 2011-03-01

    Hi Zhaohy

    Let's go through the three points mentioned.

    1. There is no success message or error message while using the detailed panel (the table under the data table)

    This is a true concern in the coming builds there will be Message tag used in data Table to customize the messages(error, success) also the style, css class

    2. The reason that the SQL is used direct is to make sure that the final id is calculated exactly at the time the insertion is done. because the statement u mentioned will get the same result if it is called several times before actually inserting the new record. and you will end with unique constraint exceptions :)

    3. regarding the demo, the demo localization is made for arabic windows (cp1256) also the MySql script is encoded that way. may be it will require some effort fir chinees version :) but does this mean that you used the demo and worked for you? this cool.

    for my mail, you can use support.jspx@gmail.com and I will be replying.

    regards,
    Amr

     

Log in to post a comment.