Cannot get browser validation to work

  • Chris

    Chris - 2007-10-30

    I've installed everything, including the plugin, but browser validation is not working. I'm trying to create a master/detail form with Apex. I can't believe how poor support is for those tabular forms are. The out of the box wizard is horrible, and my client would never buy. So, I spent a week writing pl/sql and javascript to make it better, but it's so buggy. I'm hoping this will solve some of that.

    However, I can't get it to run. I like what I see in the demo, but I don't understand how it works. In order to use browser validation, it would have to have javascript onchange or similar for the columns. Are you generating that on the fly? I don't see them there, so I can't see how it would work. (I do see a pop-op of the error message, different from the original, it's messy still, so I think it's working, but the message is quite ugly, so perhaps it isn't installed right.) I'm sure it's hard to debug this from afar, but any idea how I can go about figuring out what is wrong? I wish I could see a working demo, I mean see the actual Apex page and how it is built, so I could compare the report fields, etc... without, I'm kind of blind.

    Thanks for your time and your apexlib.

    • Patrick Wolf

      Patrick Wolf - 2007-10-31

      Hi Chris,

      have you followed the instructions in the HowTo Install and the HowTo Integrate files? So you have added all that stuff into the Page 0 and copied the Javascript files onto your web-server?

      When you run the page in Firefox, does it show an error message in the "Tools\Error Console"? Something like apexlib not defined? Because error messages raised by the ApexLib framework should look identical as APEX error message. They are displayed inline and not in an alert.

      When you run your page in debug mode, do you see the debug messages from ApexLib? If you look into the HTML code of the generated page, you should see the ApexLib Javascript code near the end of the page.

      Note: The framework has a restriction. It can't handle regions/reports which have a condition. So you should check if your tabular form has a condition. But you should also see that in the debug output of the page.


    • Chris

      Chris - 2007-11-01

      Thanks for the reply.

      I see javascript in the page source. No errors, I'm using firebug and there's a nice green check. I did look at debug, and I didn't even notice the ApexLib calls. I think the problem is obvious, but I'm not sure how to solve it:

      Generate item data(ApexLib_Item.generateBrowserData)
      Read report column mapping(ApexLib_TabForm.init) updateable report region found on page 23
      Generate tabform data(ApexLib_TabForm.generateBrowserData)

      Looks like it thinks there is no updateable report. How does apexlib determine if it is updateable? I've altered it quite a bit, and not all columns are updateable, as some columns have data generated by java script. (Like Tax, it is calculated by a formula that is turned on by a checkbox.) But, 5 are still updateable and two are numeric, one is currency and I was trying to get validation on those...

      Anyway, thanks for the help. I'm also looking at some other javascript code I found. (I'm no javascript expert, I actually don't like UI work!) But, it can prevent non-numbers for getting in the form, which I like. I'm going to try to put it in as well...

      As an aside, I also went through the effort of creating a collection already and populating that so I could keep session info when users add rows or delete rows, and to populate one initial row. (I hate the idea of having to create the master, then apply and then the detail... ouch, so not user freindly.) One ugly thing I noticed is, I can't get the non-updateable columns from the wwv_flow.g_fxx arrays, which is really terrible. Since those are changed by javascript, I have no way of knowing what the value is and have to re-write my logic in PL/SQL just to get the value again from the columns I can get. How ugly. Plus, the integration of javascript in form design is not very friendly - they need a real IDE for this... Having worked in Oracle server side and Java server stuff, I find it odd that the web UI stuff is so poorly done still. I don't blame Apex, it's the whole industry architecture. I detest having to write complex tax code rules in the DB in Java and then having to figure out some arcane method of getting that to run on the client. I'd rather go back to client-server.

      Anyway, thanks again.


Log in to post a comment.