Mapping mystery

Hi,
Maybe one of you have an answer to my mystery? I've been working with iStudio/interconnect for some time now, but it have always been wtih simple schemas, a parent, multiple childen(xml). Now I have just finished a project with multiple generations, where a mystery solution was necessary.
I had to edit in all the mappings, so that the number was 'v0' throughout the integration, if I did not, the application came to a holt! That was the case when I used objectCopy:
eg: runningorder.elementGroup[v0].element[v0].name[0].....
In the outgoing adapter I used copyFields, and if didn't edit the numbers, it would only take the first one.
Now I am in the process of writing the documentation, and I need a good explanation. Is it a bug? I used Oracle Interconnect 9ias release 2.
Hope some of you can help
Regards
Rikke

Rikke,
I used to have to do that on older versions of OAI too (way back with OAI 3.1.2 !!).
Have a look at the bug database via Metalink, start with Bugs 2720375 and 4328431.
I don't profess to be an expert in this area, just a user like you, but the general rule is to use v0 subscripts across the board.
Use f0 (free subscripts) when you need to create as many objects as required.
Changing the subscripts manually to v0 still seems to be the only workaround when this "feature" occurs.
In terms of an explanation - I think it was / is caused by the ObjectCopy transformation picking up the last subscript number, and incrementing it.
So - try not to use the ObjectCopy. Use the multiple source to multiple target CopyFields transform instead! That is, select, in the correct order, your source fields (using Ctrl + Right-mouse click) - then CopyFields - then your target fields.
Or just do the CopyFields one-by-one?
HTH
Yan

