Please help How to clear session after calling method..is anything wrong

I am facing issue while adding and removing text fields, looks like somehow textfields values are stored in session.
Please help, is there anything wrong in the code...
Example Detail :
a) I am genereating textfields dynamicaaly using ui:repeat
If I add 3 textfields say with Values "AAAA", "BBBB" and "CCCC" in a row.
b) When I click on remove link against "BBBB" row, on the UI it removes "CCCC" BUT I checked the backend methods which handles this, it looks like it is removing correct "BBBB" in ProjectHome.removeTreatmentLink().
c) Even if "CCCC" is removed, assuming 2 rows with "AAAA", "BBBB" are left on clicking "Add treatment link" it adds a row but displays value as "CCCC"
There is no database interaction at this point.
Log on clicking "ProjectHome.removeTreatmentLink()" link:
+[STDOUT] ProjectHome.removeTreatmentLink(), compare reagent hashcode : reagentEnitty[0]16784247, HASCODE FROM FORM UI=16784247+
+[STDOUT] ProjectHome.removeTreatmentLink(), Size of T=3+
+[STDOUT] ProjectHome.removeTreatmentLink(), FINAL Comp name left = AAAA+
+[STDOUT] ProjectHome.removeTreatmentLink(), compare treatment hashcode 2 : TreatmentEntity[1]5700104, HASCODE FROM FORM UI=5700104+
+[STDOUT] ProjectHome.removeTreatmentLink(), TreatMent.CompName TO REMOVE =BBBB+
+[STDOUT] ProjectHome.removeTreatmentLink(), FINAL Comp name left = CCCC+
+[STDOUT] ProjectHome.removeTreatmentLink(), outside for, reagent.getTreatment() = [com.entity.Treatment@b4818[+
treatmentCompoundName=AAAA
+.......+
+], com.entity.Treatment@56fa08[+
treatmentCompoundName=BBBB
+.....+
+], com.entity.Treatment@127d1b4[+
treatmentCompoundName=CCCC
+......+
+]]+
XHTML:------
<ui:repeat value="#{projectHome.reagent.treatment}" var="itreat">
<h:inputText value="#{itreat.treatmentCompoundName}"/>
</ui:repeat>
<h:commandLink action="#{projectHome.removeTreatmentLink}"
  value="Remove"
  onclick="if (!confirm('Are you sure you want to remove this treatment?')) return false;">
