on 06-14-2007 7:39 AM
Hello All,
In dynpro how we can get the space between two elements and next line and align the fields in the center. Can we use HTML or like javascript in dynpro.
One more question in create a login page. If user press login buton then after checking from the database whether the username password is correct main view call and if the user press the new user button new userview is called. How to achieve this functionality.
Regards
Harpreet
Again, you need to use the wd_this pointer. You cannot access web_class directly without using wd_this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You have to refer it as "wd_this->web_class". The correct call would be:
call method wd_this->web_class->login.
Also, ensure that you have the create object statement only in the wdoninit method.
Regards,
ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To see a complete tutorial of how to do a simple WebdynPro application, you can visit the following Link:
http://help.sap.com/saphelp_nw04s/helpdata/en/e6/2c4b29dc87c6409d6469ec390e8f3d/content.htm
This link will help you get all the basics. Once you read the introduction on this page, click on the "Lets Go!' link at the bottom to start knowing more. The links to the subsequent pages are available at the bottom of each page.
Hope this helps you in your learning.
Regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to all for your valuable suggestion.
Now the problem arise is I have define the global class and all my methods for checking the data base are in the global class.
if I use the method of class in the onclick of button action
data : web_class type ref to zcl_web_class.
create object web_class
call web_class-> check_login.
it works.
But I want to define the instanse of my class zcl_web_class in the whole view. For that i tried to define that class in the atttribute of the view, but it does not work,
Any suggestion will be appricieable.
Regards
Harpreet.
hi
You can add an attribute of the type zcl_web_class , in your view attribute.But where are you going to create an instance and save it to that attribute .Unless and otherwise you populate the attribute with an instance value, it will not work.
so what i suggest is , in your domodifyview method .
if first_time = abap_true
create an instance of webclass and save the instance in the view attribute
endif.
it will work
Thanks
Anzy
Award points if this solves yoru problem
Hello,
As per your suggestion I define the object in the attribute tab of the view with ref to mark as check as following
web_class type ref to ZCL_WEB_CLASS
after that I create the instance in the wdoinit and even try with modify as.
create object web_class
After defining all these when i call my method of class in the ONACTIONON_LOGIN_1 action as it says error web class not define.
CALL METHOD web_class->login
Regards
Harpreet
Hi
Yes , whatever nithya said is perfectly correct. One more comment too, wd_this
is like this pointer is C language. It references the current object that we are in. if you are on a view , then wd_this will give you the view controller and if you are in the component controlelr it will give you the instance of the current component controller instance.
Thanks
Anzy
Hello All,
As per your suggetion I define the object in the attribute tab of the view and i call my method as
call method wd_this->web_class->login
But it does not allow to define the instance in the method WDDOINIT says web_class is unknown
method WDDOINIT .
create object web_class.
endmethod.
Regards
Harpreet
Hi
1. Space can arranged only with teh correct lay out , if you choose grid layout there will be a space.
2. For achieving this you need to have three views
view1 = login page
view2 = Home page
view3 = new user page.
In the view1 you need to create two outbound plugs, one for view2 and other for view3
and in view2 and view3 you need to create inbound plugs from the view1.
Go to the window and embedd the views , then create the navigation links between the different plugs .
Now in your login button action write the following code.
if user exists in database.
Fire out bound plug for view1 - homepage
else.
Fire outbound plug for view2.
Thanks
Anzy
Reward points for useful answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
And for navigating to two different views, you can create two outbound plugs from your current view (one plug each to the two target views). Then, depending on the validation, you can fire the required outboud plug.
To fire the oubound plug, you can use the code wizard. Firing the outboud plug will automatically allow you to navigate to the next view.
Regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harpreet,
You can define spacing between elements in your layout. For example, if you specify the layout of your container (group/tray etc) as "Grid Layout", in the properties, you can specify the cell padding.
For your second requirement, create a context node "login" with username and password fields. Bind the attributes to your input fields. On click of the button, in the event handler, read the context attributes. Pass them to your API, say verify_details(username, password). and depending on the result, you either display an error message, or fire a navigation plug.
You need to define an outbound plug between your login view and user view. You can user the wizard to fire the outbound plug.
To display a message, you need to use the interface if_wd_message_manager.
Hope this helps.
regards
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For spacing, you can specify the paddingleft, paddingright, paddingtop and paddingbottom properties of the element. This is available only if you use the grid layout.
Regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.