tabbed panel validation in Struts2 - struts2-jquery

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.

Related

Show APEX$ROW_ACTION on button click in Oracle Apex

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

Is there a way to automatically change the selected menu page in a master detail project when the detail changes?

Background:
My project uses the "Master Detail" project from Xamarin.Forms, so it comes equipped with the hamburger menu button in the top left which is supposed to be the main source of navigation throughout the app. However, my app requires the user to go through multiple of those screens without the use of the hamburger menu. But when a user uses my own buttons to change the detail, the hamburger menu still says the user is on the previous page.
For example, a user is on Page A. They click a button outside of the menu which sends them to Page B. The menu will still show Page A.
My Attempt:
I really didn't know where to start, so I tried taking the MenuItemType and passing it through the following function:
// This changes the screen without changing the menu and it works.
((MasterDetailPage)Application.Current.MainPage).Detail = new NavigationPage(new PageB());
// This was my attempt to change the menu.
(Application.Current.MainPage as MenuPage).RootPage.NavigateFromMenu((id)MenuItemType.PageB);
But that returned a Null Reference Exception when run.
I've also tried manually calling the list view associated with the hamburger menu and changing the selectedItem property, but that didn't work either. Is there any way to change the selected menu?
For Clarity:
Since StackOverflow won't let me post a video, here's a link to how the app acts. As you can see, I use the Menu to go to the "About" Page. I click a button on the screen which takes me back to the "Browse" Page. However, when I open the menu, it still says "About" is selected. I can't reselect "About" until the menu moves away, meaning I have to reopen "Browse" despite already being on that screen.
What I'm looking for is a function which will automatically change the selected menu item to "Browse" when I press that button on the "About" Page. The app is currently using a Master Detail Page which has the "Detail" component changing from the About Page to the Browse Page. The menu page is a Content Page which came built with the app beforehand.

Dynamically add Editor Template on click of a button

In my MVC4 project I have used an Editor Template for user input. I have define a constant(say 4) and called it in a for loop, so there is always a constant number of 4 templates displayed on the view.
I want to change this and make it dynamic, ie when the user clicks on a button, a new Editor Template should be displayed dynamically. When he again clicks on the button, a third one will be displayed and so on.
Do I need to use angularJS for this or is it possible to do it in .net itself? How do I achieve this? Thanks.

How to get summary validation from multiple tabs in ASP.Net MVC?

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/

vb.net - tab control?

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.