<f:param name="re_hashcode" value="#{info.hashCode()}"/>
<f:param name="tr_hashcode" value="#{itreat.hashCode()}"/>
</h:commandLink>
ProjectHome.java----------------
@Name("projectHome")
public class ProjectHome extends EntityHome<Project> {
public String removeTreatmentLink(){
  javax.faces.context.FacesContext facesContext = (new org.jboss.seam.faces.FacesContext()).getContext();
  javax.servlet.http.HttpServletRequest hsr=(javax.servlet.http.HttpServletRequest)facesContext.getCurrentInstance().getExternalContext().getRequest();
  String reagentHashcode=hsr.getParameter("re_hashcode");
  String treatmentHashcode=hsr.getParameter("tr_hashcode");
  for(int i=0;i<reagent.length;i++){
      System.out.println("ProjectHome.removeTreatmentLink(), compare reagent hashcode : reagentEnitty["+i+"]"+reagent.hashCode()+", HASCODE FROM FORM UI="+reagentHashcode);
if(reagent[i].hashCode()==Integer.parseInt(reagentHashcode)){
int sz=reagent[i].getTreatment().size();
Treatment t[] = new Treatment[reagent[i].getTreatment().size()];
for(int k=0;k<t.length;k++){
t[k]=reagent[i].getTreatment().get(k);
System.out.println("ProjectHome.removeTreatmentLink(), Size of T="+t.length);
Treatment t1[] = new Treatment[t.length-1];
ArrayList<Treatment> al= new ArrayList<Treatment>();
for(int j=0;j<t.length;j++){
if(t[j].hashCode()==Integer.parseInt(treatmentHashcode)){
System.out.println("ProjectHome.removeTreatmentLink(), compare treatment hashcode 2 : TreatmentEntity["+j+"]"+t[j].hashCode()+", HASCODE FROM FORM UI="+treatmentHashcode);
System.out.println("ProjectHome.removeTreatmentLink(), TreatMent.CompName TO REMOVE ="+t[j].getTreatmentCompoundName());
}else{
System.out.println("ProjectHome.removeTreatmentLink(), FINAL Comp name left = "+t[j].getTreatmentCompoundName());
al.add(t[j]);
System.out.println("ProjectHome.removeTreatmentLink(), outside for, reagent[i].getTreatment() = "+reagent[i].getTreatment());
reagent[i].getTreatment().clear();
reagent[i].setTreatment(al);
break;
return "";

In the future, you should be posting JSF related questions at the JSF forum.
I see in your message history that you already posted one there some days ago. Since I saw it again, yes I recall your topic and I also recall that I initially ignored it because you marked it as urgent. [That was not so smart|http://www.catb.org/~esr/faqs/smart-questions.html].
val_123 wrote:
Please help, is there anything wrong in the code... According to your problem: you need to preserve exactly the same datamodel during the apply request values phase of the form submit request as it was during the render response phase of the initial display request. This is also told several times in all of those countless "commandlink dont work in datatable" topics in the JSF forum. The same story goes on other UIData components like ui:repeat as well.
Edited by: BalusC on 1-dec-2008 14:47

Similar Messages

  • Hi, when ever I'm using 3G, on my Iphone4 sim stops working and Network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem.

    Hi, when ever I'm using 3G, on my Iphone4 sim stops working and network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem. Thanks.

    Photos/videos in the Camera Roll are not synced. Photos/videos in the Camera Roll are not touched with the iTunes sync process. Photos/videos in the Camera Roll can be imported by your computer which is not handled by iTunes. Most importing software includes an option to delete the photos/videos from the Camera Roll after the import process is complete. If is my understanding that some Windows import software supports importing photos from the Camera Roll, but not videos. Regardless, the import software should not delete the photos/videos from the Camera Roll unless you set the app to do so.
    Photos/videos in the Camera Roll are included with your iPhone's backup. If you synced your iPhone with iTunes before the videos on the Camera Roll went missing and you haven't synced your iPhone with iTunes since they went missing, you can try restoring the iPhone with iTunes from the iPhone's backup. Don't sync the iPhone with iTunes again and decline the prompt to update the iPhone's backup after selecting Restore.

  • After updating my Macbook Pro retina display to os x yosemite 10.10.2, the mause and track pad locks, and do not respond especially when using the Mac for a long period, please help, how can I solve this, I do not like feel like in windows, so I paid

    after updating my Macbook Pro retina display to os x yosemite 10.10.2, the mause and track pad locks, and do not respond especially when using the Mac for a long period, please help, how can I solve this, I do not like feel like in windows, so I paid good money for this mack, I feel calm

    Hi Buterem,
    I'm sorry to hear you are having issues with your MacBook Pro since your recent Yosemite update. I also apologize, I'm a bit unclear on the exact nature of the issue you are describing. If you are having intermittent but persistent responsiveness issues with your mouse or trackpad, you may want to try using Activity Monitor to see if these incidents correspond to occupied system resources, especially system memory or CPU. You may find the following article helpful:
    How to use Activity Monitor - Apple Support
    If the entire system hangs or locks up (for example, if the system clock freezes and stops counting up), you may also be experiencing some variety of Kernel Panic. If that is the case, you may also find this article useful:
    OS X: When your computer spontaneously restarts or displays "Your computer restarted because of a problem." - Apple Support
    Regards,
    - Brenden

  • Please help my ipad just rebooted after me turnng it on and it is in wat people call a endless reboot mode where it wont start up please help

    please help my ipad just rebooted after me turnng it on and it is in wat people call a endless reboot mode where it wont start up please help

    Hi Patkid27,
    Welcome to the Support Communities!
    The article below may be able to help you with this.
    Click on the link to see more details and screenshots. 
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/ts3281
    Cheers,
    - Judy

  • Hi, please help my other daughter her ipod touch is disabled connect to itunes after say its itunes couldnt connect to the ipod touch coz its is locked with a passcode?? please help how...

    hi, my daughter hers ipod touch is disabled connect to itunes after say its itunes couldnot connect to the "ipod touch" because its is locked with a passcode please help how to fix connect...i did turn off her ipod touch put usb back on there same in doenot say still ipod is disabled i dont understand please help how???

    If You Are Locked Out Or Have Forgotten Your Passcode or Just Need to Restore Your Device
      1. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
      2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
      3. iOS- Understanding passcodes
         If you have forgotten your Restrictions code, then follow the instructions
         below but DO NOT restore any previous backup. If you do then you will
         simply be restoring the old Restrictions code you have forgotten. This
         same warning applies if you need to restore a clean system.
    A Complete Guide to Restore or Recover Your iDevice (if You Forget Your Passcode)
    If you need to restore your device or ff you cannot remember the passcode, then you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and re-sync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone, iPad and iPod touch software.
    Try restoring the iOS device if backing up and erasing all content and settings doesn't resolve the issue. Using iTunes to restore iOS devices is part of standard isolation troubleshooting. Restoring your device will delete all data and content, including songs, videos, contacts, photos, and calendar information, and will restore all settings to their factory condition.
    Before restoring your iOS device, Apple recommends that you either sync with iTunes to transfer any purchases you have made, or back up new data (data acquired after your last sync). If you have movie rentals on the device, see iTunes Store movie rental usage rights in the United States before restoring.
    Follow these steps to restore your device:
         1. Verify that you are using the latest version of iTunes before attempting to update.
         2. Connect your device to your computer.
         3. Select your iPhone, iPad, or iPod touch when it appears in iTunes under Devices.
         4. Select the Summary tab.
         5. Select the Restore option.
         6. When prompted to back up your settings before restoring, select the Back Up
             option (see in the image below). If you have just backed up the device, it is not
             necessary to create another.
         7. Select the Restore option when iTunes prompts you (as long as you've backed up,
             you should not have to worry about restoring your iOS device).
         8. When the restore process has completed, the device restarts and displays the Apple
             logo while starting up:
               After a restore, the iOS device displays the "Connect to iTunes" screen. For updating
              to iOS 5 or later, follow the steps in the iOS Setup Assistant. For earlier versions of
              iOS, keep your device connected until the "Connect to iTunes" screen goes away or
              you see "iPhone is activated."
         9. The final step is to restore your device from a previous backup. If you do not have a
              backup to restore, then restore as New.
    If you are restoring to fix a forgotten Restrictions Code or as a New device, then skip Step 9 and restore as New.

  • How to clear the hung calls in CUBE?

    I'm installing a new CUBE as SIP-SIP gateway in Cisco 2921, IOS: 15.1(4)M3. When i tried few test calls, I saw couple of hung calls in it.
    I tried clearing them manually with the below command but it didn't help.
    clear call voice causecode identifier{id identifier | media-inactive | calling-number number | called-number number}
    >> https://supportforums.cisco.com/docs/DOC-34379
    The call legs are still in connecting status.
    2    : 2152 13:36:28.319 CET Tue Feb 11 2014.1 +-1 pid:200 Answer 222022029 connecting
    dur 00:00:00 tx:0/0 rx:0/0
    IP X.X.X.97:24578 SRTP: off rtt:0ms pl:0/0ms lost:0/0/0 delay:0/0/0ms g711ulaw TextRelay: off
    media inactive detected:n media contrl rcvd:n/a timestamp:n/a
    long duration call detected:n long duration call duration:n/a timestamp:n/a
    2    : 2157 13:38:54.589 CET Tue Feb 11 2014.1 +-1 pid:200 Answer 222022029 connecting
    dur 00:00:00 tx:0/0 rx:0/0
    IP X.X.X.97:24582 SRTP: off rtt:0ms pl:0/0ms lost:0/0/0 delay:0/0/0ms g711ulaw TextRelay: off
    media inactive detected:n media contrl rcvd:n/a timestamp:n/a
    long duration call detected:n long duration call duration:n/a timestamp:n/a
    Also, I tried enabling media inactivity timer but it would clear only the calls in 'Connected' status If I understand correctly.
    how to clear those hung calls? and what could be the cause of it?
    Any help would be much appreciated.
    Thanks in advance
    Suresh

    Suresh have you tried this:
    ip rtcp report interval 5000
    gateway
    timer media-inactive 5
    The challenge you may face is that the media inactivity was not configured before this call started, hence it cant activate the time for this particular call...
    Give it a go, lets know if it works. Even if it doesnt I suggest you enable this on your CUBE going forward, so you dont haver hung calls in the future
    example: You can use the debug ccsip events to see the media inactivity timer kicking in for a call...
    Router# debug ccsip events
    00:04:29: sipSPICreateAndStartRtpTimer: Valid RTP/RTCP session found and CLI ena
    bled to create and start the inactivity timer
    00:04:29: sipSPICreateAndStartRtpTimer:Media Inactivity timer created for call.
    Mfactor(from CLI): 5 RTCP bandwidth: 500
    RTCP Interval(in ms): 5000
    Normalized RTCP interval (in ms):25000
    Please rate all useful posts
    "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"

  • Please Help,how do i get my iphone 4 to play all my songs from icloud, it is currently only playing just a smal number of songs from my library which is stored in icloud.

    Please Help,how do i get my iphone 4 to play all my songs from icloud, it is currently only playing just a smal number of songs from my library which is stored in icloud.

    There are a number of OS X apps, many free, that will save your messages, allowing to view and print them. 
    http://www.softwarebbs.com/wiki/How_to_transfer_SMS_from_iPhone_to_Mac,_backup_i Phone_SMS_message_on_Mac
    Google, for other options
    Your "other" of 6 GB may include corrupted data or file sytem errors. If after removing the messages there is still >2GB, you will need to restore the phone in iTunes, first using a backup (made after deleting the messages) and if needed as a new iPhone.
    iTunes: Restoring iOS software

  • I want to cahage my peyment method ( i wana do take out my credit card  from there) please help how???

    want to cahage my peyment method ( i wana do take out my credit card  from there) please help how???

    You can't change to 'None' until you clear up the previous payment problem.  Add a fresh iTunes gift card, or add a credit card, and then once the billing issue clears, you can choose 'None' again.

  • Please help me to clear my iTunes Store download queue., Please help me to clear my iTunes Store download queue.

       Please help me to clear my iTunes Store download queue.

    Finally, I got it.
    After spending most of Friday night on the issue, I found the following at ...
    http://support.apple.com/kb/ts3297
    Obviously, some srewed up downloads have been sitting in the download folder and causing a) crashes at start-up (since itunes will try immediately to continue the download after start up) and b) avoiding anything else to be downloaded (seems to be a kind of "first come- first to be downloaded"-arrangement).
    I found several "downloads"-folders using Spotlight. Most likely, because I moved the iTunes library to access it from my account as well as from the account of my wife (at the same computer). I deleted all those downloads-folders and ... voila .. suddenly the downloads continued. Funny, that there have been more conflicts in the queue of app 20 files to be downloaded. Means, I could download 5 and the problem came back. I repeated the procedure and could continue with the remaining 15 files.
    After all, iTunes' download behaviour is back to normal. Songs, movies, apps, podcasts can be downloaded without any issue.
    Stefan

  • While opening the iTune Store i receive the following error, "The procedure entry point ADAdPolicyEngine_DidEnterSation could not be located in the dynamic link library iAdCore.dll" Please help me to clear this error.

    While opening the iTune Store i receive the following error, "The procedure entry point ADAdPolicyEngine_DidEnterSation could not be located in the dynamic link library iAdCore.dll" Please help me to clear this error.

    I faced the same issue. This solved it for me: Troubleshooting issues with iTunes for Windows updates
    Hope this helps.

  • HT201270 i have just updated my old 3GS and now when i am on restore the window is comming up and asking for a password. i have not set up a password for restore, please help how i can restore my date???

    i have just updated my old 3GS and now when i am on restore the window is comming up and asking for a password. i have not set up a password for restore, please help how i can restore my date???

    capriz wrote:
    i have just updated my old 3GS ...
    To what... iOS 7 is Not supported on the 3 GS

  • I bought a used iphone from a friend and I am not able to use it in Ethiopia. It is carrier blocked. Can you please help how could I unlock my iphone 4?.

    I bought a used iphone from a friend and I am not able to use it in Ethiopia. It is carrier blocked. Can you please help how could I unlock my iphone 4?.

    Unlikely as you do not meet there requirements for unlocking.
    Have your friend the provided the phone contact them.  Based on your statements I am concluding he was or still is an AT&T customer, that is one of the requirements of getting the device unlocked.

  • For updation of IOS 7.1.1 passcode required,I forget my passcode please help how can I get my passcode

    Hello,
    I forget my passcode please help how can I get my it

    You will need to try to restore your iPad from the same computer that you most recently synced to.
    Read this: http://support.apple.com/kb/ht1212
    If you can't do the restore then you will need to try Recovery Mode.
    Read this: http://support.apple.com/kb/ht1808
    Follow the instructions very carefully.

  • How to clear cache after mime object is updated?

    Hi Expert,
        I create a mime object (such as "test1.jpg") in mime repository.
       In web dynpro, I add two UI elements: a formatted text edit and a File-Upload "Insert Image",
       after I click the File-Upload "Insert Image",
       I select an image file (such as test2.jpg) from local directory, and upload the content of the image file to mime object(test1.jpg) in mime repository.
       at the same time, I insert a line into formatted-text-edit as "<img src="/SAP/Public/.../test1.jpg" />".
       I double click the mime object (test1.jpg), its content has changed as test2.jpg,
       however, formatted-text-edit still displays the content of test1.jpg.
       When I mannually clear the cache of IE, and refresh the web, Formatted-text-edit display the content of test2.jpg.
      It's obvious that the cache of http server isn't cleared.
      How to clear cache after mime object is updated?
      Any suggestions are welcomed.
      Thank you.
    Best Regards,
    Derek
    P.S. the source code:
    lv_url = '/SAP/BC/WebDynpro/SAP/ZENHANCE_IA/test1.jpg'.
      lo_mine_rep = cl_mime_repository_api=>get_api( ).
      lo_mine_rep->put(
        EXPORTING
          i_url     = lv_url
          i_content = lv_file_string ).
    Edited by: Derek Zhao on Sep 20, 2010 6:21 AM

    Hi Derek,
    Have you tried the method INVALIDATE_ICM_CACHE of class CL_MIME_REPOSITORY_API ?
    Regards,
    Anand

  • I have windows 8 and I got this error "Adobe Photoshop has stopped working" whenever I start a program. please help. how can I fix this problem? many thanks

    i have windows 8 and I got this error "Adobe Photoshop has stopped working" whenever I start a program. please help. how can I fix this problem? many thanks

    Please read these and proceed accordingly:
    http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html
    http://forums.adobe.com/docs/DOC-2325

Maybe you are looking for

  • Macbook Pro with Dual hard drives. Scratch Disk, Memory 64bit, Raid, Set Up Questions.

    Hello, this is my first post. I just upgraded from the original 2006 17" Macbook Pro to a refurbished 13" Macbook Pro 2.53GHZ 4GB Ram (2009 model). I bought the MCE Tech Optibay and installed it (if you dont know anything about it, ask me, its amazin

  • Is Compliance Calibrator the same as GRC Access Control?

    I have been asked to look at<b> Compliance Calibrator </b>and am getting confused about what functionality is offered. I have done the basic e-learning course for Compliance Calibrator (GRC200): this was all about separation of duties etc. Fair enoug

  • MBP 2013 Sleeping, fans running, but no display

    Hi. I have this reocurring problem with my MBP late 2013 (the £1.8k model). Sometimes when I put the machine to sleep it will not wake but the fans will be running and the only way to recover from this state is to reset the machine using power+alt or

  • How do I get Itunes to stop playing song where I left off?

    Whenever I play a song it starts from where I ast left off, which to me is getting kind of annoying, since I'm used to it playing from the beginning. I also switch songs either in the middle or towards the end..So it's a hassle to go switch the time

  • Make connections in Mobile Application Modeler

    Hi community, today i downloaded the mobile application modeler (MOAM). Now i'm trying to doe the tutorial in the How To.. guide. At one point i have to do a connect between an outbound plug of the application itself and an inbound plug of a task. I