My problem is that the validation is not working well in interactive grid in my application. I have tried all the possible ways, but nothing is working. The validation works well in the interactive report, but not with the interactive grid.
The problem is that the error message keeps appear even if the data is correct. EX: if the validation condition is "Column is not null", the error message is shown even if I fill the column with data.
..
Another thing, if I made the option of value required on, the same problem appears.
Is their anything to do?
I'm curious about how the validation worked for Interactive Report, anyway here's an example about how to create page validations:
In your Interactive Grid Page, navigate to validations and make sure that editable region and column are set up correctly.
When you run the page, you'll be able to see the error message when column is null. Once the column has a value, it will possible to save the changes.
I'm doing what the solution states, however, the error notification message "1 Error has ocurred" followed by the validation error message doesn't show up, I just get a red frame with an X icon on the field, and when saving, it just shows a notification message "Correct errors before saving". For the validations, The editable region and column are set up correctly, just like on the example image.
Related
I am using Selenium to automate app creation test. The test includes filling out fields on a web page and clicking a submit button. Once that is done, a new page loads with an alert stating success or failure. The problem for me is, the alert is coded in a css class as follows:
<div class="alert-box notice">
Successfully created application
×
</div>
All I need to do is verify the text "Successfully created application" exists. I do not need to manipulate anything.
I'm not sure what language you are doing, but basically, you need to get the text in the containing div.
So, for example,
driver.findElement(By.cssSelector(".alert-box.notice")).getText()
After some discussion with my peers and much online research, here is the solution I found.
At first I tried capturing the text based on Nathan's suggestion, but decided to store the results as a string.
String happy = driver.findElement(By.className("alert-box notice")).getText();
assertEquals(true, happy.contains("Successfully"));
The problem with this is that I kept getting errors such as, "org.openqa.selenium.InvalidSelectorException: The given selector alert-box notice is either invalid or does not result in a WebElement. The following error occurred:
InvalidSelectorError: Compound class names not permitted"
Since I have no control over the class name, I went the xpath route as follows:
String happy = driver.findElement(By.xpath("html/body/div/div[2]/div/div/div/div[3]/div")).getText();
assertEquals(true, happy.contains("Successfully"));
This version runs correctly and I am able to verify the alert message.
I'm getting the following error when I try to run an ASP.Net page. It just popped up during development, and I don't know what the cause is.
"OverflowException Occurred. Value was either too large or too small for an Int32."
The line the debugger breaks on is of absolutely no help at all
Dim ApproxDate As TextBox = FormView1.FindControl("CurrentResultDateTextBox")
The error is occurring on this line because calling findControl on FormView1 causes it to databind (executes a SQL query to return the dataset). I assume the error lies somewhere in one of the object data sources or possibly one of the grid views on the page, but the debugger won't tell me where. Most of the page data sources are bound declaratively (specified in ASP tags in the source)
Pressing F11 to run past the exception displays the following:
"13712696100373320501120906 is not a valid value for Int32."
The value being shown here is the primary key for the main SQL table used by the page. There are about 10 data sources which use this field. Again, there's no indication of where exactly the error is occurring.
So how can I debug an error like this? Are there commands I can run? IIS error logs? 3rd party software to capture the error? I'll take anything I can get
Managed to find the problem. The trick is to first disable "just my code" in the IDE/Debug settings. Then you can see the system functions on the call stack, and while there is no source code, you can click on these functions to unwind the stack to one of the web controls (in this case the ListControl.PerformSelect function)
If you check the auto variables in the debug window, it will show the control involved in the error. From there I added a watch on the ID property to see which control it was, looked up the data source that feeds it, and found the error.
You can also unwind the stack to the ObjectDataSourceView, look at the dataTable property, and call GetErrors() to see the issues. This returns an array of data rows which are flagging errors; The property RowError will show the error message for any given row.
I am trying to create a graph out of a data control that I have created. The graph named myNewGraph is not showing up when I run my website, but when I preview the graph itself it is perfect.
JDeveloper autogenerates the graph, it generates this code, notice the value:
<dvt:comboGraph id="comboGraph2" shortDesc="PriceMetrics"
value="#{bindings.myNewGraph.graphModel}"
subType="COMBINATION_VERT_ABS_2Y" customLayout="CL_NONE>
I have another graph I have created that has a similar code make-up. This one works perfectly.
<dvt:comboGraph id="comboGraph1" shortDesc="PriceMetrics"
value="#{bindings.existingGraph.graphModel}"
subType="COMBINATION_VERT_ABS" customLayout="CL_NONE"
I believe it has something to do with the value, that is causing my myNewGraph to not work. Because when I replace it with the value of existingGraph, the graph displays, but it doesn't display the correct data, since it has the same value.
How do I generate the value in bindings.myNewGraph.graphModel because I believe that it doesn't technically exist.
Are you sure the preview in the editor showed the real graph data ? from the description you give it sounds as if your data isn't queried. I suggest you debug the business service you expose in the data control to see if there is a query executed. From your description it doesn't look like a problem with the binding EL or the graph
Frank
You must import the graph bindings into the webpagePageDef.xml.
RunTime Error The Data has been changed.
I`m having a difficult time with one of my sub-forms. It used to work without complaints but I guess now it decided to be a little verbose. On this form I have a subform that has a variety of checkbox options. Whenever the user enters a checkbox option and then exits to the main form there is an On Exit Event which runs. It combines some textboxes from various forms and then puts that value in a textbox on the main form.
var1 = [Form1]![Textbox].Value
var2 = [Form2]![Textbox].Value
var3 = [Form3]![Textbox].Value
Me.[TextBox].Value = var1 & var2 & var3
For some reason upon exiting the subform I am getting the Runtime error.
The pattern is not apparent.
I can navigate from the subform to the main form without making any changes in either without receiving an error message.
If I go into the subform, make a change, exit the subform, the textbox will be updated with no complaint, however if I go back into the subform, do not make a change and then go back to the main form, then I get the runtime error
similarly after making sure that behavior 1 is true I can go into the subform, change something come back out, but if I try to go back into the subform and make an additional change I will get a complaint. (I was able to fix this by making an on enter event refresh the subform)
I am unable to get the Runtime Error fixed though... :(
I see that this is an issue for many people with no solution. Here was my work around.
From my observation the form that was having it's Textbox.value updated is somehow silently updated by either the on enter or on exit of it's subform so when the on exit action of updating that textbox occurs it complains that the main form was updated, thus leaving me to conclude that when that form is updated it is not shown to the user.
Thus, my work around is to requery the main form on the subform's exit in order to get that new data loaded and changed.
Caveat!! Requery will by default bring you back to the first record thus presenting the possibility of changing the textbox of the wrong record. Thus as part of the requerying process, if you choose this hack, you will have to bookmark the current open record, requery, and then fetch that record again. I used the code from this webpage in order to achieve the desired effect. Thus circumnavigating the 7878.
Requery and stay on record:
http://www.baldyweb.com/Requery.htm
I have a pop up window that is create in run time, and can have several text area. I need to count number of characters of its text area and show warning to users if they pass maximum number.
the application wrote by ASP.NET. I can't use "onClientClick", because I don't know the name of the text area, they created run time and I save their name in a dictionary that just have in server side.
I tried to use "RegisterStartupScript" to call java script "alert" method but it doesn't work. In fact it works but it execute all the save code and show alert after that. but I want to execute save code after user confirmation.
I think to open message box with jquery but my current windows is opening with AJAX and it won't nice to open another AJAX page.
Can You help me and show me the way to show warning, or solving my problem.
You need to use the onkeypress or onkeyup events in the text area, and use a function like this to show the warning:
onkeypress="checkLength(this, 200);"
And the JavaScript function:
checkLength = function(input, maxLength){
if (input.value.length > maxLength)
alert('Length exceeds maximum');
}