Similar Messages

  • Mysterious FM- RH style mapping override with span tag

    I have been working in a super clean FM and RH project that is has one to one mappings for all my styles in the FM to same named styles in RH, just to be sure I do not mess up. Still, though, I seem to get a mystery mapping.  For my bullets and lists, RH is adding a span tag with font set to Times Roman.  I cannot find *any* css that has Times Roman. I've checked things like my character tags, my cross reference tags, etc and cannot find a correlation.  Where would this be added if it's not in my FM Format definitions and not in my RH Style definitions. I tried reimporting the book to see if it needed a tickle of the project mappings template but that didn't help.
    I'm attaching some images in hopes someone has ideas. The example does not appear to be times roman in Design view, but in more complex topics it's pretty obvious.
    I have so many hacks for single sourcing now, about ready to give up.
    Got help?
    FM 10
    RH 11

    Thanks for the fast reply Arnis,
    I did not even notice that the span tag ended on the spaces, so it can't be what's causing the odd previews I'm seeing.  So it seems my original question is not well thought out, so I'm going to retest with some other style changes.
    Still, though I'm wanting to follow up on getting rid of the Times tag anyway.  The bullets are always defined as Verdana. Bullet is set to use "Default Font" while BulletLevel2 uses "Bold" (the char def for Bold is also Verdana).  Is there some place I have to map "tabs" to not be Times? I dont think it's the Default Font issue because bullet 2 uses Bold.
    Here are some screenshots.

  • Mystery icons & Add an icon map

    Hello all.
    I've run into a somewhat stupid, but nether the less frustrating, issue...
    On Android, there are mystery icons all over my messages which are explained no-where.
    E.g. I have trawled this forum and google to find out what the orange circle with a white exclamation mark in it means, and have found nothing.
    This is not the only example however, there are numerous icons / symbols used by the app that simply have 0 explanation on this site, in the app's help, or when you long press them. 
    I'm 25, I've owned every phone from the 3310 through to prototype android devices, I work in the tech sector... I'd like to think I'm rasonably tech savy. Yet here I am looking at unexplained icons and I cannot find out what they mean!
    First up, can someone let me know what the heck this orange circle and exclamation mark means, as it's stopping all my outgoing Skype to SMS messages (yes I have credit and signal and have updated my OS & reinstalled Skype).
    Secondly, Skype make an icon map!!! It's both bad practise and just plain lazy to have unexplaned symbols in your app.
    Rant over

    Hi and welcome to the Skype Community,
    Can you share a screenshot?
    Where is that icon shown? Next to IMs or SMS messages?
    Follow the latest Skype Community News
    ↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓

  • Mysterious Key mapping problem.  Help!

    I discovered a very strange behavior regarding the output of my Apple Bluetooth keyboard. In all apps that I know of, the default keyboard shortcut for 'Save' is command (apple) 's' (we all know that, of course).
    However the command being output when I press those 2 particular keys is command (apple) 'c' for 'Cut'. Everything else about the keyboard functions properly.
    When I check to see what the output is in the 'keyboard and mouse' system preferences I am seeing the correct output when I press those 2 keys.
    According to the preferences, this combination is set as the default (in fact I selected 'restore defaults' just to be sure). Also, the 'International' preferences is set correctly at 'English/Roman'.
    Any ideas? This is a default function and the odd behavior doesn't make sense at all.
    **By the way, this only happens when "I" am logged in; not when other users are logged in. So I know there must be some setting only related to my login (perhaps in the 'user/Library' folder). But I have no clue where to look. Any ideas?

    Something in your ~/Users/ [username]/ Library/ Preferences folder would appear to be the culprit. From the filenames, I'd guess at com.apple.KeyboardViewerServer.plist but upon opening System Preferences> Keyboard and Mouse just now and changing one of the keyboard shortcuts, the timestamps point to ~/Users/ [username]/ Library/ Preferences/ com.apple.universalaccess.plist. Try moving your copy to the Desktop, then logging out and back in to see if that properly restores the defaults. You can try the same move to Desktop / logout trick on Bluetooth preferences in the your user account's Librbary/ Preferences folder.

  • Inconsistent mapping timings

    Hi all,
    We run mappings by calling the generated MAIN procedure from a driver PL/SQL package we built, dynamically constructing the MAIN signature call. And have been doing this successfully for hundreds of ETL mappings. Then we use the ALL_RT_AUDIT_MAP_RUNS view to determine status/timing counts, records counts, etc, and write them out to a job log table. And it's been working great. However, recently a curious issue has arisen. We generate our own "Start" and "End" timings in our job logs immediately before calling the MAIN function and afterwards, as well as displaying the "Elapsed Time" value from ALL_RT_AUDIT_MAP_RUNS, and for some reason, there is a noticable lag between when OWB thinks the mapping has completed, and when control returns from the MAIN call. In some cases, this is almost as much as the actual mapping execution time - for example, a mapping with elapsed time of 12 mins takes another 9-10 mins to actually complete/return.
    Anyone have any inklings where this mystery time might be going?
    This particular mapping does deal with a lot of data (soemtimes millions of rows), being passed between multiple "steps" within the mapping, so maybe there's lots of "cleanup" going on? Anyone have any ideas on how to track this activity and determine it? In looking over the corresponding ALL_RT_AUDIT_STEP_RUNS view (step level detail for a given mapping run), everything seems in line (all Set-based processing, no failover happening, etc) - the last step completes just before the mapping "finishes" (according to "elapsed time") though then the lag begins...
    Any ideas on where to look next appreciated!
    Cheers,
    Jim C.

    hace you tried taking traces while the mapping is run and tried to find out what causes the lag. This could be because of some kind of locks or some network or infrastructure condition might be causing this. The first step that i would take is take traces.

  • Mystery of mysteries. Can't get rid of "Glossary" text on Favorites tab.

    I consider myself relatively well-versed in chm file compiling and chm related issues, but this one has me stumped...
    System Specs;
    RH 9 now (initial English help in background below was compiled using RH 7)
    Windows 7 64-bit
    First, the background -- We use RoboHelp to compile our English CHM. We then decompile the files from the CHM and ship those off for localization. When they come back from translation, we use usually use FAR HTML to recompile the help. Sometimes we use RH (if FAR HTML is being tempermental). And in rare cases, like today, we use both. So today I was working on compiling a Traditional Chinese help we got back from translation recently. I tried using FAR HTML as usual for the initial post-translation compile. I ran into various and sundry compiler errors that made no sense whatsoever, so I decided to try compiling it in RH instead. The compilation made it through, but the Contents and Index tabs weren't displaying the proper Chinese characters. So I took this Traditional Chinese chm that was compiled by RH, decompiled it, and tinkered with .hhc and .hhk file encoding and charsets and used FAR HTML again to compile. And this time compiling worked without a hitch. We got proper characters. Yay! So far so good. Well, sort of. That's just the background.
    Now, the problem -- So now, compiling back in FAR HTML from the above decompiled RH 9 files, I'm getting a psuedo Glossary tab I don't want since in our localized versions of the help. (We simply just call an htm containing the glossary info, and tie the htm to the toolbar.) I say "pseudo" because here's what the navigation pane on the compiled help looks lilke:
    Notice that the Favorites tab is actually somehow getting named as "Glossary".  We don't want this. I want the default "Favorites" text for the tab. If I unregister the hhactivex.dll and recompile, the "Glossary" string on the tab thankfully goes away, showing just "Favorites". If I register the dll again or move the compiled help onto a system with a registered hhactivex.dll, the problem reappears all by itself when the help is launched.
    How can I get my Favorites tab back to normal? I suspect this problem is contained somewhere in the HHP file, specifically my Windows definition. But I've tried recreating the hhp, and the window definition many times, but it still appears. I even at one point tried removing the Favorites tab but then the mystery "Glossary" text moves onto infesting the Search tab.
    Here's my hhp innards if it helps:
    [OPTIONS]
    Binary TOC=No
    Binary Index=Yes
    Compiled File=pcdlrn.chm
    Contents File=pcdlrn.hhc
    Index File=pcdlrn.hhk
    Default Window=HtmlHelp
    Default Topic=intro.htm
    Default Font=,,136
    Full-text search=Yes
    Auto Index=Yes
    Language=0x404 Chinese (Traditional/Taiwan)
    Title=PC-DMIS Help
    Create CHI file=No
    Compatibility=1.1 or later
    Error log file=_errorlog.txt
    Full text search stop list file=
    Display compile progress=Yes
    Display compile notes=Yes
    [WINDOWS]
    HtmlHelp="PC-DMIS Help","pcdlrn.hhc","pcdlrn.hhk","intro.htm","intro.htm","pcdlrn_glo.htm","Glossary Button",,,0x61520,244,0x4386E,[432,113,1354,863],0xB0000,,,,,,0
    [FILES]
    Auto_Edge_Strength.htm
    ... and a bazillion other files ...
    [ALIAS]
    #include Core.ali
    [MAP]
    #include BSSCDefault.h
    [MERGE FILES]
    errorcodes.chm
    pcdbasic.chm
    pcdmiscmm.chm
    pcdmisdci.chm
    pcdmisfixturing.chm
    pcdmislaser.chm
    pcdmisnc.chm
    pcdmisportable.chm
    pcdmisregistry.chm
    pcdmistutor.chm
    pcdmisvision.chm
    Is RH somehow still doing something to it even though technically I'm not using it to compile? Is there some other setting or file somewhere that could be controlling this or is it just a compiler bug that I've never noticed?

    Thanks Cara, but I'm not sure if that's the same thing. In this problem the Favorites tab in the CHM was showing up with the word "Glossary" in it. Anyway, it's water under the bridge now for me. Things are better now that we're localizing our Engish RH project directly, instead of our old way of decompiling the English chms and sending the decompiled htms.

  • Mysterious files being created in pages. Unable to unlock or delete them.

    Mysterious files being created in pages. Unable to unlock or delete.

    It turns out that you cannot update or delete a Syndication Map that is currently assigned to a Port in the Repository.  You must remove the map from the Port in the Repository and then you can change and/or delete them. 
    1) bring up the MDM Console
    2) Unload the repository
    3) drill into Admin ~ Port
    4) Remove or change the map associated to the port
    5) Load the repository
    6) Then you go into Syndicator and either Update the Map or Delete it
    It had nothing to do with security.
    Thank you for your help.

  • Mapping multi-segment IDOC to multiple JDBC INSERT statements

    Hi Everyone,
    This is probably going to be easy for the experienced PI developers out there but I'm just starting out in this technology. We are running PI 1.11 and the scenario is as follows. We have a bespoke IDOC message type ZSTOCK which can contain 1-many segments with the following field content:
    WERKS
    MATNR
    VBELN
    ACT_LABST
    AVL_LABST
    For each segment in the source IDOC, I want to generate an INSERT statement to insert a row in an SQL table via the JDBC adapter with the following columns:
    Plant
    Material
    SalesOrd
    ActStock
    AvlStock
    Basically, each field on the source IDOC segment maps directly onto the target column of the SQL table. The problem is, on a multi-segment IDOC only the first segment is generating a row in the SQL table. I've seen a number of threads on this forum that seem to tackle the same issue but the solution is either missing or unclear. I think the solution lies somwhere in the occurrences of the STATEMENT node in my target message type and perhaps specific definitions in the message mapping. Can anyone help solve this mystery?
    Thanks,
    Gary

    Hi Gary
    If you created a data type, try to change occurrence of STATEMENT node to 0..unbounded or 1..unbounded.
    In the message mapping, map the target STATEMENT node with the source 1-many segment.
    You can find [here|http://help.sap.com/saphelp_nw70/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/content.htm] more informations about the JDBC structure
    Regards,
    Giuseppe

  • MAPPING.RESOURCE_NOT_FOUND

    Hello
    I have a simple test project where I map some address fields into less fields. Nothing complicated and this szenario did work already. But now I get an error:
    Result:  
    <SAP:Error>
    <SAP:Category>Application</SAP:Category>
    <SAP:Code>MAPPING.RESOURCE_NOT_FOUND</SAP:Code>
    <SAP:P1>com/sap/xi/tf/_MM_Address_To_CustomerAddress_.cla~</SAP:P1>
    <SAP:P2>urn:siller.de:BIT400SWC:1.0</SAP:P2>
    <SAP:P3>677396c0-2072-11da-8fff-d1b7ac110534</SAP:P3>
    <SAP:P4>-1</SAP:P4><SAP:Stack>Unable to find resource com/sap/xi/tf/_MM_Address_To_CustomerAddress_.cla~ (urn:siller.de:BIT400SWC:1.0, 677396c0-2072-11da-8fff-d1b7ac110534, -1)</SAP:Stack>
    </SAP:Error>
    My scenario was synchronous and I added some async stuff. I copied the original MM, MI and IM and altered to async and gave them new names. And a new configuration of course. XI Cache is correct I only see two mapping programms one for sync, one for async, every light their is green.
    I tested now first my sync scenario it gives me the error, my async scenario either.
    Scenario: HTTP to IS, then a file written down.
    Test with HTTP Client page.
    Please help!
    TIA
    Dominik

    You can also try to do a complete cache refresh in
    sxi_cache -> XI runtime cache.
    I already did it more than once No effect
    Please check the cache  notifications in your Repository and Directory.
    in repository no error
    in directory I had errors but at my last two commits this error doesn't occure any more. Error (in german) is:
    Die von den Datenänderungen betroffene Adapter Engine "af.kv1.kovacic-t2" konnte nicht benachrichtigt werden.
    Eine HTTP-Verbindung zu "http://kovacic-t2:50000/CPACache/invalidate" lieferte als Antwort den Status-Code "401".
    My communication chanel was of type file and the integrated adapter engine was af.kv1.kovacic-t2. But now I changed it back to our IS, so no more errors here.
    Please refer to thread Java Proxy and Deployment Problem (), I did install the Adapter Engine / Framework yesterday and patched it from SP9 to SP12. I don't know but one thing was really mysterious: no xi user were installed but some of the xi websites (like rwb) I could not get connected with j2ee admin (no xisuper is available). I put all actions in UME to a role and assigned it to my j2ee admin but this didn't altered the situation: no connect to rwb website.  And in the installation guide I found no hint in this direction and I think I did all in correct order.
    But could a lokal AE installation affect our integration server if it should do a mapping?
    Dominik
    Message was edited by: Dominik Kovacic-Voß

  • Map doesn't display in PS Elements 12 organizer

    I'm trying to add places to photos, and the map doesn't display in the organizer. It's just a blank white page. I can't add any locations. All other connectivity is fine. Program just auto updated today.
    Any help is appreciated.

    No, they've moved to the bottom of the Enhance menu, for one of those mysterious adobe reasons.

  • MYSTERY!.. action not invoked on encoded commandLink...  WHY?

    Hi All !!!
    QUESTION: How are the navigation definition (in faces-config.xml) is "wired" to a "HtmlCommandButton" I encode in my custom renderer... or any other encoded UICommand?...
    This is a mystery to me at the moment. I have not been able to find any clear explanation as to how this works -- so I've not been able to debug the issue below.
    The issue: I encode an HtmlCommandButton in my custom renderer, and add an "action" attribute bound to a backing bean method "doAction()"...
    ---But, the action method is never invoked!!!
    Again, this is primarily due to the fact that I cannot tell what "wires" the navigation definitions (in faces-config.xml) to the "action" attribute in the command button and the "doAction()" method in the backing bean.
    Please let me know what I am missing or omitting from this code to allow the "action" mechanism to work properly!! :-).
    Below is the entire test application (custom component).... The idea is to have the user click on a div tag which popluates a hidden input tag and clicks a hidden HtmlCommandButton to submit the request. The application should navigate to the same page or another page based on the value of the clicked div tag.
    ***gorm.jsp***
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://mycomponents" prefix="my"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
            <link rel="stylesheet" type="text/css" href="./stylesheet.css" title="Style">
        </head>
        <body>
            <f:view>
                <h:form id="form01">
                    <h:messages/>
                    <f:verbatim><h1>Testing custom JSF component: XYZTag:  Click on a div tag...</h1></f:verbatim>
                    <my:xyz id="xyz01" divdata="#{caveBean.divdata}" valueclicked="#{caveBean.valueclicked}" />
                </h:form>
            </f:view>
        </body>
    </html>
    ***blidge.jsp***
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://mycomponents" prefix="my"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
            <link rel="stylesheet" type="text/css" href="./stylesheet.css" title="Style">
        </head>
        <body>
            <f:view>
                <h:form id="form01">
                    <h:messages/>
                    <f:verbatim><h1>show value of the div tag that was picked...</h1></f:verbatim>
                    <h:outputText value="#{caveBean.valueclicked}" />
                    <f:verbatim><br/></f:verbatim>
                    <h:commandButton value="goback" type="submit" action="#{caveBean.doAction}"/>
                </h:form>
            </f:view>
        </body>
    </html>
    ***CaveBean.java*** (backing bean)
    package xyz;
    import java.util.*;
    public class CaveBean
        private List divdata;
        private String valueclicked;
        public CaveBean()
        public void setDivdata(List divdata)
            this.divdata = divdata;
        public List getDivdata()
            List list = new ArrayList();
            list.add("blidge");
            list.add("gorm");
            list.add("glargle");
            return list;
        public String getValueclicked()
            System.out.println("valueclicked was:" + this.valueclicked + "!");
            return this.valueclicked;
        public void setValueclicked(String valueclicked)
            this.valueclicked = valueclicked;
            System.out.println("valueclicked set to:" + this.valueclicked + "!");
        public String doAction()
            System.out.println("doAction() invoked!");
            if (valueclicked.equals("gorm"))
                return "gorm";
            else
                return "blidge";
    ***taglib (tld)***
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
      <tlib-version>0.03</tlib-version>
      <jsp-version>1.2</jsp-version>
      <short-name>mycomponents</short-name>
      <uri>http://mycomponents</uri>
      <description>mycomponent tags</description>
      <tag>
        <name>xyz</name>
        <tag-class>mycomponents.XYZTag</tag-class>
        <attribute>
          <name>id</name>
          <description>this component's id</description>
        </attribute>
        <attribute>
          <name>rendered</name>
          <description>is this component rendered?</description>
        </attribute>
        <attribute>
          <name>divdata</name>
          <description>div label strings</description>
        </attribute>
        <attribute>
          <name>valueclicked</name>
          <description>value of leaf node that was clicked</description>
        </attribute>
      </tag>
    </taglib>
    ***XYZTag***
    package mycomponents;
    import javax.faces.application.Application;
    import javax.faces.component.UIComponent;
    import javax.faces.webapp.UIComponentBodyTag;
    import javax.faces.el.ValueBinding;
    import javax.faces.context.FacesContext;
    public class XYZTag extends UIComponentBodyTag
        private String divdata;
        private String valueclicked;
        public String getComponentType ()
            return "XYZComponent";
        public String getRendererType ()
            return "XYZRenderer";
        @Override
            protected void setProperties (UIComponent component)
            super.setProperties (component);
            if( divdata != null )
                if (isValueReference (divdata))
                    FacesContext context = FacesContext.getCurrentInstance ();
                    Application app = context.getApplication ();
                    ValueBinding vb = app.createValueBinding (divdata);
                    component.setValueBinding ("divdata", vb);
                else
                    component.getAttributes ().put ("divdata", divdata);
            if( valueclicked != null )
                if (isValueReference (valueclicked))
                    FacesContext context = FacesContext.getCurrentInstance ();
                    Application app = context.getApplication ();
                    ValueBinding vb = app.createValueBinding (valueclicked);
                    component.setValueBinding ("valueclicked", vb);
                else
                    component.getAttributes ().put ("valueclicked", valueclicked);
        //setting "#{}" stuff...
        public String getDivdata ()
            return this.divdata;
        public void setDivdata (String divdata)
            this.divdata = divdata;
        public String getValueclicked ()
            return this.valueclicked;
        public void setValueclicked (String valueclicked)
            this.valueclicked = valueclicked;
        public void release ()
            super.release ();
            divdata = null;
            valueclicked = null;
    ***XYZComponent***
    package mycomponents;
    import javax.faces.component.UIComponentBase;
    import javax.faces.component.UICommand;
    import javax.faces.context.FacesContext;
    import java.util.List;
    import javax.faces.el.ValueBinding;
    public class XYZComponent extends UICommand
        private List divdata;
        private String valueclicked;
        public XYZComponent()
            setRendererType("XYZRenderer");
        public void setDivdata(List divdata)
            this.divdata = divdata;
        public List getDivdata()
            if(null != divdata)
                return divdata;
            ValueBinding _vb = getValueBinding("divdata");
            if(_vb != null)
                return (List)_vb.getValue(getFacesContext());
            else
                return null;
        // setting "#{}" stuff
        public void setValueclicked(String valueclicked, FacesContext facesContext)
            this.valueclicked = valueclicked;
            ValueBinding _vb = getValueBinding("valueclicked");
            _vb.setValue(facesContext,valueclicked);
        public String getValueclicked()
            if(null != valueclicked)
                return valueclicked;
            ValueBinding _vb = getValueBinding("valueclicked");
            if(_vb != null)
                return (String)_vb.getValue(getFacesContext());
            else
                return null;
        @Override
            public Object saveState(FacesContext context)
            Object values[] = new Object[2];
            values[0] = super.saveState(context);
            values[1] = divdata;
            values[2] = valueclicked;
            return ((Object) (values));
        @Override
            public void restoreState(FacesContext context, Object state)
            Object values[] = (Object[])state;
            super.restoreState(context, values[0]);
            divdata = (List) values[1];
            valueclicked   = (String)  values[2];
        @Override
            public String getFamily()
            return "XYZ";
    ***XYZRenderer***
    package mycomponents;
    import javax.faces.component.UIComponent;
    import javax.faces.render.Renderer;
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;
    import javax.faces.application.Application;
    import javax.faces.application.ApplicationFactory;
    import javax.faces.FactoryFinder;
    import javax.faces.component.UICommand;
    import javax.faces.component.html.HtmlCommandButton;
    import javax.faces.el.MethodBinding;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.util.Iterator;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import java.io.File;
    import java.io.IOException;
    import org.w3c.dom.Document;
    public class XYZRenderer extends Renderer
        List divdata;
        String valueclicked;
        // is there a way to derive this, rather than hardcoding???
        String divaction = "#{" + "caveBean" + ".doAction}";
        public XYZRenderer()
        @Override
            public void decode(FacesContext context, UIComponent component)
            Map requestMap = context.getExternalContext().getRequestParameterMap();
            String clientId = component.getClientId(context);
            String value = (String) requestMap.get(clientId);
            XYZComponent xYZComponent = (XYZComponent)component;
            xYZComponent.setValueclicked((String)requestMap.get(clientId + ":valueclicked"),context);
        @Override
            public void encodeEnd(FacesContext context, UIComponent component) throws java.io.IOException
            XYZComponent xYZComponent = (XYZComponent)component;
            ResponseWriter writer = context.getResponseWriter();
            String clientId  = component.getClientId(context);
            Map test = component.getAttributes();
            divdata         = (List)   component.getAttributes().get("divdata");
            valueclicked    = (String) component.getAttributes().get("valueclicked");
            Map requestMap = context.getExternalContext().getRequestParameterMap();
            //build clickable div tags
            Iterator iterator = divdata.iterator();
            while (iterator.hasNext())
                String divlabel = String.valueOf(iterator.next());
                writer.startElement("div",component);
                writer.writeAttribute("onclick", "javascript: var thisform=this; while (thisform.nodeName != 'FORM') thisform = thisform.parentNode; var valueclicked=document.getElementById('"+ clientId +":valueclicked'); valueclicked.value='" + divlabel + "'; alert('you clicked the " + divlabel + " div tag'); document.getElementById('" + (clientId +"hiddenbutton").replaceAll(":","") +  "').click();", null);
                writer.writeText(String.valueOf(divlabel) ,null);
                writer.endElement("div");
            //build hidden input field that will be populated by the value of the clicked div tag
            writer.startElement("input", component);
            writer.writeAttribute("type", "hidden", null);
            writer.writeAttribute("id", clientId + ":valueclicked", null);
            writer.writeAttribute("name", clientId + ":valueclicked", null);
            writer.writeAttribute("value", "", null);
            writer.endElement("input");
            //build hidden button, whose dom "click" method will be invoked when div tags are clicked
            writer.startElement("div",component);
            encodeHiddenButton(context, clientId, divaction);
            writer.endElement("div");
        private HtmlCommandButton createHiddenButton(FacesContext context, String clientId, String divaction)
            Application application = context.getApplication();
            HtmlCommandButton hiddenButton = (HtmlCommandButton) context.getApplication().createComponent(HtmlCommandButton.COMPONENT_TYPE);
            ApplicationFactory factory = (ApplicationFactory)FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
            MethodBinding binding = factory.getApplication().createMethodBinding(divaction,null);
            hiddenButton.setId((clientId +"hiddenbutton").replaceAll(":",""));
            hiddenButton.setType("button");
            hiddenButton.setAction(binding);
            hiddenButton.setOnclick("javascript: alert('youve clicked the new HtmlCommandButton - invisible submit button!...'); var thisform=this; while (thisform.nodeName != 'FORM') thisform = thisform.parentNode;thisform.submit();");
            hiddenButton.setValue("hiddenbutton");
            return hiddenButton;
        private void encodeHiddenButton(FacesContext context, String clientId, String divaction)
        throws IOException
            HtmlCommandButton hiddenButton = createHiddenButton(context, clientId, divaction);
            hiddenButton.encodeBegin(context);
            hiddenButton.encodeChildren(context);
            hiddenButton.encodeEnd(context);
    ***web.xml***
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
          version="2.4">
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.faces</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>30</session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>gorm.jsp</welcome-file>
        </welcome-file-list>
        <jsp-config>
            <taglib>
                <taglib-uri>/mycomponents</taglib-uri>
                <taglib-location>/WEB-INF/tlds/mycomponents.tld</taglib-location>
            </taglib>
        </jsp-config>
    </web-app>
    *** faces-config.xml***
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
       <navigation-rule>
          <from-view-id>/gorm.jsp</from-view-id>
          <navigation-case>
             <from-outcome>gorm</from-outcome>
             <to-view-id>/gorm.jsp</to-view-id>
          </navigation-case>
          <navigation-case>
             <from-outcome>blidge</from-outcome>
             <to-view-id>/blidge.jsp</to-view-id>
          </navigation-case>
       </navigation-rule>
       <navigation-rule>
          <from-view-id>/blidge.jsp</from-view-id>
          <navigation-case>
             <from-outcome>submit</from-outcome>
             <to-view-id>/gorm.jsp</to-view-id>
          </navigation-case>
       </navigation-rule>
       <managed-bean>
          <managed-bean-name>caveBean</managed-bean-name>
          <managed-bean-class>xyz.CaveBean</managed-bean-class>
          <managed-bean-scope>request</managed-bean-scope>
       </managed-bean>
        <component>
            <component-type>XYZComponent</component-type>
            <component-class>mycomponents.XYZComponent</component-class>
        </component>
        <render-kit>
            <renderer>
                <component-family>XYZ</component-family>
                <renderer-type>XYZRenderer</renderer-type>
                <renderer-class>mycomponents.XYZRenderer</renderer-class>
            </renderer>
        </render-kit>
    </faces-config>--thanks again for any help!!!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

    Hi,
    I THINK this is what you are after. You firstly shoudl add a new attribute to your component which can take a value binding expression to your bean method, this function can take any format is likes in your backing bean as long as it is public. In you tag you will then need some code similar to this:
    if(divaction != null){
             if(isValueReference(divaction )){
                    //This line here is if your function takes a single Integer arguement,
                   //you should replace it with whatever is correct for your function.
              Class[] defineParams = {Integer.class};
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(divaction , defineParams);
              ((YourComponent)component).setDivaction(mb);
             else{
              MethodBinding mb = Util.createConstantMethodBinding(divaction );
              ((RelationshipsComponent)component).setDivaction(mb);
         }And in your component you will need to add a MethodBinding variable with teh relevent getter/setter. One thing that I had a problem with here is that you must now implement the save/restore state functions or between phases the component will forget all about your methodbinding.
    private MethodBinding divaction;
    //getter/setter
    //save/restore state
    public Object saveState(FacesContext fc) {
         Object values[] = new Object[2];
         values[0] = super.saveState(fc);
         values[1] = saveAttachedState(fc, divation);
         return (values);
        public void restoreState(FacesContext fc, Object state) {
         Object values[] = (Object[]) state;
         super.restoreState(fc, values[0]);
         divaction= (MethodBinding) restoreAttachedState(fc,values[1]);
        } That saiid and done, you can move on to the renderer. I have not tried to adda button in the way in which you are, I have encoded markup directly using:
    public static void encodeButton(ResponseWriter writer, String szName, String szValue, UIComponent component) throws IOException{
         writer.startElement("input", component);
         writer.writeAttribute("type", "submit", null);
         writer.writeAttribute("name", szName, null);
         writer.writeAttribute("value", szValue, "value");
         writer.endElement("input");
        }The name element is important as it is used in the decode phase, it is the value that is stored in the requestMap if the button has been pressed.
    The decode method in your rendere is wher eyou will fire your method off, you must first check to see if your button was pressed by looking for its name in the requestMap:
    Map requestMap = fc.getExternalContext().getRequestParameterMap();
    if (requestMap.containsKey(yourButtonName)){
         //react to the button being pressed
    }You should have a method bound to your control now through the code added to your tag (and obviously on the .jsp page), all you need to do is fire it which is accomplished using the following code:
    MethodBinding mb = ((yourComponent)component).getDivaction();
              if(mb!= null){
                       //this stuff here with val is again related to your method arguements, if your method takes none, you can pass null. If you pass the wrong arguments you will get an exception telling you the function does not exist.
                  Object val[] = new Object[1];
                  Integer n = new Integer((int)rvo.getId());
                  val[0] = n;
                  mb.invoke(fc, val);
              }I know this is a different approach to that which you are using, and I daresay its not quite perfect, but it works for me!

  • Looking for clarification on network latency issue vs drive mapping

    Hi,
    I am seeing this as mystery and not getting crystal clear idea on the reason for the issue. Issue is related to the performance of the application interms of time it is taking in processing the input file.
    I wrote a swing application, which is a client application. Which takes some parameters like server name and iphostaddress and connects to the Process Server which is, responsible for processing client application requests. Client application will communicate with process server through TCP/IP connection and process the input file and returns the decisions back to the user through the output file.
    Below is the scenarios I am using for launching the application:
    1. If both client application and server are running locally in my desktop the time it is taking to process the input file is 2 minutes.
    2. If client is running my application and server is running remotely on wondows server, it's taking 13 minutes to process same input file.
    3. To reduce the time in scenario2, I installed the client appliation also on the remote server ( so that both client and server application are running on the windows server). and mapped the server's share drive to my desktop. And launched the application from my desktop (from U drive, where application is mapped), now it's taking 10 minutes to process the same input file.
    I am struggling in understanding why it's taking that long in scenario 3. Because application is installed locally on the server and input file and output files also copied onto the U drive. Sometimes thinking am I launching the application in the right way or not?
    Can somebody explain me, if we launch the remote java application through drive mapping will there be network latency there eventhough everything is there on the server (U drive)? Here I need to tell one more scenario 4, If loginto the remote windows server and launch the client application time it's taking to process the same input file is about a minute.
    Below are some more details on the issue: I am not encoding the file, I am using third party application, which provides an API to communicate with the process server. Just using the API methods and classes to pass the input file data to server. I have used the 'tracert' command for the remote server and I am seeing 8 hops between my desktop and remote server. I even installed network sniffer tool in my laptop and captured the files when application running.
    The input file has 140000 records (text lines with comma delimited) of 6.271MB in size. I have posted to understand the time it is taking in scenario3, where evrything is on mapped drive (i.e, client application and input file are technically recides on the server right?) , but client application is launched from desktop. The reason I am doing this way is, instead of log-in into the remote server, user can easily launch the application from the desktop. So, when I try to launch the application this way, this doesn't count as if client application is running local to the server? Will it becomes remote (I have even captured the network traffic file in this scenario too, and I have seen the comminication between my desktop ip address to server ip address and server is taking abour 3.84 milliseconds for each item to respond to client, I think it's just travel time not the process time). I am assuming, even when application launched from drive that is mapped, it should take about 1 minute (the time taking when I launch the aplication after log-into the server,not through drive mapping) to prcess input file as everything is on the server.
    Thanks in advance,
    Jyothi

    reading and writing the data shouldn't be the problem, its what you are doing with the data which will be taking all the time.
    Try this
    public class WriteFile {
        public static void main(String... args) throws IOException {
            String filename = "record.csv";
            int records = 140 * 1000;
            int values = 6;
                long start = System.nanoTime();
                PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(filename)));
                for (int r = 0; r < records; r++) {
                    for (int i = 0; i < values; i++) {
                        if (i > 0)
                            pw.print(',');
                        pw.print(r * 10 + i);
                    pw.println();
                pw.close();
                long time = System.nanoTime() - start;
                System.out.printf("Time to write %,d records was %.3f sec. file size=%.3fMB%n",
                        records, time / 1e9, new File(filename).length() / 1e6);
                long start = System.nanoTime();
                BufferedReader br = new BufferedReader(new FileReader(filename));
                String line;
                while ((line = br.readLine()) != null) {
                    // do some work.
                    String[] parts = line.split(",");
                    int[] nums = new int[parts.length];
                    for (int i = 0; i < parts.length; i++)
                        nums[i] = Integer.parseInt(parts);
    br.close();
    long time = System.nanoTime() - start;
    System.out.printf("Time to read %,d records was %.3f sec%n",
    records, time / 1e9);
    PrintsTime to write 140,000 records was 0.462 sec. file size=6.193MB
    Time to read 140,000 records was 0.792 sec

  • How to Remove Computer Added Mysteriously and Without NMagic!

    Don't know how but on my NMagic map there is now a mysterious new computer which I didn't add.  I can't figure out how to get rid of it since it also says I need to install NMagic on that mysterious computer.  If I install it on that computer which is non-existent, then I'll really be installing it twice on my desktop (which, yes, is already in the network map).  Does anyone know how to get rid of a ghost computer which has showed up in my NM map?   Geesh!!! Email at [email protected] if you can help.  Thanks!

    Solved my problem. I made all the changes suggested by mbroadfo  in the query "Network Map Issues Solved" and it fixed my problem
    Theron...

  • Elements 11 vs 13: how can I add a new place tag to my PSE13 database without using the wretched and totally inadequate map technology  that Elements 13 wants to impose.

    HI,
    I have recently installed Elements 13 having used Elements 11.0 successfully to build a database of 30,000 plus images indexed by place, people, and photo date. Elements 11 allowed me to add new places which are meaningful to me but which are a complete mystery to the mapping technology of Elements 13. For example some years ago I lived in London in a road called Argyle Road. In elements 11 I could enter the place tag as Argyle Road. In Elements 13 I am required to locate Argyle Road on the map, but the map presupposes that the Argyle Road I am referring to is in Ealing in West London. It is not!
      I now live in a place called Broadsands but the Elements 13 Map places this 0.5 miles away from what I would describe as Broadsands.
      So the question: how can I add a new place tag to my database without using the wretched and totally inadequate map technology  that Elements 13 wants to impose.

    Thank you for your quick response, BalusC. I really appreciate your answer.
    Yes, you are right. If I manually code the same amount of those components in the JSF pages instead of generating them dynamically, the server will still run out of memory. That is to say, JSF pages might not accommodate a great deal of concurrent visiting. If I upgrade the server to just allow 1,000 teachers making their own test papers at the same time, but when over 2,000 students take the same questionnaire simultaneously, the server will need another upgrading. So I have to do what you have told me, using JS+DOM instead of upgrading the server endlessly.
    Best Regards, Ailsa

  • CS3 style mapping problems

    Using: CS3 (all updates), Intel Mac 10.6.8, word 2008 (doc saved in 2003 format):
    Hyperlink is defined to inherit the properties of the underlying style and works fine in both Word and InDesign. However, when importing from word to ID, both the body and info styles (a smaller insert under a paragraph that usually contains a hyperllink in a smaller type and differnt font and properly mapped in custom import) come in with overrides. The hyperlink also change to a Times Roman typeface that has nothing to do with the underlying style definitions in either word or ID. It's a mystery to me why it does this. Any suggestions? Fixing it takes a lot of time when style conversion should be automatic.

    Using: CS3 (all updates), Intel Mac 10.6.8, word 2008 (doc saved in 2003 format):
    Hyperlink is defined to inherit the properties of the underlying style and works fine in both Word and InDesign. However, when importing from word to ID, both the body and info styles (a smaller insert under a paragraph that usually contains a hyperllink in a smaller type and differnt font and properly mapped in custom import) come in with overrides. The hyperlink also change to a Times Roman typeface that has nothing to do with the underlying style definitions in either word or ID. It's a mystery to me why it does this. Any suggestions? Fixing it takes a lot of time when style conversion should be automatic.

Maybe you are looking for

  • Creative Cloud problems since Mavericks update

    Hi Has anyone else had problems using Adobe Creative Cloud since upgrading to Mavericks? I have a Mac Pro at work and everything runs smoothly on that but my 2nd license on my home iMac doesn't work properly. Photoshop won't open and constantly freez

  • Clustor table in Query - SQ01

    Hi All I know that clustor tables can not be used in joins. Can any body please let me know how do I use data in table REGUP with joines. Also I want to know where can we use output of one infoset or SQ01 in other ?? Thanks in advance Sameer

  • Otlook Internet Calendar not importing

    Hi, My web application (asp.net mvc) provides a 'webcals' link that users can import into outlook and add a calendar from the app. This was all working fine a week ago. I updated the webapp to be accessed exclusively over ssl and now the functionalit

  • Can i turn on my find iPhone app from my mac ?

    my iphone was stolen from out a grocery store yesterday and from the store camera i could see somebody leaving with it  just so happen my find my iphone app was turned off is there any way possible that i can turn it on from my mac computer so that i

  • Error in TS10008187 Send E-mail (E-mail when Return Delivery to Vendor)

    Hi Folks, When I create a return delivery the automatik approval WF for confirmations goes into error status. The error message is as follows: <i>Work item 000000010094: Object CL_BBP_ACTION_NOTIFICATION_WF method SEND_PARAM_MESSAGE_WF cannot Message