tags:

views:

41

answers:

2

hi

i had a situation in which i need to project the data on clicking the link for this on click of link i`m passing the values as a query string to the pop up and setting that values to the fields in the pop up.

Here the problem is i'm able to get the correct data on the first click on the page and after that when i clicked on another link it is still projecting the same data of my old link.But i'm clearly seeing the new values that i`m setting to the fields in my logs they are varying....

please help me.

A: 

Can you post the code snippet? The question is not clear!

Shyam
ha ha..same second..but mine is a comment..
Omnipotent
A: 
   <h:outputLink
    binding="#{booking.lnkSlot1}"
    id="lnkSlot1"
    value="javascript:popupWindow('/BookingWeb/pages/bookedDet.jsf?bookingData=#{bookingList.value['onDate']}$slot1')">

and the page init method contains

  public void init() {
 super.init();
  ArrayList bookedPersonDetList = null ;
 String bookingDataFromRequest = (String) FacesContext
    .getCurrentInstance().getExternalContext()
    .getRequestParameterMap().get("bookingData");
      System.out.println("###bookingDataFromRequest###" +bookingDataFromRequest);
      if(bookingDataFromRequest != null){
       StringTokenizer token = new StringTokenizer(bookingDataFromRequest,"$");
       String onDate = token.nextToken();
       String slot = token.nextToken() ;
       //String test = onDate + slot ;
      // this.stTest.setText("");
       //System.out.println("Setting this to text :::  "+ test);
      // this.stTest.setText(test);
       //this.tfOnDate.setValue(onDate);
       System.out.println("Setting this date "+onDate);
       System.out.println("Setting this Slot1 "+slot);
      try{ 
       BookingHome bookingHome;
     InitialContext ctx = new InitialContext();
     Object objref = ctx.lookup("BookingService");
     bookingHome = (BookingHome)PortableRemoteObject.narrow(objref, BookingHome.class);
     com.bookingservice.slsb.Booking  bookingRemote=bookingHome.create();
     bookedPersonDetList = bookingRemote.getBookedPersonDet("onDate", 1);
      }catch(Exception e){
       error(e.getMessage());
       e.printStackTrace();
      }
       //this.tfOnDate = new TextField();
      System.out.println(bookedPersonDetList);
       this.tfOnDate.setText(bookedPersonDetList.get(0));
      // this.tfSlot = new TextField();
       this.tfSlot.setText(bookedPersonDetList.get(1));
       this.tfBookedBy.setText(bookedPersonDetList.get(2));
       this.tfExtn.setText(bookedPersonDetList.get(4));
       this.tfProject.setText(bookedPersonDetList.get(3));
       this.taPurpose.setText(bookedPersonDetList.get(5));
       this.cbRepeat.setSelected(Boolean.FALSE);

       this.extendForSlotsOptions = (Option[]) bookedPersonDetList.get(7);
       }
}
Shivaji