I have a multiple tabs in a page and each tab (lets say Menu, Edit, Tools) has a couple of text field. Each field have Required Data Annotation. I have one Save Button to save all the fields from multiple tabs. Now my problem is when I am in Menu tab and without entering anything in the text box and click Save Button I got validation summary. If I move to other tab (Edit tab) without entering anything in the textbox in the File tab and I did the same thing in the Edit tab I got validation summary of the current tab (Edit tab) only but not the other one.
How can I get validation summary from all the tabs? OR
Can we validate while moving from one tab to other?
FYI, Each tab is <a href = "#tab-Menu">
Elements on your non-active tabs are most probably hidden. Bu default after version 1.9 jquery validation does not validate hidden elements (ignore: ":hidden"). You can see discussion here: https://github.com/jzaefferer/jquery-validation/issues/279
To enable validating even hidden elements, use this code:
// This will validate all tabs at once, not just current tab.
$.validator.setDefaults({
ignore: ""
});
More info on what you can specify is here http://jqueryvalidation.org/validate/
Related
I have a form where I fill in textboxes through selenium (java). Some of the textboxes dynamically generate extra content when you click on them and remove the content when you focus on something else. This is a problem when I automate because if I am focused on a text box and try to click on something else, when the page removes the content it doesn't register my click and I need to click again. This leads to flakey behaviour since I need to now consider whether I need to click or double click a button depending on what element I was focused on before.
I can't send a tab key to the text box because sometimes it will tab into another textbox that has the same dynamic generation behaviour, leading to the same scenario as before.
I tried clicking the page element but it also doesn't seem to work. I also tried clicking the root div. It just doesn't seem to register my click (I also tried jsclicks)
What I would like to do is have a general way to unfocus a text box after I fill it.
Thanks!
I have an editable Interactive Grid in a page. My page is read only on page load, and there is a separate button 'EDIT' in page, by clicking on which page becomes editable. At the moment, APEX$ROW_ACTION column of IG is visible on page load by default. I want to APEX$ROW_ACTION column only after user clicks on EDIT button.
NOTE : This EDIT button is not the default Edit button of IG
Sorry, but my Javascript is still too weak to solve this (I keep meaning to learn more!). How about going at this a different way?
What if you used 2 grids on the same page, one read-only and the other editable?
The page defaults to displaying the Read-only
They click the Edit button
That hides the Read-only and displays the Editable
This Apex Forum comment describes getting around the 1 IG per page limitation: https://community.oracle.com/tech/developers/discussion/comment/12587490#Comment_12587490
I'm trying to find text that is located on a specific tab. For some reason the text is available in the html but when I use the command driver.find_element_by_id('hand-graph-title-overview').text without clicking on the 'Overview' tab it returns a empty string. However, when I do click on the 'Overview' tab it will return 'Unpaired OOP' successfully. Does anyone know how to get the text without clicking on the tab?
Images of what I'm trying to scrape.
https://i.stack.imgur.com/9nSc0.png
https://i.stack.imgur.com/MyvDA.png
Maybe try and get the 'value' attribute of the element.
driver.find_element_by_id('hand-graph-title-overview').get_attribute('value')
The answer is no. You can't access the element from the other tab without focusing on it. Retrieval of text is totally based on the presence of the element on the current page. When you click on tab then automatically it gets loaded in the dom and then only you can access the element.
I have a tabbed panel with 4 tabs. On the 3rd tab I have 3 textfield and submit button. How to do validation for this tab .On validation error how to return to same tab(i.e. 3 rd tab). When i tried with XML validation it returned to first tab not 3rd tab when validation failed (resutl type="input").
TabbedPanel uses (or not, the choice is on you) a cookie to remember the last visited Tab.
You can't use it dynamically if i remember well:
you can ALWAYS remember last visited Tab,
OR
you will ALWAYS start from the first Tab.
If you want to remember the current tab, insert the
useSelectedTabCookie="true"
attribute into the
<s:tabbedPanel>
tag, with the result that if you are trying to submit data on TAB 3 and validation will raise an error, you will return on the page in the Tab 3.
I suggest you to not submit multiple tabs with one button, every tab should have its own.
I have a Tab Control on a Winform. I want to add another page but I want it to appear between the current page 1 and page 2, basically I want to insert it. How can I do this?
If you are looking to do this from the deseigner:
Under the TabControl Properties,
select TabPages. This will bring up
the tab pages dialog.
Click the Add button. Should add a
new tab page at the end.
Use the arrows to move the page to
the position required.
If you wish to do this from code:
Have a look at TabControl.TabPages.Insert
Inserts a tab page into the collection
at the specified index.