I have 2 action classes which share the same action form. I have defined the action form in request scope for both of them. Can you please tell me how to transfer this form object from 1st action to 2nd action.
I am avoiding sessions due to IE shares the same session across windows/tabs.
Employee Management app:
When admin edits an employee, it has 3 tabs. Personal, Education, Background.
Each tab represents a separate action class, which all share the common employeeForm action form class. So when admin is on Personal tab, it populates the employeeForm object with all the employee related data. Please tell me how to transfer this object from one tab to another, so that I dont hit the DB again.
Struts 1 or Struts 2?
If it's Struts 1.x, then you need to add <html:hidden> tags within the tab's <html:form>, for each of the properties you want to share between tabs.
Related
I want to change default values which gets populated in the below picture.
I tried modifying get_v_role method but it didn't serve my purpose.
Please help.
In personalize->personalize settings, there is sort option. It sometimes overwrites this arrangement of values of get_v method.
Also code can be written in inbound plug of this view. I did it for overview page drop down and it worked. You can try for your search page.
For filtering/changing drop-down value of search parameter, You've to Re-define GET_DQUERY_DEFINITIONS method of ZCL_XXX_IMPL class of component. GET_V_XX methods are only used to modify drop-down/F4 help of view pages not the search view.
STEPS:
Click F2 while placing the cursor on Account ID(for which parameter you want
to modify) drop-down.
Go to BSP Component using t-code - BSP_WD_CMPWB
Enter the component name and Enhancement set
Select the view.
Go to Implementation class .
If your component is enhanced then it will be having ZCL_XXX_IMPL class. otherwise you've to enhance that component. Click on that class.
After that find GET_DQUERY_DEFINITIONS method and implement same way as
GET_V_XXX.
I have a web application and it has two controller classes. The two controllers have an action with FormCollection parameter with HTTPPost attribute decorated. If I click on Form submit button then which action will be triggered to capture the form's values within the controller.
Using the Form Collection class we can capture the form's values within the controller.There are many ways to fetch these values and Form Collection is the one of them.
http://tutorial.techaltum.com/Form-collection-in-MVC.html
http://www.c-sharpcorner.com/UploadFile/dacca2/understand-formcollection-in-mvc-controller/
Follow above link It will help you to understand more.
We have developed an MVC4 Web Application. Due to the flow of pages (it is a reservation system) we need when the user pressed back button the page to be executed again ie reload data from database as it was called from first time.
May be a solution is to suggest how to Capture the browser's back button in an MVC4 web application and execute a Controller's Action
Kindly consider.
Any assistance is kindly appreciated.
Based on your comments it seems you are building up state over several pages (in a wizard style) and it is when navigating back to an earlier page that you would like the state to be cleared.
You would need to capture the page navigation logic on the server side and not rely on capturing back button events on the client side.
You should use the state you've captured to determine what should be displayed to the user and what should happen to the current state you have.
For example, imagine you have pages A, B, C, D which collect user information. The user has entered information on pages A and B (which has been gathered in the session or the database perhaps) and is now on page C. They then navigate back to page A (via the back button or by modifying the url directly). At this point (in the controller for page A) you can determine from the current state that they have been to page B and therefore deduce that they must have navigated back. You can therefore clear the state at this point or perform whatever logic is required.
Are there any Documentum Webtop developers on here that know how to launch the DocList component within a simple container such as dialogcontainer ? I'm trying to implement some custom functionality for one of the screens in my Webtop-based application so that when the user clicks on the link for a folder, the DocList component is invoked to display the contents, then after the user is done looking at them, she can click the OK button provided by the container to return to the previous screen...
I've tried a couple different ways to do this. My first attempt was to use a dmf:link tag to call a new component I defined called doclistcontainer to contain the doclist component. My second attempt was to use a dmf:actionlink tag that called an action I defined which executes doclist within a container. In both cases, I end up with a blank screen, generic title, the OK button doesn't do anything... When I run a debugger on the code, I can see that the DocList behavioural class is being called despite the blank screen being displayed. What am I doing wrong?
Sheldon
I'm currently using Vaadin 7 for creating a RIA and I'm designing the Login functionality.
The application design is simple:
A UI class performs navigation beetwen different View classes. In particular, the first displayed View is a LoginView class and after a user has been authenticated the UI class redirects the user towards a MainView.
After authentication I'd like to set User data (eg name and surname) into the session and display it always (no matter what specific view) on the top right corner of the Web Application.
As a begginner I read the Vaadin Book and I firstly used the scheme illustrated in chapter 11th https://vaadin.com/book/-/page/advanced.global.html, but it doesn't seem to work as expected, probably because I'm using View navigation scheme.
So I use the following approach:
Once authentication is correctly completed LoginView tries to store user data as a VaadinSession attribute with the following code:
VaadinSession.getCurrent().setAttribute("name", name);
then UI navigates to MainView and tries to get the name of the user with:
VaadinSession.getCurrent().getAttribute("name");
but it gets a null value.
Does anyone know why? I appreciate any help.
Thank you.
I would suggest storing the values on the HTTP session instead.
VaadinServletService.getCurrentServletRequest().getSession().setAttribute("name", name);
and
VaadinServletService.getCurrentServletRequest().getSession().getAttribute("name");
Use the #PreserveOnRefresh annotation on main class which is extends the UI.
Then you can store variables data in the main class.
You can give it from anywhere (in any View) with ((MyUIClass)UI.getCurrent()).getSomeVariable method expression.
I have a guess as to why you get your null value. In most tutorials of modern Vaadin, the navigation pages are created first-thing in the UI as objects. If one of these views instantiated in this process is the MainView. If the label displaying the name sets the String in the constructor of the class, the line:
label.setValue(VaadinSession.getCurrent().setAttribute("name", name)); will be null is the attribute has not been set by the login function yet.
You need to either update the label showing the user string in the #override enter() function, or handle it otherwise.