Bean value disappear

Hello,
IDE: RAD 6.0.1
WebSphere: 6.0 [BASE 6.0.2.5 cf50549.21]
OS: Windows XP
It looks like some bean (session scope) values disappear while displaying in JSF.
I did the following check to make sure whether routine is really stores the value or not. The confusing part is it displayed some values and some not.
In the following object.getValue() displays properly on console but not while JSF executed. I have some other parameters too and displayed properly.
I also make sure that all values binded to output text properly or not.
MyObject object = dataobj.selectData();
System.out.println("going to display: "+object.getValue());
if (object != null) {
getFacesContext().getApplication().createValueBinding( "#{mybean}").setValue(getFacesContext(), object);
} else {
message = "There has been a problem in submitting to your request.";
Any idea? Suggestions?
Thanks,
Pratik

I want to store that value returned by the bean:write into a local variable so that i can pass it to a script ..
eg:
<logic:iterate name="resourceRequirementForm" property="grades" id="grade" indexId="index">
str varname='<bean:write name="grade" property="value"/>';
</logic:iterate>
can this be done: storing of value i a variable

Similar Messages

  • How to assign bean value to a local variable in JSP using struts.

    Hi everybody!
    I've a problem that puzzled me on how to assign a bean value to a local variable like String in JSP using struts.
    we can have someting like this to display the value
    <bean:write name="detailService" property="status" />or
    <bean:define id="theStatus" name="detailService" property="status"/>
         This is country: <%=theStatus%>but an error occured when I tried like this:
    String currentStatus = "<bean:define id="theStatus" name="detailService" property="status"/>";
    or
    String currentStatus = "<bean:write name="detailService" property="status" />";Is there a way to do this?.....
    Any help pretty much appreciated

    Java != JSP.
    The <bean:define> and <bean:write> tags are custom tags meant to appear in the HTML section of a JSP file, as opposed to the scriptlet section. They actually get turned into java code as part of the translation process.
    The <bean:write> tag naturally just writes out what you tell it to.
    The <bean:define> tag defines a local variable, and gives it a value.
    this should do it.
    <bean:define id="theStatus" name="detailService" property="status" type="java.lang.String"/>
    <%
      String currentStatus = theStatus;
    %>With the advent of JSTL, you shouldn't really need to use scriptlet code anymore. Personally I am for 0% scriptlet code in any jsp I write.

  • Personas 2 SP2: field values disappear after entry?

    Hi Folks - we made a couple of changes to our Personas 2.0 flavors for IMA1N and IMA2N. The flavors work fine in our development system. After transporting the flavors to our QA system we now see a problem with data entry. When data is entered into certain fields and the enter key is pressed, the data values disappear.  Tab-caching is used on these flavors but I am not sure if this is the issue.  It is possible that I missed something when building the transport in /PERSOS/ADMIN_UI.  I selected only the flavors to be transported.
    Can anyone think of a reason why this would happen?
    Thanks!  Jeff

    Hi Jeff,
    Does the tab caching indicator turn red? It is possible the QA system or the data used has additional validations that prevent the tabs from being selected to continue the tab caching routine.
    If everything looks OK and it is still an issue, please create a support ticket.
    Regards
    Kranthi

  • How to call the form bean value on jsp withthe help of jstl tag

    hi
    all friends
    i am working in struts & i use jstl tag in jsp. i have one problem rise is how to call the form bean value in jsp page by using jstl tag.
    i now how to retrive the value through jsp:logic
    eg. <logic:empty name="userListForm" property="users">
    NO USER FOUND
    </logic:empty>
    see * userListForm mean formbaen name.
    * users means collection object.
    so how can i write above e.g in jstl

    You use the jstl core:if or core:choose combined with the EL:
    <c:if test="${empty users.userListForm}">
    NO USERS FOUND
    </c:if>I suggest you lookup the jsp expression language (EL) using google, it's very powerful.

  • How do I update a bean value from an AJAX call?

    Hi all,
    How do I update a bean value from an AJAX call? I suppose I could write a servlet to do it. However, this seems like a common problem, so I was wondering if there was some built in solution.
    Thanks,
    Grae
    Edited by: caalip2 on Mar 30, 2010 1:07 PM

    caalip2 wrote:
    Raymond
    Basically, I would user the following. The first choice for IE, the second for Firefox.
    new ActiveXObject("Microsoft.XMLHTTP");
    new XMLHttpRequest();
    GraeDon't do this to yourself. If it were that easy there wouldn't be AJAX frameworks for JSF. Find one you like and use it. I've used a4j (part of RichFaces) successfully.

  • Custom Tabular form - Session state values disappear

    Hi,
    I have a custom tabular form page using apex_item and apex_collections. I am using the apex_collection to store the values in memory in order to avoid the data loss in session state. The page is working fine after a validation failure and it shows the values on the second report (as advised for custom tabular forms).
    In this, some of the rows have clob value which needs to be edit on a rich text editor. Since apex_item does not provide a solution to have rich text editor, I have to branch to another page on an Edit link for the CLOB data using a modal window. However When I return back from the modal page, the values disappear from session state, and the validation (using htmldb_application.g_fxx arrays) does not take place.
    Is there any workaround to overcome this issue?
    Apex version: 4.1
    Thanks in advance.
    Natarajan

    Thanks Daniel for your reply.
    Actually its an interface with a custom tabular form on page 1 with apex collections and rich text editor on page 2. Since it is not possible to have the rich text editor, I need to have it in another page (I could have it the same page, that is the way I am trying now) however I open the next page as a modal window.
    I have a link on the tabular form, so that the clob content is opened in the rich text editor on the next page. After the edit, I update it to the same collection and go back to the tabular form page and refreshes the report. It works fine, but causes trouble to the data entered on the other columns in the custom tabular form.
    I have now deviated to another work and put this on a hold. If my explanation is still not clear, I will create the same page in apex.com to simulate the error.
    Thanks again.
    Natarajan
    Edited by: Nattu on Mar 14, 2012 11:35 PM

  • Values disappearing in my JSP page

    HI Guys
    i am stuck with a problem for which i need your help.i will list my query below
    In my JSP i am having a combo box from which i can select values needed for data manipulation and navigation to other page.Firstly i select a value from the combo box in my main JSPand do necessary processing.After navigation to other JSP pages i have a condition that if input successful then return to the main JSP other wise to someother jsp.
    Here my problem is that when on successful manipulation when i come back to the main JSP all the values in the combo box disappear. i know that i need to set the values before coming back ,i have done that but i am not able to figure out what is happening still values disappear.
    please let me know what i shoud do to resolve this issue.waiting for your replies.
    Regards
    Vikeng

    hi :-)
    set the value of firstname after submit
    <%
    session.setAttribute("firstname", txtFirstname);
    %>retrieve the value of firstname in the submitted page. Note about the scenario when the user first visit the site ;-)
    String firstname = session.getAttribute("firstname");put the value of firstname on our textbox ;-)
    <input type="text" name="txtFirstname" id="txtFirstname" value="<%=firstname%>" />hope you get the idea, i got to go home for now friend. goodluck ;-)
    regards,

  • Values disappearing from my JSP page

    HI Guys
    i am stuck with a problem for which i need your help.i will list my query below
    In my JSP i am having a combo box from which i can select values needed for data manipulation and navigation to other page.Firstly i select a value from the combo box in my main JSPand do necessary processing.After navigation to other JSP pages i have a condition that if input successful then return to the main JSP other wise to someother jsp.
    Here my problem is that when on successful manipulation when i come back to the main JSP all the values in the combo box disappear. i know that i need to set the values before coming back ,i have done that but i am not able to figure out what is happening still values disappear.
    please let me know what i shoud do to resolve this issue.waiting for your replies.
    Regards

    hi :-)
    1. put the value in session
    or
    2. after successful submission, pass the submitted value in the previous page
    Please dont cross post, thank you :-)
    http://forum.java.sun.com/thread.jspa?messageID=4487269#4487269
    regards,

  • ADF BC how to access session backing bean value in servlet

    Hi everyone,
    How do I access session backing bean value in a servlet?

    Frank, thanks for your reply.
    I'm not sure how I can incorporate this example into my situation. Let me explain more detail about my problem.
    "servlet" in my post here actually means a custom servlet I wrote for rendering an image that is stored in db as ordimage. In this servlet, I get hold of my appmodule by using Configuation.createRootApplicationModule(). By doing so (If I'm not wrong) a new database session/connection is created. What I'm going to achieve is set application context for this new session/connection in db with the data stored in a session backing bean in the view layer.
    I can pass the required data to the servlet thru url parameter, but I don't want to do it this way for the reason that the data may contains sensitive information.
    I hope I have explained myself well.
    Message was edited by:
    bsmt

  • LUMIRA: Values disappear in column Chart

    Hi Experts,
    I have been working with Lumira, I am using column Chart, but when I put in the dimension X Axis the Dirección. I cannot see all the values (we have nine directions). These values disappear.
    If I change the chart to position “Horizontal”, I can see more values but not all.
    Could you help us with this issue? Someone has reported this problem?
    DGFM

    That is very strange - I haven't seen that.
    Unless SAP responds here I recommend logging a ticket with SAP Support

  • Using bean value in NLS text entry

    Hi all,
    Is there a way I can use the JHeadstart NLS function like
    title="#{nls['HOME_PAGE_TITLE']}"
    and include a bean value in the title
    eg " Welcome #{jhsUser.userId} to my wonderful application".
    I use JHS_TRANSLATIONS to store my text - if I enter the value as above, the jhsUser expression does not get rendered
    Cheers,
    Brent

    Just after posting this message I saw that the exact same thing had been done in the page I had just generated !
    So, the answer is to use this
    text="#{nls['HOME_WELCOME_MSG: #{jhsUser.displayName}']}"Is there a way to inject this in through the JHeadstart application definition ? If I place the value in the Display Title property it further wraps the text with extra nls and {}.
    Is my only option to create a custom template for grouTemplate.vm ?
    Cheers,
    Brent

  • CS4 eye dropper values disappear after grouping mask layer with next layer

    Have an adjustment/curve with a mask (layer1).  Under layer 1 is a second layer with just an image needing color correction(layer2). When I group the top layer1 with  image layer2,  the colour values disappear in the info pallette. Never did this in any other version of PS..... Strange?

    Yes!  I am confused too!  But, no, I am positive of the approach as I saw it in use.  Can you read a .psd image from an e-mail?  (I'm really stupid about most things.)  If yes, then I can send each step - otherwise...
    Do these steps and watch the result.
    Open an image.
    Make a selection.
    New layer via copy from the Layers Menu Icon (L1 - blank)
    ON LAYER 1 !!!
    CMND + New Layer Via Copy (creates ...)
       L2 and it will have the marching ants outline of/from Background. 
    (Option+Layer Mask and the selection appears in solid black in the layer mask box)
    NOTE:  You don't have to create that blank L1 - you can 'just' from Background/selection CMND+New Layer and get the outline copied to L1(in this case).  What I saw involved first creating a blank layer as above - really.  The next steps, make the selection in L2 appear and the L1 disappear (deleting is cheating...)
    Wish I had a clue
    Is what I've done - so far - right?
    How to make the layer/selection appear in L2.
    Thanks.
    chris pantaleoni
    Pantaleoni Photographer
    2690 Historic Decatur Road, Suite 201
    San Diego, California 92106
    619-857-7280  e-mail:  [email protected]

  • Keyflex value disappears from page when lov event is fired

    Hi All,
    There is a keyflex field and one lov field in my page. When i select the value from kff and after that selecting any value from lov item my kff value disappears from page.
    Plz help asap.............

    Hitesh,
    Mukul, i can put my own Add another row button and do cusom code,but what about other events?
    Yes, see dev guide and old threads. It has been explained in dev guide claerly and have also replied this in old threads.--Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Bean value to amx:verbatim to make HTML dynamic ADF Mobile

    Hi guys,
    As using <amx:verbatim> to insert HTML directly in AMX page for ADF Mobile.
    <amx:verbatim id="v1">
          #{PolicySummaryBean.currentSVG1}
        <![CDATA[
    #{PolicySummaryBean.currentSVG2}
    ]]>
        </amx:verbatim>
    Btw I tried to using bean value as EL to produces HTML from bean and seems didn't work
    How to make it possible ?
    Thanks

    Hi,
    don't think it will execute EL this way. However,you should be able to execute JavaScript (what you should keep in mind though is that any DOM manipulation on AMX page rendering is a risk and can put you into trouble). What is the HTML you want to insert (and to what extend do you control the metadata tags added to the AMX page this way? Wouldn't it be possible to add the content using AMX components?
    Frank

  • Bean value storing to varable:

    I want to assign the bean value to a variable can it be done:
    <% int age = <bean:write property="age"/> ; %>

    I want to store that value returned by the bean:write into a local variable so that i can pass it to a script ..
    eg:
    <logic:iterate name="resourceRequirementForm" property="grades" id="grade" indexId="index">
    str varname='<bean:write name="grade" property="value"/>';
    </logic:iterate>
    can this be done: storing of value i a variable

Maybe you are looking for