Modified JTabbedPane not updating on UI

Hi all, describing my problem is kind of long winded, so thanks for bearing with me.
I'm in the process of programming a blackjack-like card game. I'm attempting to implement a way the user's cards can be 'split' by using a JTabbedPane. I made a subclass of JTabbedPane (called JHSPanel) so I could keep track of each tab and its contents (stored as JSubPanels, described below)
I also created a subclass of JPanel (called JSubPanel) that, when constructed, stores 2 normal JPanels: one to hold the images of the cards (stored as JLabels) when the player receives them, and another to hold a series of buttons (the buttons control 'Hit', 'Stay', 'Split' functionality) that I want to enable and disable at will.
The idea is that when the player splits their cards, a JHSPanel (which is the subclass of JTabbedPane) would be created with 2 tabs. In each of those tabs, a JSubPanel (the subclass of JPanel) would house the area where the cards appear on the UI and also the buttons that the player can click to hit or stay... it would be the main content area for the tab. The extra subclass methods that I wrote would allow me to add different cards to different tabs and enable or disable different buttons on different tabs by keeping track of which JSubPanel goes with which tab, and then calling methods in the JSubPanel to change its state (and because the JSubPanel is the main content area of the tab, any changed state of the JSubPanel would be reflected in the tab, which the user could see).
For instance, if a player hits on the first of his 2 split cards, I would know he pressed the button on the first tab, so I call JHSPanel.addCard((index) 0, (card object) card). This method would then call the appropriate JSubPanel for the tab at that index, and tell it to add the image of the card to the JPanel housing all the card images. This change of state for the JSubPanel would be reflected for that entire tab (because the JSubPanel is the main content area for the tab), and on the user's screen the card image would show up.
The problem is that whenever I change state for the JSubPanel, the JHSPanel does absolutely nothing on-screen. It shows up on the screen when it's initialized, but after that it might as well be locked up. My program doesn't throw out any errors, the rest of the program works smoothly, and all the states are updating correctly (I know because I have tracers inserted to alert me of the change of states). I tried repainting and revalidating the tabbed panel, the main frame, the main content window, and everything else the tabbed panel is house in, but still the UI for the tabbed panel remains unchanged from it's original initialized state. The following is the source code of both JHSPanel and JSubPanel:
public class JHSPanel extends JTabbedPane{
     private static final long serialVersionUID = 1L;
     protected static int HIT_INDEX = 0;
     protected static int STAY_INDEX = 1;
     protected static int SPLIT_INDEX = 2;
     private ArrayList<JSubPanel> tabs;
      * constructor for the JTabbedPane subclass
      * @param fragSize     number of tabs to be created
     public JHSPanel(int fragSize){
          // a list of JSubPanels
          tabs = new ArrayList<JSubPanel>();
          // create fragSize number of tabs
          for(int i=0; i<fragSize; i++){
               // JPanel to hold the states created in JSubPanel. Note that
               // this should not be necessary since JSubPanel IS a JPanel and
               // a JSubPanel should be able to plug directly into a tab
               JPanel main = new JPanel(new GridLayout(2,1));
               // creation of a JSubPanel initializes 2 normal JPanels that are stored
               // as fields:
               // 1. a regular JPanel with a FlowLayout to hold JLabels (field name: 'felt')
               // 2. another JPanel with a FlowLayout to hold the Hit, Stay, and Split
               //    buttons (field name: 'buttons')
               JSubPanel temp = new JSubPanel();
               temp.getFelt().setBackground(Color.green); // the UI reflects this code, unlike in addCard()
               main.add(temp.getFelt());
               main.add(temp.getButtons());
               tabs.add(temp);          // stores the new JSubPanel
               // this JTabbedPanel creates a tab within itself, holding the JPanel
               // (in a GridLayout) that holds 2 more JPanels (in a FlowLayout)
               addTab("Hand #"+(1+i), main);
      * sends the Card object to the appropriate JSubPanel, distinguished by fragIndex. Any
      * change to state works internally (verified by trace statements, not present), however
      * the UI does not reflect any of these changes, as it should. It's as if I'm updating
      * correctly and changing correctly an object OTHER than the one present in the UI
      * (which does not make sense because, for testing, I have only been using the index 0)
      * @param c                    Card to be added to felt
      * @param fragIndex          Index of JSubPanel in list of all JSubPanels
     public void addCard(Card c, int fragIndex){
          // adds the card to the JSubPanel
          JSubPanel subPanel = tabs.get(fragIndex);
          subPanel.addCard(c);
          // Destroys the current tab and fabricates a new one, in the hopes that
          // the UI will update to reflect the change. This does not work
          this.remove(fragIndex);
          JPanel main = new JPanel(new GridLayout(2,1));
          subPanel.getFelt().setBackground(Color.black);     // UI does NOT reflect this change
          main.add(subPanel.getFelt());
          main.add(subPanel.getButtons());
          tabs.add(subPanel);
          this.insertTab("Hand #"+fragIndex, null, main, null, fragIndex);
public class JSubPanel extends JPanel{
     private JPanel buttons;
     private JPanel felt;
     private JButton hit;
     private JButton stay;
     private JButton split;
     public JSubPanel(){
          buttons = initButtons();
          felt = initFelt();
     private JPanel initButtons(){
          JPanel main = new JPanel(new FlowLayout());
          hit = new JButton("Hit");
               hit.addActionListener(new HitButtonListener());
          stay = new JButton("Stay");
               stay.addActionListener(new StayButtonListener());
          split = new JButton("Split");
               split.addActionListener(new SplitButtonListener());
          main.add(hit); main.add(stay); main.add(split);
          return main;
     private JPanel initFelt(){
          return new JPanel(new FlowLayout());
     public void enableButtons(boolean enabled, boolean splitEnabled){
          JButton[] bArray = {hit, stay, split};
          for(JButton b: bArray){
               b.setEnabled(enabled);
          if(enabled){
               split.setEnabled(splitEnabled);
     public JPanel getButtons(){
          return buttons;
     public JPanel getFelt(){
          return felt;
     public void addCard(Card c){
          JLabel label = new JLabel(Blackjack.cardData.imageMap.get(c.hashCode));
          felt.setBackground(Color.green);
          felt.add(label);
}

Nothing was wrong in the modified classes themselves, it was how they were used by the rest of the program that made it faultyWhy is why you should always try to post an SSCCE when you have a programming problem. Asking contributors here to solve a problem that lies in code not shown is hopeless for you and frustrating for us.
While preparing your SSCCE, you will often find the guilty code yourself. Which is self-rewarding for you and more efficient for all. And of course if you don't understand why the guilty code has that effect, then you're welcome to ask the question, posting only the SSCCE.
Regards,

Similar Messages

  • Modified pictures not updated in iPhoto

    Hi everyone,
    I'm using iPhoto 11(9.3.2) to manage my photolibrary. Best tool ever.
    For modifying my pictures, I use the external application Photoshop Elements 10(10.0)
    Opening the external app, including the chosen picture works fine. Saving also.
    However: if I try to see the modifications I've made (with PSE) in iPhoto: No modifications.
    I found out that the modified picture was saved in the 'Preview'-folder (find it through finder)
    So: Photoshop Elements seems to save the picture in that folder; not in the 'master' or 'thumbnail', and I don't know why, and how to change that.
    Does anyone have a clue, how to solve this?
    Thanks for your advice!

    Hi Terence, thanks for your comment so far.
    No what I do is as follows:
    In the external editor, I make the modifications.
    After that I choose Save from the File menu.
    Then this screen appears:
    So there is a field named Save as, NO save field. Whether I choose a different name filename, it doesn't make sense.
    Now, while I was writing and figuring out the previous sentence, I found out what contributed to the problem:
    The initial filename format in iPhoto is *.JPEG
    When saving the edited picture in PSE, it automatically calls it *.jpg, so without the E.
    If I add this E to the filename, it updates the thumbnail in iPhoto -> Problem solved.
    But there is a strange extra to this:
    the picture I was modifying was scanned on an HP All-in-one scanner. For these pictures, this problem occurs.
    When editing a photo, which comes from either my iPhone, iPad or my Panasonic DMC-FZ38 there is no problem.
    So I may come to the conclusion that somewhere in the scanningproces on the HP an 'invisible' tag or flag or something like that is added to the picture which may caus this problem?

  • Modified files not updating/syncing

    I have CC installed on my work computer and my home computer.
    Yesterday at work I copied some of PSD files to my CC folder on my work computer in order to work on them at home last night.
    Got home - files synced perfectly.
    I opened them right from where they had synced to in the CC folder on my home computer - completed my work and pressed save.
    I watched the updated files syc/update.
    This morning I get to work - check my CC folder on my work computer and the files are still the original ones I uploaded yesterday - not the updated ones I worked on last night.
    Checked the files on the browser version of CC and same problem.
    Any ideas?
    Would love to know if there is a trick to get the modified files to show up on my work computer this morning so I don't have to drive home and get them.
    Thanks!

    I found a solution.   I drove home with a flash drive....

  • Smbfs file modified date not updating

    When I save a file from Photoshop CS3 to an SMB share (where I have terabytes of images) it appears the Modified Date does not change after I edit. This makes it impossible to work my downstream processes which rely on looking for modified image since a certain date.
    I checked against TextEdit (seems to rewrite the file which gets a new create and modified date) and TextMate where the modified date is correctly set. Also the unix touch command works fine.
    Any ideas how to ensure that a file saved from Photoshop CS3 will correctly set the Modified Date on an SMB share?

    Usually the changes are made to the contents of the domain.sites2 folder and not the actual folder itself. As long as you edit, save and publish, the next time you open iWeb you'll see the latest version. However, be sure to backup the Domain.sites2 package frequently.
    OT

  • Folders last modified time stamp are not updated in Windows 7

    After changing any .cpp file in Visual Studio, the last modified time stamp for the file's folder
    IS NOT updated. What's happening ?
    However when I change a Word (.docx) file, the last modified time stamp for the file's folder
    IS updated ! How come ?

    Hi,
    If you thought this issue gets worse and if you have already set NtfsDisblesLastAccessUpdate to 0, then please revoke it to 1.
    From the above Blog we can see that in Windows 7, the "Last Modified" field on log files is not updated when a program attempts to open the file or the utility is stopped, this is a design change to NTFS , becase we cache the metadata for
    folder contents and do not refresh it until a handle is closed on an open file or an explicit call is made to retrieve the properties of an individual file.
    Per your current issue that even if you closed these Vistual Studio files, the timestamp still didn't update. Please try the following and check whether any of them work:
    - open the file in a second program
    - view the proprties of the file
    - "dir <filename>" at a command prompt 
    In addition, if you edit these Vistual Studio files with Notepad(Before doing that, please close all the programs include Vistual Studio) and try to reproduce the issue, does the issue still occur?
    Regards,
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Date modified not updating & InDesign not PDF not appearing

    Something is definitely off with my Yosemite finder. Two big issues:
    Files are not updating the date modified time after saves. If I change the file name in the finder, it immediately updates like it should. Files in Dropbox reflect the old time (as tested by looking at my Macbook Air running Mavericks)
    PDFs made from InDesign and saved to a folder do not appear for a very, very long time, if ever. The PDF is there as I can see it in a shared dropbox on my Mavericks laptop as soon as it syncs
    I had another issue with Outlook attachments being unable to be saved to a folder, but they could be saved to the desktop. That problem got fixed with a reboot.
    What's going on with my finder? Running all the latest software.

    Annoying as all get out, isn't it? My old contextual menu item Nudge won't force the Finder to update either. In my case it also has a certain recalcitrance about updating file sizes. Pray to the computer gods for this updating nonsense to get fixed. In the meantime, you can try relaunching the Finder, that is the only reliable way I've found to force a window update. Hold down the option key, then click and hold on the Finder icon in the Dock and select Relaunch. All Finder windows will close, the Desktop will blink. When you re-navigate to your folder it should now have the correct dates.
    Francine
    Francine
    Schwieder

  • Live Copy Properties not updating on Modify

    Hi,
    I'm creating a Mobile Site using the Live Copy feature.
    I created a Live Copy, with a new MSM (triggered on Rollout), with "Edit Properties" that transforms the content resource type to my Mobile Components.  Works Great!
    I wanted the Mobile content (Live Copy) to be updated when the author updates the content.  I tried creating a MSM which is triggered on "Modify" with the same Edit Properties.
    What happens is that the updated content is copied but the Properties are not updated.  i.e. the Live Copy site content reverts to the resourceType of the Blueprint Site ... Not Good!
    We are using CQ5.5 without any Service Pack applied.  It looks like this might be fixed with Service Pack 2.
    http://dev.day.com/docs/en/cq/current/release_notes_service_pack_2.html
    Is that correct?
    Thanks

    Just confirming that I tested this issue with the later version of CQ5.5, and it was fixed.

  • Modified by column the user name is not updated

    Hi
     I am using the client side object model to upload the document in the document library, its working fine, but the modified by column  the each user name is  not updated, instead of system name is updated for all the
    upload. 
    In the below screen shot where all the documents uploaded by the different users but its show the only the system instead of user name how to solve the issue.

    thanks Hemendra
    Agrawal
    i will
    try it another one issue 
    i cant able to upload the file size >1 MB its showing error."the remote server returned an error (400) bad request."
    i tried your previous post but its not working.

  • Update is working modify is not working

    Hi gurus
    I have written a code, in that i am trying to update some records to the table, in that code if i write UPDATE it is working but when i write MODIFY it is not updating records. Can u ppl suggest why it is happening??
    Regards
    kumar.

    Hi Vijay
    The Sy-subrc value is 0, and i even kept the commit work after the MODIFY statement.
    This is the code
    tables: zmaterial.
    data:
    begin of itab occurs 0,
    material type /bi0/pmaterial-material,
    end of itab.
    itab-Material = '0000123'.
    append itab.
    itab-Material = '0000124'.
    append itab.
    itab-Material = '0000125'.
    append itab.
    itab-Material = '0000126'.
    append itab.
    itab-Material = '0000129'.
    append itab.
    modify zmaterial from table itab.
    commit work.
    Regards
    Kumar
    Edited by: BW Kumar on Jul 30, 2008 8:50 PM

  • A contract modified in IS-U not updated at CRM

    Hi!!!
    I'm try to update the data of crm contract from sap isu contract, but isn't works fine, the status and the description of CRM contract for example is not updated. The Bdoc SI_CONTRACT is generated correctly, and the Badi's DOWNLOAD on ISU and CRM are enhanced with the fields, but the info is not updated in crm when initial load is launched or when a move-out it's do it in isu.
    Can you help me please?
    Regards,
    David

    Hi,
    Please tick the below checklist and tell me if they are set:
    1. Goto R3AC4. Is entry for object class BUPA present in the List. If not, add a new entry: Object class BUPA, RFC destination (destination of ISU)
    2.goto transaction SMOEAC and check if ISU site is subscribed is for BUPA_MAIN. If not, please do the same.
    3. Change and save a BP and check the status of the BDOC. Is it green? if not, let me know.
    4. goto ISU transaction SM30. table CRMRFCPAR. Is RFC destination for CRM maintained. If not, please do the same.
    Let me know if these things are in place.
    Best Regards
    Kaushal

  • Data in server is not updated

    i have modify the data STREET to "ANG MO KIO"
    http://i192.photobucket.com/albums/z231/yzme/d1.gif
    but the data in server still "HEAVEN ST"
    http://i192.photobucket.com/albums/z231/yzme/d2.gif
    I am using Time2Way T01, if it is when i sync the data will be uploaded, or do i need to configure somewhere to get the data upload ?
    if the data in client and middleware is different, when i sync , the data from the middleware will again download to the client replace the modified values
    OR
    the data in the client will uploaded to the middleware and trigger the MODIFY bapi wrappers ?
    <b>
    when i check my MEREP_MON, and MEREP_LOG there is no data inside this meaning after i changed the values and perform the sync, Inbox and Outbox still remain the previous data as well as inside the MEREP_LOG,
    is it the bapi wrapper not call by the client ?
    </b>
    and i find out that my bapi not get called, what additional code should i add instead of the code below.
    DO I NEED TO IMPLEMENT SOME CODE FOR UPLOADER ??
    do i have to change the reqDirectSync="true", if yes, how do i changed, just change inside the editor, or there is somewhere to configure in sapgui
    after i changed the data , i try to sync, and i check on merep_mon
    what specific or additional steps i need to configure, on uploader / receiver or synchronizer
    <b>i do not implement any syncBoDelta or global reset ?</b>Can someone explain the term "delta" to me and its activities?
    if i have upload something, and sync, the Inbox should have something right ??
    i just put add this code to modify my records
    public String modifyRecord(String eventName,boolean didNavigate){
                             String syncBoName="ZCON";
                             String syncKey="0001230297";
                             tableViewBean.setString(syncBoName +" "+syncKey);
                             System.out.println("SyncBoName: " +syncBoName + " syncKey: " +syncKey);
                             tcp = TableContentProvider.instance(syncBoName);
                             tcp.modifyTable(syncBoName,syncKey);                                   return JSP_DETAIL_SYNCBOINSTANCE;
    public void modifyRecord(String syncBoName,String syncKey){
    SyncBoDescriptor sbd=null;
    sbd=descriptorFacade.getSyncBoDescriptor(syncBoName);
    SyncBo sb=null;
    try{
    System.out.println("bp 2");
    sb=dataFacade.getSyncBo(sbd,syncKey);
    }catch(PersistenceException pex){
    System.out.println("Exception in modifyRecordLoc:" +pex.getMessage());
    SmartSyncTransactionManager transactionManager;
    try{  transactionManager=dataFacade.getSmartSyncTransactionManager();
    if(!transactionManager.isTransactionStarted()){
    transactionManager.beginTransaction();
    boolean b8=false;
    b8=setHeaderFieldValue2(sb,"STREET","ANG MO KIO");
    transactionManager.commit();
    SetSendType();
    listAllOutDelta();
    checkInboxConflict();
    }catch(Exception e){
    System.out.println("Exception in modifyRecordAmt2:" +e.getMessage());
    public void checkInboxConflict(){
              ErrorConflictInbox errorConflictInbox= SmartSyncRuntime.getInstance().getInboxNotifier().getErrorConflictInbox();
              MeIterator iter;
              SyncBoResponse resp;
              try {
              iter= errorConflictInbox.getAllSyncBoResponses();
              while(iter.hasNext()){
              resp= (SyncBoResponse)iter.next();
              String bo=resp.getSyncBoDescriptor().getSyncBoName();//SyncBo Name
              String state=resp.getSyncBoResponseState().toString();
              String res=resp.getResponseType().toString();//Get the SyncBo response type (conflict or ERROR)
              String msg=resp.getText();// This will return the exact message from the server
              System.out.println("bo:" +bo +" state: " +state +" res: " +res +" msg:" +msg);
              System.out.println("state:" +resp.getSyncBoResponseState().toString());
              if(resp.getSyncBoResponseState().equals(SyncBoResponseState.INITIAL)){
                   String a=resp.getSyncBoResponseState().toString();
                   resp.acceptClientSyncBo();
                   String b=resp.getSyncBoResponseState().toString();
                   resp.delete();
                   System.out.println("state1: " +a +"state2: " +b);
              boolean syncStatusComplete= SmartSyncRuntime.getInstance().getInboxNotifier().isSyncStatusComplete();
              System.out.println("syncStatus:" +syncStatusComplete);
              }catch (Exception e) {
              e.printStackTrace();
    public void listAllOutDelta(){
              SyncBoOutDeltaFacade deltFac=SmartSyncRuntime.getInstance().getSyncBoOutDeltaFacade();
              MeIterator allDelta;
              try {
                   allDelta = deltFac.getAllDelta();
                   while(allDelta.hasNext()){
                             SyncBoOutDelta outDelta=(SyncBoOutDelta)allDelta.next();
                             System.out.println("SyncKey:" +outDelta.getSyncKey() +" Action:" +outDelta.getAction()
                                       +" State:" +outDelta.getStateId() +" SendType:"+outDelta.getSendType());
              } catch (SmartSyncException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (PersistenceException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    public void SetSendType(){
              SmartSyncRuntime ssRuntime = SmartSyncRuntime.getInstance();
              SyncBoOutDeltaFacade boDeltaFacade = ssRuntime.getSyncBoOutDeltaFacade();
              SyncBoDescriptorFacade descF = ssRuntime.getSyncBoDescriptorFacade();
              SyncBoDescriptor myBO = descF.getSyncBoDescriptor("ZCON");
              boDeltaFacade.setSendType(myBO, SyncBoOutDeltaSendType.SEND_DIRECT);
    //SyncManager.getInstance().synchronizeWithBackend(VisibilityType.USER_SHARED);
         public boolean setHeaderFieldValue2(
              SyncBo sb,
              String headerFieldName,
              Object value) {
              SyncBoDescriptor sbd = sb.getSyncBoDescriptor();
              //RowDescriptor trd = sbd.getTopRowDescriptor();
              System.out.println("bp 10");
              RowDescriptor trd=sbd.getRowDescriptor("010");
              System.out.println("bp 11");
              FieldDescriptor fd = trd.getFieldDescriptor(headerFieldName);
              System.out.println("fd:" +fd.getFieldName());
              if (fd != null) {
              BasisFieldType bft = fd.getFieldType();
              //Row header = sb.getTopRow();
              System.out.println("bp 12");
              //Row header = null;
              Row[] header=null;
              //try {
                   //header = sb.getRow("0001211181");
                   //header=sb.getTopRow();
                   header=getItemInstances(sb,"010");
                   if(header==null){
                        System.out.println("is null");
                   }else{
                        System.out.println("not null");
              //} catch (PersistenceException e1) {
                   // TODO Auto-generated catch block
              //     System.out.println("Exception getRow:" +e1.getMessage());
              //     e1.printStackTrace();
              System.out.println("bp 13");
              try {
    //             Integer operator
              if (bft == BasisFieldType.N) {
                   System.out.println("Numeric");
              NumericField nf = header[0].getNumericField(fd);
              if (nf != null) {
              BigInteger ii = new BigInteger(value.toString());
              nf.setValue(ii);
              return true;
              } else {
              return false;
    //             Character operator
              if (bft == BasisFieldType.C) {
                   System.out.println("Character");
              CharacterField cf = header[0].getCharacterField(fd);
              if (cf != null) {
              cf.setValue(value.toString());
              return true;
              } else {
              return false;
    //             Decimal operator
              if (bft == BasisFieldType.P) {
                   System.out.println("Decimal");
              DecimalField df = header[0].getDecimalField(fd);
              System.out.println("bp 1.1");
              if (df != null) {
                   System.out.println("bp 1.2");
              BigDecimal bd = new BigDecimal(value.toString());
              System.out.println("bp 1.3");
              df.setValue(bd);
              System.out.println("bp 1.4");
              return true;
              } else {
                   System.out.println("bp 1.5");
              return false;
    //             Similar operation for time and date operator fields
              if (bft == BasisFieldType.D) {
                   System.out.println("Date");
              DateField df = header[0].getDateField(fd);
              if (df != null) {
              if (value.toString().equals("0")) {
              Date dat = Date.valueOf("0000-00-00");
              df.setValue(dat);
              } else if (!value.toString().equals("")) {
              Date dat = Date.valueOf(value.toString());
              df.setValue(dat);
              } else {
              Calendar cal = Calendar.getInstance();
              java.sql.Date bd =
              new java.sql.Date(cal.getTime().getTime());
              df.setValue(bd);
              return true;
              } else {
              return false;
    //             Similar operation for time and date operator fields
              } catch (SmartSyncException ex) {
              System.out.println(ex.getMessage());
              } catch (PersistenceException e) {
              System.out.println(e.getMessage());
              return false;
    SyncType: T01 Wrapper: GetList,GetDetail,Modify
      <?xml version="1.0" encoding="utf-8" ?>
    - <MeRepApplication schemaVersion="1.1" id="ZCON" version="01">
      <Property name="CLIENT.BUILDNUMBER" />
      <Property name="C_APPLRESOLVE" />
      <Property name="DATA_VISIBLE_SHARED">X</Property>
      <Property name="E_APPLRESOLVE" />
      <Property name="FACADE_C_CLIENT">X</Property>
      <Property name="FACADE_E_CLIENT">X</Property>
      <Property name="HOMEPAGE.INVISIBLE" />
      <Property name="INITVALUE" />
      <Property name="RUNTIME">JSP</Property>
      <Property name="TYPE">APPLICATION</Property>
    - <SyncBO id="ZCON" version="1" type="timedTwoWay" allowCreate="false" allowModify="true" allowDelete="false" reqDirectSync="false" downloadOrder="1">
    - <TopStructure name="TOP">
    - <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">
      <Input type="create">false</Input>
      <Input type="modify">false</Input>
      </Field>
    - <Field name="PERSNUMBER" type="N" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <ChildStructure name="010">
    - <Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">
      <Input type="create">false</Input>
      <Input type="modify">false</Input>
      </Field>
    - <Field name="PERSNUMBER" type="N" length="10" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="CITY1" type="C" length="40" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="CITY2" type="C" length="40" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="STREET" type="C" length="40" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="HOUSE_NUM" type="C" length="40" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
    - <Field name="REGION" type="C" length="40" decimalLength="0" signed="false" isKey="false" isIndex="false">
      <Input type="create">false</Input>
      </Field>
      </ChildStructure>
      </TopStructure>
      </SyncBO>
      </MeRepApplication>
    Message was edited by:
            yzme yzme

    <u>my intention is very simple, i just need to  update a field in a row and update to the middleware so that the backend will reflect the changes. </u>
    >2 if i set the conflict/error handling to application, then i should have to implement some code for it, right ?
    >3) List syncbooutdelta
    <b>SyncKey:0001233035 Action:M SendType:SEND</b>
    doesnt it mean that when i sync , the uploader will pick up this data and do a modification ??
    i have change the metadata like this
    <SyncBO id="ZCON" version="1" type="timedTwoWay" allowCreate="false" allowModify="true" allowDelete="false" reqDirectSync=<b>"true" </b>downloadOrder="1">
    1) i try to sync the application and check the worklist monitor, there is nothing in the inbox ? how come ?
    2)if i test using emulator, i try to modify a value and execute, i am getting the following error.
    <u>
    Header action from mobile="MOD", R/3 action="ADD"
    Return code 1 (DOWNLOADER)
    </u>
    i try to modify not "Add"
    3) I am using Time 2 Way , how to check it is synchronous or asynchronous ? in merep_sbuilder, the default asyn. is checked, meaning async ??
    the type is T01 , ASYNC
    4)
    public void checkInboxConflict(){
              ErrorConflictInbox errorConflictInbox= SmartSyncRuntime.getInstance().getInboxNotifier().getErrorConflictInbox();
              MeIterator iter;
              SyncBoResponse resp;
              try {
              iter= errorConflictInbox.getAllSyncBoResponses();
              while(iter.hasNext()){
              resp= (SyncBoResponse)iter.next();
              String bo=resp.getSyncBoDescriptor().getSyncBoName();//SyncBo Name
              String state=resp.getSyncBoResponseState().toString();
              String res=resp.getResponseType().toString();//Get the SyncBo response type (conflict or ERROR)
              String msg=resp.getText();// This will return the exact message from the server
              System.out.println("bo:" +bo +" state: " +state +" res: " +res +" msg:" +mtext);
              boolean syncStatusComplete= SmartSyncRuntime.getInstance().getInboxNotifier().isSyncStatusComplete();
              System.out.println("syncStatus:" +syncStatusComplete);
              }catch (Exception e) {
              e.printStackTrace();
    <u>bo:ZCON state: INITIAL res: CONFLICT msg:Conflict: R/3 = delete, device = modify
    SyncStatus=true (complete)
    </u>
    5) after that i change my code to this
    while(iter.hasNext()){
      if(resp.getSyncBoResponseState().equals(SyncBoResponseState.INITIAL)){
        String a=resp.getSyncBoResponseState().toString();
        String a1=syncBO.getSyncState().toString();
        resp.acceptClientSyncBo();   //No transaction stated to commit
        resp.delete();
    String b=resp.getSyncBoResponseState().toString();
    String b2=syncBO.getSyncState().toString();
    System.out.println("state1: " +a +"state2: " +b);
    System.out.println("SyncState1: " +a1 +"SyncState2: " +b1);
    <u>state1: INITIAL state2: RESOLVED </u>
    <u>SyncStatus1:QUANRANTINE SyncStatus2: INCONSISTENT</u>
    and i try to sync ...no data in worklist
    6)i try to list out all the delta to be uploaded
    ListAllOutDelta to be upload
    <u>SyncKey:0001233349 Action:I State:99925F8E24DFFE49A4563C5E018E9B61 SendType:SEND
    </u>
    i am modifying the rows, not Insert a new row, the Action:'I' instead of 'M',  pls clarify on this.
    after i sync, i found out that there is 2 record with different syncKey but same primary key and all attributes appear to be same except the attribute that i changing.
    <u>SYNCKEY    PERSNUMBER CITY STREET HOUSENO</u>
    0001230298 000000000  HELL <u>ANG MO KIO</u> 0123456789 (modified record)
    0001230299 000000000  HELL <u>HEAVEN ST</u>  0123456789(old record)
    i check the application and found out that the previous record that i modify have its value changing locally but not updated into the backend, after sync, there is another record downloaded into this application which is the old record before i modify with different syncKey.
    but when i check the backend table, there is only 1 record inside, because i dont implement the 'Create' Bapi.
    does it make sense ?
    7) when i check my client , the data is persisted with modified value , but the changes is not reflected in the server, how come the data in client is not uploaded to the server.
    acceptClientSyncBo will make the client wins how come the data is not get updated in server ?
    Re: Regarding modifying Sync BO
    According to him, can anyone translate the things highlighted below
    for modifying one sync bo instance , there is no need to use createUnlinkedCopy()..
    just use like this..
    sb = dataFacade.getSyncBo(sbd,key);
    SmartSyncTransactionManager transactionManager;
    transactionManager = dataFacade.getSmartSyncTransactionManager();
    transactionManager.beginTransaction();
    setHeaderFieldValue(sb,"PERSNUMBER","9866321467");
    setHeaderFieldValue(sb,"FIRSTNAME","RajaSekhar");
    setHeaderFieldValue(sb,"LASTNAME","Varigonda");
    setHeaderFieldValue(sb,"PROFESSION","Technical Specialist");
    setHeaderFieldValue(sb,"***","MALE");
    setHeaderFieldValue(sb,"BIRTHDAY","1977-09-28");
    setHeaderFieldValue(sb,"HEIGHT","165");
    setHeaderFieldValue(sb,"WEIGHT","75");
    // Commit the transaction
    transactionManager.commit();
    setHeaderFieldValue - can be used to set value in new sync bo instance , or modify the instance.
    <b>
    But one main think here have to consider is , if you have created one Sync Bo instance , not synchronized with back end and u have modified that, then thats just like a creation .So during sync this will call Create Bapi Wrapper.
    </b>
    But after synchronization , is u are modifying that instance , then it is a modification(will call MODIFY Wrapper in back end during synchronization). u must have the right to modify this instance in the client side.
    hope u got it.
    u can debug MI Applications in NWDS.
    refer this blog written by Arun
    /people/arunkumar.ravi/blog/2006/02/22/execute-debug-your-mi-code-from-nwds
    let me know , if u have doubts
    Regards
    Kishor Gopinathan
    pls comment...

  • Table record is not updated correctly after navigate back from detail page

    I have 2 jspx pages one (page A) has a table displaying the employee record, another one (page B) is used to update the selected employee record. On page A, when selecting a record and clicking the 'Details' button I can be navigaed to pag B on which I can modify the record information in a form component. I have one table column 'teamName' which is binding to a LOV at VO layer and on pageB I am using <af:inputComboboxListOfValues> to show a editable LOV list for this attribute, when I input a new value here and save it, I can go back to page A but the team name for this record shows empty, by querying the database I do find the record updated successfully with the changed value. And when I reloaded the page the record can show the new team name value. Why it is not updated in the employee table when immediately navigating back from page B? I have set the table iterator refresh attribut to "always" but still failed. Can anyone help on this issue? Thanks!!
    BTW, for other columns (not LOV) they are ok, the table can show the changed value correctly.
    Edited by: user774592 on Jul 14, 2011 7:56 PM
    Edited by: user774592 on Jul 14, 2011 9:59 PM

    Thanks for reply!
    I did exactly the same as what you said. I d&d the data control Commit operation on page B to generate a 'Save' commandToolbarButton with the action attribute set to 'save' which is the from outcome for navigating back to page A. Is there any business logic I need to write here? Currently I have no.
    Note: In this case I used an editable LOV, I have a requirment that besides selecting a existing value from the lov, user can also input a new value in the LOV. When going back to page A, I do find the LOV list is updated to contain the new vaule. Just the record in the table shows an empty value instead of the new value. Still do not know why.

  • The workflow could not update the item, possibly because one or more columns for the item require a different type of information. Outcome: Unknown Error

    Received this error (The workflow could not update the item, possibly because one or more columns for the item require a different type of information.) recently on a workflow that was
    working fine and no changes were made to the workflow.
    I have tried a few suggestions, i.e. adding a pause before any ‘Update’ action (which didn’t help because the workflow past this action without incident); checked the data type being written
    to the fields (the correct data types are being written); and we even checked the list schema to ensure the list names and the internal names are aligned (they
    are), but we still cannot figure out why the workflow is still throwing this error.
    We located the area within the workflow step where it is failing and we inserted a logging action to determine if the workflow would execute the logging action but it did not, but wrote the same error message.
    The workflow is a Reusable Approval workflow designed in SharePoint Designer 2010 and attached to a content type. 
    The form associated with the list was modified in InfoPath 2010. 
    Approvers would provide their approval in the InfoPath form which is then read by the workflow.
    Side note - items created after the workflow throws this Unknown Error some seem to be working fine. 
    We have deleted the item in question and re-added it with no effect. 
    Based on what we were able to determine there don’t seem to be any consistency with how this issue is behaving.
    Any suggestions on how to further investigate this issue in order to find the root cause would be greatly appreciated?
    Cheers

    Hi,
    I understand that the reusable workflow doesn’t work properly now. Have you tried to remove the Update list item action to see whether the workflow can run without issue?
    If the workflow runs perfectly when the Update list item action is removed, then you need to check whether there are errors in the update action. Check whether the values have been changed.
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

  • File window not updating modif. dates – and mysterious parallel universe discovered

    The day started innocently enough when I tried to edit some <meta> content on a site I'm building and then saved my work. Little did I know...
    DW's "File" window refused to update the "Modified" column of the files I worked on.  Open and closing the files shows that my changes have been recognized and incorporated into the HTML, and the files show up with correct modification dates in Finder (I'm on a Mac). They just won't change date in DW.
    When I upload the modified-but-not-redated-in-DreamWeaver files to my remote site, they appear with the incorrect dates on the server, but a text comparison in DW shows that my local and remote files are synched.
    Now for the truly weird part: when I run the site in Safari (after flushing its cache), a Source check shows the old code is still operational.  (I also changed the titles of the pages in question to quickly confirm which version was being displayed. This check shows the old title displayed.)
    Here's the site address:  http://www.bearriverbooks.com/index.html
    Now for the truly, truly wierd part.  I have a parallel site ( http://www.queen-of-the-northern-mines.com/index.html ) which contains copies of the bearriverbooks.com files. These files, too, show the wrong modification dates in DW's "Files" window and on the remote server – but they display correctly. Anyone who wants to check can compare page titles, which are longer in the later pages with correct code.
    I checked the remote site addresses in the "Manage Sites..." center.  I have not crossed my wires there (though I can smell a few arcing badly in my brain.).
    The players:  2.8 GHz Intel Core i5 27" iMac running Mac OSX 10.6.7  /  Dreamweaver CS5 v.11.0 Build 4964
    Thanks in advance,
    Richard Hurley
    Grass Valley MultiMedia

    I am having the same issue on a Mac 3.4Ghz i7 running Mac OS 10.7.  I have Dreamweaver CS 5.5 v.11.5 Build 5344.
    I have a linux webserver, running ProFTPD v.1.3.1
    Both my mac and my linux server are set to the correct date and time.
    And ls on the linux servers tells me the files have the correct modified date and time, but this is getting lost in translation to dreamweaver when I view the remove server in the File tab.
    Any help appreciated.

  • Dreamweaver Teamplate with Library Item for Navigation/Sidebar not updating editable classes

    I have a Dreamweaver Template that contains two Library items. One Library item is my navigation bar, the other is a sidebar that shows different content depending on what page you are on. I'm assigning an editable class "active" to the navigation bar to show you are on a particular page, and also assigning the editable class "active" to the sidebar to reveal a portion of the sidebar with links pertaining to that specific page. The default value for the class is "hidden". So what is happening is when I open a page I have created and "edit" the Library Items in it to edit these classes, it resets resets all the other pages on the site to the default class values. How am I able to use editable classes and Library Items to achieve this kind of functionality? The idea is to only have ONE navigaton bar to update on the site and to only have ONE sidebar item to update. Here is an example of the sidebar and navigation in action so you can see what I'm going for. Notice the green button in the navigation bar (that is a list item with the class "active" which is an editable class in the Library Item, also notice the tan links in the sidebar, that is an unordered list that has an editable class of "active" in the Library Items --- these editable classes reset to their defaults when updating the Library Item on the website).
    http://www.brumleve.org/joe/temp/CAP/mission.html

    In my understanding, whenever you edit the contents of a library item, it will update all other occurances of this library item on the rest of the site. That's "working as designed" as far as I know, unless you break the link by telling it to not update - which kinda defeats the purpose I think.
    But theres another way to do this using template properties, i#ve been using this approach myself a couple of times:
    Write your navigation bar in the template (.dwt) file itself, then select the class= of your first menu item and choose .. (names might be off, I am using a non-English copy of DW): "modify > template > make attribute editable" from the main menu. Do so for all your menu items and name these new template properties something like "item_x_class"
    You'll end up with something like this in your template source:
    <div class="@@(item_1_class)@@">
    and a matching
    <!-- TemplateParam name="item_1_class" type="text" value="active" --> in the header
    Now, on each page, you can set the class within the template properties dialog ("modify > template properties"). If your main menu changes, it won't overwrite your template properties, but still update all pages when you do make a change to the menu.
    If you're using multiple templates for your site, consider nesting templates, so the master template already includes your navbar and all subsequent templates will "inherit" changes to the navbar code (sans the editable class property).
    Hope this helps.. or at least gives you an idea for further experiments..
    Stephan

Maybe you are looking for

  • How to find how name of view and table using in Discoverer report

    Hi all, Please help me, i have requirement, i need name of views and tables used in discoverer reports. plz help its urgent. regards, Vivek Gautam

  • Contacts not displaying properly in video iPod, need help

    My contacts do not display properly on my video iPod. The phone numbers sometimes have dashes and sometimes do not in the iPod but the phone numbers always have the dashes in my address book on my G4 desktop. Example: iPod 555 555 1212 or 5555551212

  • Exporting project with unique library

    Hi, I have been programming with java for a few months and have really gotten into using eclispe to write stuff. Currently I am working on a little app that minimises to the system tray, displays an icon and some other stuff. Writing it has been fine

  • RightsManagement web service

    I have successfully installed a turnkey LiveCycle (WebLogic) server and have written a couple test methods in C# (as proof of concepts). One method I have invokes the rights management web service to apply a policy to a PDF. It appears to work fine,

  • AdfActionEvent and AdfPage.PAGE.findComponent not working - Sample Provided

    Ladies and Gents, Using JDev 11.1.2.3.0. I just can't get this simple example to work.  On page load, I'm calling ADF's find component by id method, which for some reason, returns null.  I can do the same thing by using javascript's getElementById an