Custom Session(?) Attribute

I am developing channels that connect to another application (e.g. a database). if the user sucessfully connects to the application an application Session is returned. What I want to do is populate a userSession-wide attribute(?) with the value fo the session such that any Channel would do a getAttribute("appSession") and either have the appSession or null returned.
How would/might I achieve this? If I define an attribute (appSession) for each Channel it doesn't that it would be referencing the same attribute. Could I do it with a sess.setProperty(), getProperty()? The session is actually an App Session object.

IF you are using a custom authentication module then there are two api calls, setUserSessionProperty and getUserSessionProperty, that allows you to add the user session to be later used by channels.
Altnernatively you can define a custom attribute in the iwtUser component. e.g ( iwtUser-AppSession) and set your app session value in this attribute.
This attribute can then be used by all channels or other components. However this attribute value will remain once the user logged off and you have to reset the value next time the user logs in ..
HTH ..

Similar Messages

  • How to set session attributes in a bean?

    How do I set a session attribute in a server-side bean?
    I'm not sure if I asked the question the right way. What I meant is, while it's easy to set session attributes in a JSP page (session.setAttribute("sessionname", "sessionvalue")), I'd want to set such an attribute within a server-side bean defined in this web application. But what is the syntax for doing it?

    Here a simple bean that stores something in the session and retrieves something from it.
    import javax.servlet.http.HttpSession;
    public class TestBean {
      private String value;
      public void doSomething(HttpSession session, int a, int b) {
        if (a+b > 0) {
          session.setAttribute("ab",Boolean.TRUE);
        } else {
          session.setAttribute("ab",Boolean.FALSE);
      public void init(HttpSession session) {
        if (session != null) {
          Boolean b = (Boolean)session.getAttribute("ab");
          if (b == Boolean.TRUE) {
            value = "a + b is greater than zero";
          } else {
            value = "a + b is not greater than zero";
        } else {
          value = "no session";
      public String getValue() {
        return value;
    }In your JSP, use something along the lines of :
    <%
      TestBean bean = new TestBean();
      bean.init(session);
      bean.doSomething(session,1,2);
    %>If your bean only lives during one request, you can pass the session to the constructor, which stores it in a private variable. This saves passing the session each time.
    Hope this helps,
    --Arnout                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • URGENT---EJB 3.0--Toplink essential - loading custom session customizer

    Dear all,
    I am a newbie to EJB as well as JPA...for some reason i need to write a custom session customizer
    i config the persistence.xml with the following property:
    <property name = "toplink.session.customizer" value = "customizer.MyCustomizer"/>
    My EJB project structure:
    Application1
    ->EJB_Project1
    ->customizer
    ->MyCustomizer.java
    ->bean
    ->BeanARemote.java
    ->BeanBRemote.java
    ->META-INF
    ->persistence.xml
    when i want to test the EJB project..the following exception occur...
    ==============================================================
    Exception Description: ClassNotFound: [customizer.MyCustomizer] specified in [toplink.session.customizer] property.
    Internal Exception: oracle.classloader.util.AnnotatedClassNotFoundException:
    Missing class: customizer.MyCustomizer
    Dependent class: oracle.toplink.essentials.internal.security.PrivilegedAccessHelper
    Loader: oracle.persistence:1.0
    Code-Source: /C:/Oracle10-1-3-11/toplink/jlib/toplink-essentials.jar
    Configuration: <code-source> in /C:/Oracle10-1-3-11/jdev/system/oracle.j2ee.10.1.3.39.14/embedded-oc4j/config/server.xml
    This load was initiated at oracle.persistence:1.0 using the Class.forName() method.
    The missing class is available from the following locations:
    1. Code-Source: /G:/JDeveloper/jdev/mywork/Application1/EJB_Project1/classes/ (from <ejb> in unknown)
         This code-source is available in loader current-workspace-app.root:0.0.0.
         This is the current thread's context loader, and it appears that Class.forName() was used to load the dependent class.
         If a loader was not explicitly passed to Class.forName(), try passing the result of calling Thread.currentThread().getContextClassLoader().
    ==============================================================
    the application server cannot load the class but it can locate where the class is...
    why???
    i futher check if the problem is related to parent-child class-loader mechanism
    in the code, i call the Class.getClassLoader() in order to obtain which classloaders
    my session customizer and JPA EntityManager (implied for the whole toplink essential?) were loaded by...
    result: for custom session customizer..
    top classloader == jre.bootstrap:1.5.0_09
    2nd classLoader == jre.extension:0.0.0
    3rd classLoader == api:1.4.0
    4th classLoader == oc4j:10.1.3
    5th classLoader == system.root:0.0.0
    6th classLoader == default.root:0.0.0
    result: for JPA EntityManager..
    top classloader == jre.bootstrap:1.5.0_09
    2nd classLoader == jre.extension:0.0.0
    3rd classLoader == api:1.4.0
    4th classLoader == oc4j:10.1.3
    it seems the EntityManager is loaded in 'higer level' class loader, so it can't access
    class load in 'lower level' class loader ..
    Dependent class: oracle.toplink.essentials.internal.security.PrivilegedAccessHelper
    Loader: oracle.persistence:1.0But something strange is that the exception message saying the loader is oracle.persistence:1.0 ???
    Could anybody help me......?
    what is the solution...?
    i have searching in the web for days but can't find solution !!!
    Thank you very much ...
    ** My development environment:
    JDeveloper: 10.1.3.1
    window xp sp2
    sun java sdk 5 update 9

    i have futher check if the problem is related to class loading
    i call the Class.getClassLoader() in order to obtained which classloaders
    my session customizer and EntityManager were loaded...
    obtain the following result: for my session customizer..
    top classloader == jre.bootstrap:1.5.0_09
    2nd classLoader == jre.extension:0.0.0
    3rd classLoader == api:1.4.0
    4th classLoader == oc4j:10.1.3
    5th classLoader == system.root:0.0.0
    6th classLoader == default.root:0.0.0
    for EntityManager..
    top classloader == jre.bootstrap:1.5.0_09
    2nd classLoader == jre.extension:0.0.0
    3rd classLoader == api:1.4.0
    4th classLoader == oc4j:10.1.3
    it seems the entity manager is loaded in 'higer level' class loader, so it can't access
    class load in 'lower level' class loader ..
    Dependent class: oracle.toplink.essentials.internal.security.PrivilegedAccessHelper
    Loader: oracle.persistence:1.0But something strange is that the exception message saying the loader is oracle.persistence:1.0 ????
    Could anybody help me......?
    what is the solution...?
    Thank you ...

  • Clearing custom session variable in 5.0

    I have set a custom session variable in a method called in the OnAfterLogin PEI.
    Do I need to ckear this session variable on logout? If so, how do I do that?
    Or does the session variable clear on its own if teh session is abandoned or killed on logout?
    I just want to make sure I am not leaking any memory and do proper housekeeping.
    Thanks!
    Vanita
    Staples

    Sam,
    It appears that you are one of the few installations that actually used a display/formatting page under 4.x. Under 5.0 you have the option of going directly to the source of the card or gatewaying the card. Those are your only two options to my knowledge. I suppose that the answer might rest on using docfetch but this would require a custom CWS.
    Good Luck
    Phil Orion

  • Rich Text Editor with Custom Text Attribute

    Hello All,
    We are using the latest version of Oracle Portal 10G. I have a need to create custom Attributes of the type text to let people enter a lot of text. But when User are in edit mode of an item where this custom attribute is used, the Rich Text Editor is not shown for entering the Text for the Custom Text Attribute. It shows a normal html text area. Has anyone ever used RTE with Custom Attribute?
    I request you guys for help.
    Thanks.

    The Problem with the Custom Attribute is not solved, but I have now compromised with the Situation and now I am not using a Custom attribute.
    Rather, Now I am creating a Custom Item Type using Base Text Type (earlier i wanted to create custom item type at my own without any base item type). In this case now I will not be able to change the Lable of the RTE (that is "Text", when the Custom Item is in Edit Mode), but I hope that my users can understand that much.
    I have created a template for portal pages. In the Template I can edit the Region Properties. When I edit the Region property of the region where I want to display my Custom Items. I get two Tabs on the top, Main and Attributes/Style. ON the main tab I can tell what type of region it should be, width etc, in my case it is item type region. And on the Attributes/Style tab, I can select from the availabe Attributes as which all Attributes I want to display. Here if i select only "Associated Functions" Attribute then normally portal should not render anything by default on the Page. It should rather make a call to the procedure which is associated with the Custom Item and as when I was creating the custom item type, I had clicked on "Display Procedure Results With Item", so portal should now display the result of my Procedure. So far it works without problem.
    But the problem is that the Portal displays the text at its own also. As i have written that Portal should not display anything at its own, this doesn't work in this version of Portal for a Custom Item Type that is made using Base Text Item Type. For all others it has worked till now (I have create 50s of Custom item types).
    You can better understand by going to the following URL. Just have a look between the two dotted lines (Dotted line is also a seperate Custom Item Type). Between the two Dotted Lines is a custom item, in general it would be a Custom News Item having title, image and so on.
    http://sunnode1.edvz.sbg.ac.at:7778/portal/page?_pageid=79,56047&_dad=portal&_schema=PORTAL
    I have really programmed a lot with portal but now at this stage where I am near to end, I am getting problems which are coming from Product. I request you for help.

  • Javascript to JSP question...Can javascript function set session attributes

    hello,
    i have a web app that, on one of its pages, displays "tabbed pane" as an image map at the top (a la amazon.com). my problem is this: each "logical" page contains separate forms that all use the same javabean. in other words, imagine that the tabs represent an account maintenance web ui for an on-line record store. the first tab might be labeled "General," the second "Contact info," the third "Shipping Info." Each uses the same account bean and displays portions of its properties relevant to the tab at hand. what i want to do is allow a user to enter the account maintenance ui, update info on the first tab, click on tab two and have the request with the changes sent to a processing jsp. yet, since each "tab" is actually a separate URL to another page, how do i get the updated info on the first tabe without adding some sort of "SAVE" button on each tab. ive considered using javascript, but dont know how to get the request params out of the first tab whn i click on another tab. is it possible to include an "onClick" function in each URL that "grabs" the updated form fields off the preceeding tab? can a javacript function set session attributes in jsp?

    hello there,
    wow, you've created one big mammy-jammy tool.
    first, javascript cannot access, set values to the session, without having to post to another JSP. javascript is great for manipulating objects, layers, form values, etc.
    you have 2 issues [if i understand correctly]:
    1) you need to able to save user info for a specific tab without having to reloading the page.
    ---you can create a form for EACH of your tabs and POST all the information to a hidden IFRAME or LAYER for NN4. that hidden IFRAME / LAYER will load a JSP page which with all the parameters you posted to it. or you can build a FRAMESET and target that document["frame-name"].src with that same JSP.
    2) handling when the SAVE INFO action should happen: hence some javascript event handler: onMouseOver, onClick, etc
    ---i don't know the dynamics of your tabs, but if store which tab was clicked on last, then if the user clicks on some other tab, javascript can submit that FORM to a JSP [see condition above]
    you have an interesting tool. can i see?
    i hope i wasn't too confusing, but your problem is sooo interesting. =)
    -WJP

  • How to get from data entered on a form to a session attribute

    I have a jsp with a form with fields that are updated by the user.
    The values are in the fields value as I expected.
    Example. document.frm.Name.value = "Me"
    How do I populate a session variable with document.frm.Name.value?
    I think I have to do a request.getParameter("Name") followed by a
    session.SetAttribute. But the request.getParameter does not get populated with the latest value in document.frm.Name.value.
    Any idea is welcomed. Thanks
    Claudiine

    Below is the code:
    What I want to do is save in the session attribute "mailToAddressList" whatever the user types in the textarea "MailTo"
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.sql.*;
    import java.text.*;
    import java.io.*;
    import com.cname.apl.*;
    public class DealTeamServlet extends HttpServlet {
    private appUtil util ;
    private java.sql.Connection conn ;
    private static String dbUrl ;
    private static String dbUid ;
    private static String dbPwd ;
    private static String mailFromAddressList ;
    private static String mailToAddressList ;
    private static String mailCcAddressList ;
    private static String mailBccAddressList ;
    private static String mailSubject ;
    SimpleDateFormat SDF = new SimpleDateFormat("d-MMM-yyyy");
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    dbUrl = config.getInitParameter("dbUrl");
    dbUid = config.getInitParameter("dbUid");
    dbPwd = config.getInitParameter("dbPwd");
    mailFromAddressList = config.getInitParameter("mailFromAddressList");
    mailToAddressList = config.getInitParameter("mailToAddressList");
    mailCcAddressList = config.getInitParameter("mailCcAddressList");
    mailBccAddressList = config.getInitParameter("mailBccAddressList");
    mailSubject = config.getInitParameter("mailSubject");
    if (dbUrl == null)
    dbUrl = "*" ;
    if (dbUid == null)
    dbUid = "*" ;
    if (dbPwd == null)
    dbPwd = "*" ;
    if (mailFromAddressList == null || mailFromAddressList.equals("*"))
    mailFromAddressList = "" ;
    if (mailToAddressList == null || mailToAddressList.equals("*"))
    mailToAddressList = "" ;
    if (mailCcAddressList == null || mailCcAddressList.equals("*"))
    mailCcAddressList = "" ;
    if (mailBccAddressList == null || mailBccAddressList.equals("*"))
    mailBccAddressList = "" ;
    if (mailSubject == null || mailSubject.equals("*"))
    mailSubject = "" ;
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException {
    HttpSession session = request.getSession(true) ;
    String msgBody = (String) request.getParameter("msgBody");
    String uid = (String) request.getParameter("uid");
    String key = (String) request.getParameter("key");
    Boolean isAuthorized = (Boolean) session.getAttribute("isAuthorized");
    java.io.PrintWriter out = response.getWriter();
    if (msgBody == null) msgBody = "" ;
    response.setContentType("text/html");
    if (uid == null || key == null) {
    isAuthorized = new Boolean(false);
    if ( isAuthorized == null ) {
    util = new appUtil();
    conn = util.getConnection(dbUrl, dbUid, dbPwd) ;
    isAuthorized = util.isAuthorized(conn, uid, key);
    util.closeConnection(conn) ;
    if ( isAuthorized.booleanValue() ) {
    session.setAttribute("isAuthorized", new Boolean(true));
    java.sql.Timestamp serverTime = util.getServerTime(conn) ;
    java.sql.Date now = new java.sql.Date(serverTime.getTime());
    int idEntry = Integer.parseInt(msgBody);
    mailToAddressList = request.getParameter("MailTo");
    out.println("<html>");
    out.println("<head>");
    out.println("<title>Team Members</title>");
    out.println("<SCRIPT LANGUAGE=JavaScript>");
    out.println("function open_window() {");
    out.println("document.domain = \"ny.cname.com\"");
    out.println("var loc = \"http://peoplelkp.ny.cname.com/peoplelkp/PDLookupService?&emil2=eMail&form=frm&launch=myRoutine()&csr=1&srch=1&adv=1&wc=y&pump=\"");
    out.println("loc = loc + document.frm.Name.value");
    out.println("var w = window.open(loc,\"Model_Details\",\"scrollbars,width=400,height=450,resizable=yes\")");
    out.println("return;");
    out.println("}");
    out.println("function myRoutine() {");
    out.println("document.frm.MailTo.value=document.frm.MailTo.value+\",\"+document.frm.eMail.value;");
    out.println("}");
    out.println("function submitForm() {");
    out.println("alert('submit form')");
    out.println("var mailAdd = document.frm.MailTo.value");
    out.println("alert('mailAdd='+mailAdd);");
    out.println("if ( mailAdd.length == 0 || mailAdd.indexOf(' ') == 0 || mailAdd.indexOf('.com') == -1 || mailAdd.indexOf('@') == -1 ) {" );
    out.println("alert('The To: field must be populated. No space are allowed. Email addresses must have valid format. Example: [email protected]')");
    out.println("document.all.frm.MailTo.focus();");
    out.println("return false;");
    out.println("}");
    out.println("return true;");
    out.println("}");
    out.println("function UpdateMailTo() {");
    out.println("alert ('I am in UpdateMailTo='+document.frm.MailTo.value);");
    out.println("}");
    out.println("</SCRIPT>");
    out.println(util.getStyleSheet());
    out.println("</head>");
    out.println("<body bgcolor='silver'>");
    out.println("<form name='frm' action='SendMail' method='post'>");
    out.println("<b>Team Members</b>");
    out.println("<tr>");
    out.println("<TABLE cellpadding='0' cellspacing='0' border='0'>");
    out.println("<tr>");
    out.println("<td align='right'><b>Subject:  </b></td>");
    out.println("<td>Deal Team Members Cleared by Conflicts</td>");
    out.println("</tr><br>");
    StringBuffer bod = new StringBuffer("");
    SimpleDateFormat SDF = new SimpleDateFormat("d-MMM-yyyy");
    try {
    /*get header information*/
    CallableStatement st = conn.prepareCall("{call apl_get_sp ?}");
    st.setInt(1, idEntry);
    ResultSet rs = st.executeQuery();
    int id = 0;
    int dw = 0;
    String cde_proj = "";
    String nm_title = "";
    String nm_long = "";
    String empl = "";
    String sid = "";
    int userid = 0;
    String email_pr = "";
    while ( rs.next() ) {
    id = rs.getInt("id_entry");
    dw = rs.getInt("id_dealworks");
    cde_proj = rs.getString("cde_proj");
    nm_title = rs.getString("nm_title");
    nm_long = rs.getString("nm_long");
    empl = rs.getString("empl_name");
    sid = rs.getString("id_standard");
    email_pr = rs.getString("id_email_ext_unix");
    mailToAddressList = email_pr.trim();
    out.println("<tr><td align='right'><b>To:  </b></td>");
    out.println("<td><textarea name='MailTo' cols='50' rows='2'>"+mailToAddressList+ "</textarea></td>");
    out.println("<td>  </td>");
    out.println("<td><input type='button' value='Save' onClick='UpdateMailTo()'></td>");
    out.println("</tr>");
    // out.println("request.setAttribute('mailadd',document.frm.MailTo.value);");
    // mailToAddressList = request.getParameter("mailadd");
    out.println("<tr><td align='right'><b>Name:  </b></td>");
    out.println("<td><INPUT NAME='Name' VALUE='' size=65 ></td>");
    out.println("<td>  </td>");
    out.println("<td><input type='button' value='Search' onClick='open_window()'></td>");
    out.println("</tr>");
    out.println("<tr><td align='right'><b>EMail:  </b></td>");
    out.println("<td><INPUT NAME='eMail' VALUE='' size=65'></td>");
    out.println("</tr>");
    if (rslt != null) rslt.close() ;
    if (stmt != null) stmt.close() ;
    }/*end try*/
    catch ( Exception e) {
    System.out.println(e) ;
    getServletContext().log(e.toString());
    out.println("<td colspan='5' align='right'><input type='submit' value='Send email' onClick='submitForm()'></td>");
    out.println("</tr>");
    out.println("</table>");
    out.println("</form>");
    out.println("</body>");
    out.println("</html>");
    mailSubject = "Team Members";
    String body = "testing";
    session.setAttribute("mailFromAddressList", mailFromAddressList);
    session.setAttribute("mailToAddressList", mailToAddressList);
    session.setAttribute("mailCcAddressList", mailCcAddressList);
    session.setAttribute("mailBccAddressList", mailBccAddressList);
    session.setAttribute("mailSubject", mailSubject);
    session.setAttribute("mailBody", body);
    else {
    session.setAttribute("isAuthorized", new Boolean(false));
    out.println("You are not authorized.");
    //out.close();
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException {
    processRequest(request, response);
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException {
    processRequest(request, response);
    public String getServletInfo() {
    return "Short description";
    }

  • Custom Dynamic Attributes

    Hello Experts:
    Does anyone knows if it is possible to create a Custom Dynamic Attribute for Bid Comparison where this custom Attribute can be automatically filled through a function module or program with some calculated value?
    My requirement is to provide an automatic supplier qualification which can be used as a comparison attribute, the qualification could be calculated using supplier information from previous POs, Confirmations, etc.
    Hope you can help me out
    Hugo

    Hi,
      Dynamic Attributes for Bid Invitation can be created using customization.
    SPRO-> SRM Server->Bid Invidation - > Dynamic Attributes.
    Generally the response to  the dynamic attributes are given by Bidder when submitting the Bid.
    For automaic population of response to the bidder do you want to do through report ?
    you can implement "BBP_DOC_CHANGE" BADI metod "BBP_QUOT_CHANGE" for pupulating the response of dynamic attribute while submitting BId.
    Regards
    Kalandi
    PS : Reward points if it helps you.

  • Problem removing session attributes

    I have a problem removing session attributes
    I try w/ mysession.removeAttribute("key");
    but it still lives in memory. I've tried setAttribute("key", null) as the API states that will do the same thing, but it doesn't work.
    I can get mysession.invalidate() to work, but I want to keep some of the attributes there, while removing another.
    I get no exceptions and no errors.
    Help.
    Running Tomcat 4
    jre 1.3.1

    Actually,
    response.addHeader("Expires", "-1");should be enough.
    The browser should then contact the Web server for updates to that page via a conditional If-Modified-Since request. You don't want a cache disabling 'overkill', since you'd still want the page to remain in the disk cache and used in appropriate situations without contacting the remote Web server, such as when the BACK and FORWARD buttons are pressed...
    Anyway, try this first, and if it doesn't solve your problem, add the other cache-disabling headers, as outlined in the previous post.
    If you're using JSP, verify also that your page has
    <%@ page session="true"%>

  • How to save the login ID as a session attribute ?

    I am using form-based authentication in a web application which is being deployed on a JBoss 3.2.3 server. I am authenticating against an Oracle database by way of a DatabaseServerLoginModule (JAAS).
    I would like to save the user's login ID as a session attribute in order to be able to use it later in the application.
    It's not obvious how you can capture this information and add it to the session, since it seems that the login ID is lost once the authentication is done by j_security_check process.
    Is there some way to tell the servlet container to save the login ID as a session attribute as part of the j_security_check process (something along the lines of "if the authentication succeeds add the login ID as an attribute to the session") ?
    Is there another approach ? What is the accepted "best practice" for doing session initialization after authentication ? For example if a user needs to have several attributes set in their session after login -- how is this handled ? I have done this before with a login servlet which did both the authentication and the session initialization, but when using form-based authentication and j_security_check it's not clear to me how you go from the authentication to the initialization logic.
    Thanks in advance for any suggestions or insight.

    You should already have it... hidden in request.getUserPrincipal().getName()

  • Variable coming from a session attribute

    Hello, I am developing a web application with JDeveloper 10g
    I've got a View Object which is basically a query, where I use a variable:
    WHERE BbCustomerOrderStatusTab.CUSTNO = :CustomerNumber
    When I define CustomerNumber in a form, it works:
    <af:panelForm>
    <af:inputText value="#{bindings.CustomerNumber.inputValue}"
    label="#{bindings.CustomerNumber.label}"
    required="#{bindings.CustomerNumber.mandatory}"
    columns="#{bindings.CustomerNumber.displayWidth}">
    <af:validator binding="#{bindings.CustomerNumber.validator}"/>
    </af:inputText>
    <af:commandButton actionListener="#{bindings.ExecuteWithParams.execute}"
    text="ExecuteWithParams"
    disabled="#{!bindings.ExecuteWithParams.enabled}"/>
    </af:panelForm>
    But I would like CustomerNumber to come from a session attribute. I tried something like that:
    session.setAttribute("CustomNum","IRI0001");
    setCustomerNumber(session.getAttribute("CustomNum"));
    with the View Object Editor -> Client Interface setCustomerNumber selected, but it doesn't work.
    I tried :
    String CustNum=session.getAttribute("CustomNum");
    %>
    <af:attribute name="#{bindings.CustomerNumber}"
    value="<%= CustNum%>"/>
    but it tells me that "Attribute value does not accept runtime expressions".
    Does someone know how I could do that?
    Thanks,
    Romain

    Hi,
    Frank's suggestion should work.
    Most importantly, don't forget to declare your bind variable in your view object !!
    Your statement looks odd to me
    String CustNum=session.getAttribute("CustomNum");
    %>
    <af:attribute name="#{bindings.CustomerNumber}"
    value="<%= CustNum%>"/>
    There are many ways to do it. You may try using backing bean for command button's actionlistener or action like the following
    class myBackingBean
    private String CustNum; //of course with getter and setter method
    myButtonAction() {
    CustNum = yourFavouriteValue;
    OperationBinding ob = getBindings().getOperationBinding("ExecuteWithParams"};
    ob.execute();
    note you must declare CustomValue in your pageDef's binding to #{yourBackBeanClass.CustNum} in your ExecuteWithParams binding
    I don't know and seems not being recommended to set session value in jspx.
    Another way is inside your command button in the jspx
    <af:setActionListener from="#{somesource.value}"
    to="#{processScope.CustNum}"/>
    in such case, you must declare CustomValue in your pageDef's binding to #{processScope.CustNum} in your ExecuteWithParams binding
    If you have already set session value somewhere beforehand, then what you need to do is simply declare CustomValue in your pageDef's binding to #{sessionScope.CustNum} in your ExecuteWithParams binding.
    I did lot of ExecuteWithParams thing and no problems occur so far.

  • Custom tag attribute calculated by scriptlet expression

    Hi,
              If I set the rtexprvalue subelement of the attribute element in my tld to
              "true", should I be able to dynamically determine the value of my custom tag
              attribute using a scriptlet expression?
              When I include the custom tag reference:
              <prod:getCategory id="category"
              categoryID="<%=request.getParameter("catID")%>" scope="page"/>
              it actually gets written to the html as:
              <prod:getCategory id="category" categoryID="2133" scope="page"/>
              and is not recognized as a jsp tag.
              I am using weblogic 6.0 sp1.
              Thanks in advance!
              daniel
              

    I had the same problem in a design a couple of months ago and could not get around it so I switched the functionality into code and out of the tag lib.
    I take it you are trying to do something like this?
    <%
    String value="hiworld";
    %>
    <mytaglib:saysomething value="<%=value%>"/>

  • Custom tag attribute question

    How to assign value of expression or variable to custom tag attribute in jsp?

    I had the same problem in a design a couple of months ago and could not get around it so I switched the functionality into code and out of the tag lib.
    I take it you are trying to do something like this?
    <%
    String value="hiworld";
    %>
    <mytaglib:saysomething value="<%=value%>"/>

  • IsolatedClientSession (10.1.3) vs. custom session broker

    Hi, Doug.
    You may still remember the design of the custom session broker originated from you in our project.
    Basically, we dynamically partition the classes during the session initiation time such that all the read-only classes (reference data) are put to a shared server session and all the non-read-only classes (transactional data) to a database session. A custom client session broker is constructed based on two sessions, the shared server session and a private database session whose life only spans a single transaction. The main idea here is that, the transactional data is volatile, and should not been cached in the shared session cache.
    Now, with TopLink_10.1.3 available, I noticed that there is a new type of session called isolated client session, and that a class can be configured to be isolated. In my understanding, this solves the exactly same problem as the custom session broker.
    I did some investigation to see whether it is possible for replace the custom session broker by the isolated client session. However, I got a run time exception:
         Isolated Data is not currently supported within a Client Session Broker.
    My questions is:
    Is the isolated data to be supported by the client session broker soon?
    Or you have other suggestions?
    Thanks.
    Zhonghua

    Thanks for your response.
    Yes, you are right, and it is not entirely necessary for us to use SessionBroker any more. I already did some experiments in this regard.
    But, there are two downsides here:
    (1) The existing code and configuration are tied to the SessionBroker, and lots of changes would be required.
    (2) SessionBroker does provide us some flexibility in case we do need to use multiple databases in the future.
    Therefore, if TopLink will support isolated classes in the client SessionBroker soon, it would be better for us to just wait for a future release.

  • Unable set session attribute with certain types.

    Hello I was surprise that when I execute HttpSession.setAttribute("somekey", new HashMap()), "somekey" will not be stored in the Session. I can replace HashMap with HashSet and it's okay.
              Out of curiosity, I create a Java class like below :
              public class abc implements Serializable {
              public String def = "def";
              And I have the same issue with HashMap and it will not get stored in the Session attribute. Does anyone know what kind of valid object and what makes the object storable into the Session's attribute? Any inputs are appreciated. Thanks.
              yien

    Actually never mind. It have something to do with BEA's Portal Ad services. I will post this into the appropriate forum.

  • Display custom hosts attributes in Internal Identity Store

    Any one know how to Display custom attributes to the Internal Identity Store
    I have created several attributes, but can't seem to find anyway to add them to the display window.
    Cheers

    They are displayed by default and there's no actual way to hide them.
    Are you sure that you didn't create a customer HOST attribute and are looking in the internal user table or vice-versa ? Host and users have different custom attributes page. That's the only explanation I See

Maybe you are looking for

  • Cannot Delete Computers from OD

    I had the problem where I couldn't delete users from OD, but changing the password type fixed that. Now I am having the same problem with deleting computers, but I don't know of a work around. Here is the error I am getting: Got unexpected error Erro

  • Sending an open HTML file as an email

    I am knew at this. I have created a newsletter in Dreamweaver and want to be able to send it to both pc users and mac users so that the newsletter is open when they receive it. First, is that possible and if so, how do I do it?

  • Vanishing MobileMe Galleries

    So last time I used iPhoto it alerted me that MobileMe albums X,Y, and Z were being deleted. I still had the originals in the main library so I wasn't really worried about it. I just clicked OK and continued on my way, confused but not overly concern

  • Import same documents for content server

    Good afternoon , I need import same documents for the content server , I have one cd wich 400 imagens in pdf all on contrat , i want import all for the content server. how i get this ? att Angelo

  • My final cut pro will not launch, I keep getting Final Cut Pro quit unexpectedly

    I've done everything to deleting preferences and plug ins to re installing it, someone please help me with this problem