WD ABAP. set context noe for an inputField

Hello community,
Does anybody know how to set a context attribute that mapped to an inputField?
node = wd_context->get_child_node( 'NodeName' ).
node->bind_elements( new_items = ANY_TABLE ).
It seems to be very inconvenient to pass any table (ANY_TABLE). Why can't I just pass a string to this method?
Thanks.

Hi,
Do you have general understanding about context structure and data binding?
You are binding attribute to the particular property, not a node (with some exceptions like dataSource for table). But to set attribute you need at least one node element. There is always one - root. You can define cardinality of node 1..x and in this case you don`t need to create or bind your node. You can immediately set attribute value.
Best regards, Maksim Rashchynski.

Similar Messages

  • Setting Application Context Attributes for Enterprise Users Based on Roles

    Hello,
    We have an Oracle 11g database with a table containing data from multiple sites (a SiteID field identifies the site for a record). Since application users can have access to different subsets of sites, we would like to use Oracle's Virtual Private Database feature to enforce row-level security on the table.
    I did a successful proof-of-concept with database users. I created a role for each site (example: USER_SITE_A, USER_SITE_B, ...), and then assigned the appropriate site roles to each database user. I then created a package (run via a logon trigger) which set application context attributes for each site. If the current database user has been assigned a role for a given site, then the corresponding attribute named "SITE_PRIVILEGE_SiteID" is set to 'Y'... otherwise, it is set to 'N'. Here is the code which worked to set application context attributes for database users:
    -- For each record in my RoleSitePrivileges table, set
    --   an attribute named 'SITE_PRIVILEGE_<SiteID>'.
    --   If the current user has been assigned a role matching
    --   the value in the 'RoleName' field, set the corresponding
    --   attribute to 'Y'... otherwise, set it to 'N'.
    FOR iPrivRec IN (SELECT RoleName, SiteID
                       FROM RoleSitePrivileges
                       ORDER BY SiteID)
       LOOP
          SELECT COUNT(*)
            INTO roleExists
            FROM dba_role_privs
            WHERE granted_role = UPPER(iPrivRec.RoleName)
              AND grantee = USER;
          IF roleExists > 0 THEN
             DBMS_SESSION.set_context(
                         namespace   => 'my_ctx',
                         attribute   => 'SITE_PRIVILEGE_' || iPrivRec.SiteID,
                         value       => 'Y');
          ELSE
             DBMS_SESSION.set_context(
                         namespace   => 'my_ctx',
                         attribute   => 'SITE_PRIVILEGE_' || iPrivRec.SiteID,
                         value       => 'N');
          END IF;
       END LOOP;To finish things off, I created a security policy function for the table which returns the following:
    RETURN 'SiteID IN (SELECT TO_NUMBER(SUBSTR(attribute, 15))
                         FROM session_context
                         WHERE attribute LIKE ''SITE_PRIVILEGE_%''
                            AND value = ''Y'')';This setup worked great for database users. I am now working to do a comparable proof-of-concept for enterprise users created in Oracle Internet Directory (OiD). I have Enterprise User Security (EUS) up and running with OiD, global roles created in the database, enterprise roles defined in EUS with global role assignments, and enterprise roles assigned to OiD users. The enterprise users are able to successfully login to the database, and I can see the appropriate global role assignments when I query the session_roles view.
    I tried using the same application context package, logon trigger, and security policy function with the enterprise users that I had used with the database users. Unfortunately, I found that the application context attributes are not being set correctly. As you can see from the code above, the applicaiton context package was referencing the dba_role_privs view. Apparently, although this view is populated for database users, it is not populated for enterprise users.
    I tried changing the application context package to use invoker's rights and to query the session_roles view instead of the dba_role_privs view. Although this package sets the attributes correctly when called manually, it does not work when called from the logon trigger. That was an oops on my part, as I didn't realize initially that a PL/SQL procedure cannot be called with invoker's rights from a trigger.
    So, I am now wondering, is there another view that I could use in code called from a logon trigger to access the roles assigned to the enterprise user ? If not, is there a better way for me to approach this problem? From a maintenance standpoint, I like the idea of controlling site access from the LDAP directory service via role assignments. But, I am open to other ideas as well.
    Thank you!

    Hello,
    We have an Oracle 11g database with a table containing data from multiple sites (a SiteID field identifies the site for a record). Since application users can have access to different subsets of sites, we would like to use Oracle's Virtual Private Database feature to enforce row-level security on the table.
    I did a successful proof-of-concept with database users. I created a role for each site (example: USER_SITE_A, USER_SITE_B, ...), and then assigned the appropriate site roles to each database user. I then created a package (run via a logon trigger) which set application context attributes for each site. If the current database user has been assigned a role for a given site, then the corresponding attribute named "SITE_PRIVILEGE_SiteID" is set to 'Y'... otherwise, it is set to 'N'. Here is the code which worked to set application context attributes for database users:
    -- For each record in my RoleSitePrivileges table, set
    --   an attribute named 'SITE_PRIVILEGE_<SiteID>'.
    --   If the current user has been assigned a role matching
    --   the value in the 'RoleName' field, set the corresponding
    --   attribute to 'Y'... otherwise, set it to 'N'.
    FOR iPrivRec IN (SELECT RoleName, SiteID
                       FROM RoleSitePrivileges
                       ORDER BY SiteID)
       LOOP
          SELECT COUNT(*)
            INTO roleExists
            FROM dba_role_privs
            WHERE granted_role = UPPER(iPrivRec.RoleName)
              AND grantee = USER;
          IF roleExists > 0 THEN
             DBMS_SESSION.set_context(
                         namespace   => 'my_ctx',
                         attribute   => 'SITE_PRIVILEGE_' || iPrivRec.SiteID,
                         value       => 'Y');
          ELSE
             DBMS_SESSION.set_context(
                         namespace   => 'my_ctx',
                         attribute   => 'SITE_PRIVILEGE_' || iPrivRec.SiteID,
                         value       => 'N');
          END IF;
       END LOOP;To finish things off, I created a security policy function for the table which returns the following:
    RETURN 'SiteID IN (SELECT TO_NUMBER(SUBSTR(attribute, 15))
                         FROM session_context
                         WHERE attribute LIKE ''SITE_PRIVILEGE_%''
                            AND value = ''Y'')';This setup worked great for database users. I am now working to do a comparable proof-of-concept for enterprise users created in Oracle Internet Directory (OiD). I have Enterprise User Security (EUS) up and running with OiD, global roles created in the database, enterprise roles defined in EUS with global role assignments, and enterprise roles assigned to OiD users. The enterprise users are able to successfully login to the database, and I can see the appropriate global role assignments when I query the session_roles view.
    I tried using the same application context package, logon trigger, and security policy function with the enterprise users that I had used with the database users. Unfortunately, I found that the application context attributes are not being set correctly. As you can see from the code above, the applicaiton context package was referencing the dba_role_privs view. Apparently, although this view is populated for database users, it is not populated for enterprise users.
    I tried changing the application context package to use invoker's rights and to query the session_roles view instead of the dba_role_privs view. Although this package sets the attributes correctly when called manually, it does not work when called from the logon trigger. That was an oops on my part, as I didn't realize initially that a PL/SQL procedure cannot be called with invoker's rights from a trigger.
    So, I am now wondering, is there another view that I could use in code called from a logon trigger to access the roles assigned to the enterprise user ? If not, is there a better way for me to approach this problem? From a maintenance standpoint, I like the idea of controlling site access from the LDAP directory service via role assignments. But, I am open to other ideas as well.
    Thank you!

  • How to set title/text for ALV table column header in WD ABAP

    Hello,
    I am working in WDA using SALV_WD_Table to display data in table. I need to change the column header text, the obvious way is to get the column header and call the method SET_TEXT to set new text / title. However, this method does NOT work, it does not change the column header text. I also tried the SET_TOOLTIP, this one works, but SET_TEXT does not work. Anyone has idea why this not working and do you find any go-around solution?
    My version is NW 7.0
    Thank
    Jayson

    Hi jason ,
    For setting Heder text for your ALV table
    ip_confing type ref to CL_SALV_WD_CONFIG_TABLE.
    "set alv table header
      ip_config->if_salv_wd_table_settings~r_header->set_text( 'Test ALV Header functionality' ).
    first you have to hide the DDIC text and then try to set your own text .
    "modify columns
      LOOP AT lt_columns INTO ls_column.
        lr_column = ls_column-r_column.
        CASE ls_column-id.
          WHEN 'MANDT'.
            "hide this field
            lr_column->set_visible( cl_wd_abstr_table_column=>e_visible-none ).
           WHEN 'SEQNR'.
            "set header to different string
            lr_column->r_header->set_ddic_binding_field( if_salv_wd_c_column_settings=>ddic_bind_none )." use this line to hide ddic text
            lr_column->r_header->set_text( 'Position' ).     
        endcase.
      endloop.
    Regards
    Chinnaiya P

  • Creating Context Menus for reports

    Hi All,
    I have a classic report with some fields. Whenever I right click on any of the values in the report column, a context menu should appear with the options I define.
    Any idea abt how to do this?
    Regards,
    Sushma.

    Hi,
    <u><b>Context Menus for Lists</b></u>
    As with normal screens, the system creates a standard context menu when you use a dialog status in a list. You can call this standard context menu using the right-hand mouse button (Shift + F10). It displays all of the functions assigned to function keys.
    You can define context menus for list lines in the same way as for screen elements. To do this, you must assign a special function code to the function key Shift+F10 in the dialog status of the list. To define context menus for a list, you must first have defined a dialog status for the list and set it using SET PF-STATUS.
    In this dialog status, which you will normally create using the List status template, the List with context menu option must be selected in the function key setting attributes. To do this, place the cursor on a function key setting in the Menu Painter and choose Attributes or Goto   Attributes   F key setting. The function code %CTX is assigned to function key ShiftF10. Since the introduction of context menus on lists, it is no longer possible to assign ShiftF10 freely to any
    function in the Menu Painter. In any existing dialog status where a function code was assigned to ShiftF10, it has been reassigned to ShiftCtrl+0. You must activate the function code %CTX manually before it has any effect in the dialog status.
    As on screens, context menus on lists are generated dynamically in ABAP programs as objects of the class CL_CTMENU.
    For context menus on lists, you must program a callback routine in the ABAP program:
    FORM on_ctmenu_request USING <l_menu> TYPE REF TO cl_ctmenu.
    ENDFORM.
    In this subroutine, you can define a context menu using the object reference <l_menu> as described in the Context Menus [Page 639] section. To define a specific context menu, for example, you could get the cursor position on the list using GET CURSOR. If required, you may need to find out the current list level from the corresponding system fields (for example, SYLISTI).
    When you right-click a list line (or choose Shift+F10), the callback routine is executed, and the context menu defined in it is displayed. If the user chooses a menu item, the system carries on processing according to the function code assigned to it. The function is either executed by the runtime environment, or the corresponding event is triggered (in which case, the function code is placed in the system field SY-UCOMM).
    If you right-click outside a list line, the system displays the standard context menu.
    Ex.
    REPORT demo_list_context_menu .
    DATA: wa_spfli TYPE spfli,
    wa_sflight TYPE sflight.
    START-OF-SELECTION.
    SET PF-STATUS 'BASIC'.
    SELECT * FROM spfli INTO wa_spfli.
    WRITE: / wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-cityto.
    HIDE: wa_spfli-carrid, wa_spfli-connid.
    ENDSELECT.
    CLEAR wa_spfli.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'DETAIL'.
    CHECK NOT wa_spfli IS INITIAL.
    WRITE sy-lisel COLOR COL_HEADING.
    SELECT * FROM sflight INTO wa_sflight
    WHERE carrid = wa_spfli-carrid
    AND connid = wa_spfli-connid.
    WRITE / wa_sflight-fldate.
    ENDSELECT.
    ENDCASE.
    FORM on_ctmenu_request USING l_menu TYPE REF TO cl_ctmenu.
    DATA lin TYPE i.
    IF sy-listi = 0.
    GET CURSOR LINE lin.
    IF lin > 2.
    CALL METHOD l_menu->add_function
    EXPORTING fcode = 'DETAIL'
    text = text-001.
    ENDIF.
    CALL METHOD l_menu->add_function
    EXPORTING fcode = 'BACK'
    text = text-002.
    ENDIF.
    ENDFORM.
    In the dialog status BASIC for the basic list, %CTX is assigned to Shift+F10. In the
    callback routine, a context menu is defined. The definition depends on the cursor
    position and the list currently displayed.
    If the user right-clicks the two-line default page header on the basic list, the system displays a single-line context menu. The Back function is executed by the runtime environment. If you right-click a list line, a two-line context menu is displayed. The Detail function triggers the event AT USER-COMMAND.
    Regards,
    Bhaskar

  • How to set F4 help for an inputfiled of BSP page?

    hi friends,
    I have to set F4 help for a Field in my BSP page. for this i am doing like this.
    Oninitialization Event....
    tables : t001p ,pa0001 ,t554t.
    data : begin of it,
            awart like t554t-awart,
            atext like t554t-atext,
           end of it.
    data : it_t554s like it occurs 0 with header line.
    parameter : k_pernr like pa0001-pernr.
    data : werks like pa0001-werks,
           btrtl like pa0001-btrtl,
           abs_grp like t001p-moabw.
    clear it_t554s.
    refresh it_t554s.
    select single werks btrtl into (werks ,btrtl) from pa0001
                        where pernr = K_pernr.
    select single moabw into abs_grp from t001p where
                              werks eq werks and btrtl eq btrtl.
    select awart atext from t554t into corresponding fields of it_t554s
                                   where moabw eq abs_grp..
    append it_t554s.
    endselect.
    now it_t554s contails the values to display F4 help in BSP page inputfield.
    how to assign this as F4 help to inputfield....
    I saw some threads. It's getting me to confuse...
    I am new to this topic...
    plz help me.........
    Regards,
    Shankar.

    solved

  • Using Static Variable against Context Attribute for Holding IWDView

    Dear Friends,
    I have a method which is in another DC which has a parameter of the type IWDView. In my view, I will have an action which will call the method in another component by passing the value for the view parameter. Here, I can achieve this in 2 types. One is - I declare a static variable and assign the wdDoModifyView's view as parameter value and I can pass this variable as parameter whenever calling that method or the second way - create an attribute and assign the same wdDoModifyView's view parameter as its value. Whenever I call this method, I can pass this attribute as parameter. What is the difference between these two types of holding the value since I am storing the same value i.e., wdDoModifyView's view parameter. But when I trigger the action from different user sessions, the first type of code (using static variable) prints the same value in both the sessions for view.hashCode() and View.toString(), but the same is printing the different values when I pass the attribute which holds the view parameter.
    Clarification on this is highly appreciated
    The problem I face is when I use static variable to get the view instance and export the data using the UI element's id, the data belonging to different user sessions is mixed up where as when I use Context Attribute, the same problem doesn't arise. I want to know the reason why it is so. Is there any other place or way where I can get the current view instance of each session instead of wdDoModifyView?

    Hi Sujai ,
    As you have specified the problem that we face when we use  static attributes, when end users are using the application .
    Static means i  have n number of objects but the static variable value will remain same every where.
    when it is context attribute for every object i.e nth object you have a nth context attribute i mean nth copy of the context attribute.
    so every user has a unique Iview parameter , when context is used and
    when static is used  , assume you have userA , his iview is set this intially  and u have another user B , when he is using  , since the variable is static and when you access this variable you will get the value of userA.
    Regards
    Govardan Raj

  • Terminating event 'Created' in ABAP OO context

    Hi,
    I need a little help here. A lot of times I have used terminating event ‘Created’ for different BOR types – and asynchronous tasks where users are asked to create an object using call transaction from a work item.
    Now I am struggling with the same in ABAP OO and have an issue:
    The goal is to have a terminating event raised on a custom class  - and received by a work item if a customer is fully created, that is the general part, the company code part and the sales area part.
    Raising the event is working great. I have put in a class in trx. SWEC together with a function module which set the class as object type if the condition is fulfilled.
    Then in trx. SWED I have entered another function module to set the key for class together with object_por-catid = ‘CL’.
    Then when a customer master record is created I can see in the event trace that the event is raised with the correct key.
    No I want to receive the new object into my asynchronous dialog task. I define the event as terminating event – and in the code call transaction XD01.
    When the work item is created I find a waiting event linkage in trx. SWE3 – of cause without key; this is unknown until after creating.
    But after executing the workitem and raising the event the workitem does not receive the event and is therefore not completed.
    Is this approach not possible in ABAP OO – or do I miss something in the class definition / coding?
    The event is defined as public instance – I have not coded any event handler method.
    Thanks,
    Claus.

    Hello Claus,
    Interesting question, unfortunately not with a simple answer.
    The issue is that you are waiting for an instance event without a key. Your object raises an event with a key => No match.
    If you raise the created event without a key, you won't be able to match up two near-simultaneous creations with their corresponding work items. Same thing if you wait for a static event.
    So how does SAP do it with BOR events? By breaking the rules of course!
    They do some hidden trickery to bypass this problem by doing an 'Export to Memory' of the work item ID, and the CREATED event raising code bypasses the usual event linking mechanisms and looks for it's creator by retrieving the memory variable. I don't have the exact spots of code in my head, but a bit of debugging should find it.
    So what can you do? Given that you have full control of the class you could do something similar and maybe also create some kind of temporary key consisting of the Work Item ID and raise an event with that, or you could maybe skip the transaction concept completely and run the create GUI entirely within your WF step - maybe a custom screen gathering the initial data and then create the object via BAPI. Time to get creative!
    Hope that helps,
    Mike
    Edit: Or you could do the quick and dirty solution and just use the BOR events for the step and instantiate the class during the binding back to WF...

  • How to set the size for height of iView tray?

    Hi,
    I have created a ABAP webdynpro component and integrated this comp with iView. Then i integrated iView into Page in portal. That is working fine.
    But the size of tray/window which is displayed in the page is very small.
    How to increase the height of that Tray/window/iView containing my component?

    Hi,
    By changing the maximum automatic height and Minimum automatic height property of the iview you can set the size for height of your iview.
    to do this follow the setps:
    goto content administrator -> portal content -> your folder where you created your iview or directly to your iview -> right click -> open -> object,
    and now in property category choose appearance-Size from the drop down menu and set the above properties to your required height.
    if you want the end user to modify this property set the property to read/write .
    *********please reward points if the information is helpful to you********************

  • How to hide PNP selection windows and set default values for PNP.

    Hi expert,
         I am using HR logical database PNP, but I don't want to display selection windoes for running program on PNP, whereas I want to set default value for some selection items in the program. could you please tell me how to get those two targets?
    Many Thanks,

    Hi
    You have mentioned 2 things.
    1. Don't want selection windows for running program for PNP - this can be achieved using the HR Report category - You can get more details on HR Report Category on
    HR Report Category
    2.  I want to set default value for some selection items - This you need to achieve in initialization event of your program.
    How you can get this can be explained by INITIALIZATION (SAP Library - ABAP Programming (BC-ABA))
    Thanks,
    Sreeram

  • In Firefox 4, how do I get back the context menu for the drop down list of the Location Bar so I can Open Link in New Tab, which I did often in FF 3?

    Firefox 3 has a context menu for the drop down list of
    the Location Bar. One option on this menu I used often
    is "Open Link in New Tab" -- quite convenient.
    This context menu has disappeared in Firefox 4.
    Can I get it back?

    See also:
    *Tools > Options > Privacy > History: "Remember search and form history"
    *https://support.mozilla.org/kb/Form+autocomplete
    The "Use custom settings for history" setting allows to see the current history and cookie settings, but selecting that setting doesn't make any changes to history and cookie settings.<br />
    Firefox shows the "Use custom settings for history" setting as an indication that at least one of the history and cookie settings is not the default to make you aware that changes were made.<br />
    If all History settings are default then the custom settings are hidden and you see "Firefox will: (Never) Remember History".<br />

  • Where do I set up rules for conflict resolution when syncing iTunes with Outlook?

    I just got an iPhone 5 and I'm coming from a Blackberry.  I've been syncing Outlook Calendar and Contacts to a portable device for over 10 years, even back in the day of the pocket pc and more recently the Blackberry.  My iPhone 5 syncs great and seemlessly with Outlook using iTunes.  I've had no issues as of yet.  The problem for me is, it just seems "too" easy.  I didn't see anywhere where I could set rules for conflict resolutions.  For example, if your pc says one thing but your iPhone says another, who wins and supercedes the other?  What if by accident your iPhone loses all of its data, then iTunes syncs with your pc - will it delete all the Outlook data on your pc because it thinks it's syncing with updated data from your iPhone?  (in my case data I've had for over 10 years) 
    With the Blackberry software it asked you to set up rules for conflict resolution when first connecting the phone (including an option to ask you first).  In my case, I chose to have it ask me whenever it discovered a conflict.  So whenever I synced, it specifically alerted me exactly how many items are being synced, and then if there were any conflicts, it'd stop and then ask me which device I want to supercede the other.  This gave me a lot of piece of mind.  Now after getting my iPhone and using iTunes to sync, it's been great so far but I have to say that I don't have as much piece of mind.  Does anyone have any feedback on how to set up conflict resolution with iTunes and Outlook or does it not exist at all?  Again, what would happen if there was a conflict between the two devices? 

    Yes! Thankyou for that. I had of course put the context.xml file in the web-inf directory.
    I followed your example to the letter and it still wouldn't work. Or rather, I followed to the letter expect for the difference between "WEB" and "META".
    Once I worked that out, it started working like a dream.
    Note to anyone else who has a similar problem, make sure you REALLY look at the answer given. Make sure you REALLY do have all the files in the suggested places. It will save you time.
    Thanks again.

  • BI setup: WebAS ABAP Setting - Java to ABAP communication problem

    Hello,
    i've got a problem during intallation of BI in Netweaver 2004s. The Diagnostics & Support Desktop Tool reports errors in WebAS ABAP Settings. These errors are:
    - "Web Template Validation failed due Java to ABAP communication problem (return code:ERSBOLAP018)"  with the suggested solution "Check Connector Connection of System Object in Portal System Landscape". What does it mean?
    - "Call ABAP->Java for function RSWR_RFC_SERVICE_TEST failed for destination <destination>" and "Call ABAP->Java for function RSRD_MAP_TO_PORTAL_USERS failed for destination <destination>" with suggested solution "Check the data of the destination in transaction SM59. Check that the target host is running and has registered a program id in the gateway." Run of transaction SM59 returns no errors.
    Further i've take a look in the log 'dev_jrfc.trc' and there i found the errors:
    - Exception thrown by application running in JCo Server
    java.lang.RuntimeException: Bean RSRD_MAP_TO_PORTAL_USERS not found on host <host>
    - Exception thrown by application running in JCo Server
    java.lang.RuntimeException: Bean RSWR_RFC_SERVICE_TEST not found on host  <host>
    - Exception thrown by application running in JCo Server
    java.lang.RuntimeException: Bean RSWR_PREEXECUTION_PROXY not found on host  <host>
    Can these errors be the cause of the WebAS ABAP Setting error displayed in the Diagnostics & Support Desktop Tool? How they can be solved?
    Thanks for your help,
    Martin

    Hello Chetan,
    thanks for your response. Maybe i've described my problem not clear enough. There is no problem of installation and usage of support & dektop tool, but of installation of BI. The support & dektop tool indicates the errors described above with no other hints. My questions is, if anybody knows, what is the cause of the errors and what i must do, to install BI correctly.
    Cheers,
    Martin

  • Problem in using context param for storing database connection information

    Hello Friends,
    I am new to struts & jsp.I am developing a project in struts.I have 1 jsp page called editProfile.jsp.On submitting this page it will call 1 action class.The action class in turn will call the Plain old java class where I have written the logic for updating User Profile.
    I have created context-param in web.xml for database connection information like dbURL , dbUserName , dbPassword , jdbcDriver.Now I want to use these connection information in my Business logic(Plain Old Java Class).As we can use context parameter only in jsp & servlets , I am setting the variables of my business logic class with these context param in jsp itself.
    now when I am calling the updateProfile method of Business logic class from Action class it is giving error as all the connection variables which I set in jsp for my business logic class has become null again.
    I am not getting.If once I have set those variables how come they are becoming null again???Please help me.Any Help will be highly appreciated.Thanx in advance.

    This is the code I have written
    web.xml file
    <context-param>
    <param-name>jdbcDriver</param-name>
    <param-value>oracle.jdbc.driver.OracleDriver</param-value>
    </context-param>
    <context-param>
    <param-name>dbUrl</param-name>
    <param-value>jdbc:oracle:thin:@localhost:1521:gd</param-value>
    </context-param>
    <context-param>
    <param-name>dbUserName</param-name>
    <param-value>system</param-value>
    </context-param>
    <context-param>
    <param-name>dbPassword</param-name>
    <param-value>password</param-value>
    </context-param>
    EditProfile.jsp
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page import="java.sql.*" %>
    <jsp:useBean id="EditProfile" scope="application"
    class="com.myapp.struts.EditProfile"/>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Edit My Profile</title>
    </head>
    <body>
    <form action="submitEditProfileForm.do" focus="txt_FirstName" method="post">
    <%
    EditProfile.setjdbcDriver(application.getInitParameter("jdbcDriver"));
    EditProfile.setdbURL(application.getInitParameter("dbURL"));
    EditProfile.setdbUserName(application.getInitParameter("dbUserName"));
    EditProfile.setdbPassword(application.getInitParameter("dbPassword"));
    -----------more code goes here------------
    EditActionProfile.java
    package com.myapp.struts;
    import javax.servlet.jsp.jstl.core.Config;
    import org.apache.struts.action.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class EditProfileAction extends Action {
    public EditProfileAction()
    public ActionForward execute(
    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response) throws Exception
    try
    if (isCancelled(request))
    return mapping.findForward("mainpage");
    EditProfileForm epf = (EditProfileForm)form;
    EditProfile ep = new EditProfile();
    String temp = ep.updateProfile(epf.getTxt_FirstName(),epf.getTxt_MiddleName() , epf.getTxt_LastName() , epf.getTxt_Address() , epf.getTxt_Email() );
    if(temp.equals("SUCCESS"))
    return mapping.findForward("success");
    else
    return mapping.findForward("failure");
    catch(SQLException e)
    System.out.println("error" + e.getMessage());
    return mapping.findForward("failure");
    EditProfile.java class (My Business Logic Class)
    package com.myapp.struts;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.sql.*;
    public class EditProfile {
    private String dbURL;
    private String dbUserName , jdbcDriver;
    private String dbPassword;
    private Connection con;
    private Statement stmt;
    public EditProfile()
    public void setdbURL(String s )
    this.dbURL = s;
    public void setdbUserName(String s )
    this.dbUserName = s;
    public void setdbPassword(String s )
    this.dbPassword = s;
    public void setjdbcDriver(String s )
    this.jdbcDriver = s;
    public String updateProfile(String firstname , String middlename , String lastname , String address , String email)
    throws SQLException, ClassNotFoundException , java.lang.InstantiationException , IllegalAccessException
    try
    String s1 = new String("update usr set first_name='" + firstname + "' , middle_name='" + middlename + "' , last_name='" + lastname +"' , address='" + address + "' , email_id='" + email + "' where usr_key=1" );
    con = this.init();
    System.out.println("after init");
    stmt = con.createStatement();
    int rslt = stmt.executeUpdate(s1);
    System.out.println("after excute update");
    stmt.close();
    if(rslt>=1)
    return "SUCCESS";
    else
    return "Failure";
    finally
    if (null != con)
    con.close();
    public Connection init() throws SQLException, ClassNotFoundException
    Class.forName(jdbcDriver);
    con = DriverManager.getConnection(dbURL, dbUserName, dbPassword);
    return con;
    public void close(Connection connection) throws SQLException
    if (!connection.isClosed())
    connection.close();
    }

  • How to set the color for road map steps

    hi all,
    my requirement is like ,whenever i select my step in a roadmap it has to be set in yellow color and others has to be in default color.
    thanks,
    Siva.

    Hi......
    Its Very Simple......
    Create an action for the road map.
    for example..... if you have three step in it....
    by default the first step will be in active only...
    ie., Yellow colour
    if you click the second step and it should be active means.... if you have to create a event....in the property of the Roadmap
    Create the on action select event....
    in that event.....
    try to use this code.... based on your scenario.....
    set context data
        DATA: road_node TYPE REF TO if_wd_context_node,
              road_data TYPE if_componentcontroller=>element_roadmap.
        road_node = wd_context->get_child_node( 'ROADMAP' ).
        road_data-step = step.
        IF step = 'CHOOSE'.
          road_data-prev_enabled = abap_false.
        ELSE.
          road_data-prev_enabled = abap_true.
        ENDIF.
        IF step = 'END'.
          road_data-next_enabled = abap_false.
        ELSE.
          road_data-next_enabled = abap_true.
        ENDIF.
        road_node->set_static_attributes( road_data ).
    navigation
        wd_this->fire_navigate_evt( step ).
    Hope this will help you
    Thanks & reagrds
    Raja

  • Problem setting up handlers for Jetty web app

    Hello,
    I am encountering a problem with setting up the handlers for my web application, what I want is : Having some requests handled by an HTTPServlet with doGet and doPost methods ( how can I load JSP pages from within these methods ? ) and also be able to load static content ( html, JS, CSS )
    The way I'm setting it right now, I can only have one or the other, I cannot get both working.
    I will explain :
        Server server = new Server(5000);
       // This is the resource handler for JS & CSS
        ResourceHandler resourceHandler = new ResourceHandler();
        resourceHandler.setResourceBase(".");
        resourceHandler.setDirectoriesListed(false);
       // This is the context handler for the HTTPServlet
        ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
        context.setContextPath("/");
        context.addServlet(new ServletHolder(new Main()),"/*");
       // this is the Handler list for both handlers
        HandlerList handlerList = new HandlerList();
        handlerList.setHandlers(new Handler[] { context ,resourceHandler});
         If I add them in this order, all requests will be handled by the "context" and no static resource is loaded
         If I invert the order, the index page page is loaded by the resource handler, which means, If I activate directory listings, it gives me a list of all directories, otherwise it's just a blank page
         I tried working with a WebAppContext to load JSP pages but I still had some problems with which handler should handle which requests
        server.setHandler(handlerList);
        server.start();
        server.join();
    Thank you

    Lync web app is designed mainly for external partners who are invited to Lync meetings. Thus, the feature cannot be achieved naturally on Lync side. You may post the issue on IIS forum to verify if this can be achieved by setting LWA directory.
    Thank you for your understanding.
    http://forums.iis.net/
    Kent Huang
    TechNet Community Support

Maybe you are looking for

  • Unable to install SQL Server 2012 Developer

    I have a problem with installing SQL Server 2012 (no matter which edition I choose). Installation usually runs well, but near the end shows up an error: TITLE: Microsoft SQL Server 2012 Service Pack 1 Setup The following error has occurred: Wait on t

  • HP dv6t fingerprint sensor suddenly doesn't work anymore

    Hi there, I own a dv6t with fingerprint sensor. When coming back this weekend, which I didn\t spent at home and forgot to turn off my laptop, the fingerprint sensor didn't work anymore. Usually, when you come close, there is a white light on the left

  • R 6025 pure virtual Function Call

    Hello, I'm having trouble with my Premiere elemnts 12, to start the message - R 6025 pure virtual Function Call - Exception Unknown Software Exception (0x400000015) in 0x78b2d6fd. My system is XP pac 3. I tried to find the solution but I found .Agrad

  • How to use the scan option with a Kyocera FS-1320MFP ?

    Hello, is it possible to use the scanner function on a Kyocera 1320MFP with Mac OS X 10.6, or with Mac OS X 10.8 ? Kyocera doesn't specify this combination in their support pages. Statements are welcome! Thanks, umberto

  • Can't sync new Iphone 5S 64GB with itunes or recognized by laptop - total mistery!

    I'm not someone new with these things. But I must be cursed or something. anyway, ever since unpacking, my laptop wont recognize my new iphone 5S 64GB. I tried reinstall several times of itunes and assorted apple services and drivers, restarts of win