How to get in Java Graphic context of Excel?

My question is about the Graphic context.
Through the HSSF story I can set a font and style of the Excel sheet, how can I get the Graphic context of it? I need it to get the text metrics later of the sheet.
Thanks in advance.

Hi Sireesha,
    You want to display value based on the key selected in dropdown list. If you want to do like that
1) Create a context attribute for ex: key_value
2)In the properties of the attribute select the calculated as true.
3)It will create getter and setter methods for your attribute.
4)Go to implementation add the following code in getter method of your attribute
String attributeName = IPrivateCreate.IContextElement.KEY;
//KEY is your dropdown key attribute not the value attribute.
IWDAttributeInfo attributeInfo = element.node().getNodeInfo().getAttribute(attributeName);
ISimpleTypeModifiable simpleType = attributeInfo.getModifiableSimpleType();
IModifiableSimpleValueSet valueset = simpleType.getSVServices().getModifiableSimpleValueSet();
Object key = element.getAttributeAsText(attributeName);
return valueset.getText(key);
Regards
Suresh

Similar Messages

  • How to get the java code of the message mapping

    how to get the java code of the message mapping,
    I mean to ask how to get the background java code of the message mapping(graphical mapping).
    And where to view it?

    Hi Satya,
    The JAVA code for graphical msg mapping is in below folder:
    \usr\sap\<SID>\<DVEBMGS10>\j2ee\cluster\server0\temp\classpath_resolver
    Here all the mapping jars are there in this folder.
    Just decompile these jars and you can see the code.
    Thanks,
    Rajeev Gupta
    Message was edited by:
            RAJEEV GUPTA

  • How  to get the java code of the standard functions

    How  to get the java code of the standard functions in xi
    Example , hoh get the java code for a node function - removeContext.

    hi
    Click on the Standard Function.
    Hold Ctrl+Shift
    right click on the standard function to view the context menu. You will see options to view the source code by exporting
    regards
    krishna

  • How to get Array values from context

    In my jsp page, I have a group of checkboxes, named "checkbox" and each of them has a different value.
    <form>
    <input type=checkbox name=checkbox value=1>
    <input type=checkbox name=checkbox value=2>
    After I submit the form, I need to get the checkbox's values from next page's control file, which is a Java file. In the Java file, I use "com.sap.mbs.core.api.Context" class,
    String cbString = (String)context.getNodeList().get("checkbox");
    but I can only get the value of the first checkbox.
    I have tried context.getValue("checkbox", 0), context.getValue("checkbox", 1), context.getValue("checkbox", 2), but all I got is "null".
    I beleive the context has the value of the checkbox array. But how to get them out? Thanks a lot!

    Jo:
    You can download MAM application here
    ftp://148.87.8.191/server/outgoing/annie/MAM30.war
    Source code is in MAM30.src.zip.
    Also here is my view file, which may provide some clue:
    <?xml version="1.0" encoding="UTF-8"?>
    <view screen="/zjsp/zpm_enh_quickPassConf/zQuickPassConf.jsp" controller="ca.cn.sap.mobile.tis.pmenhQuickPassConf.controls.QuickPassConfManagement">
        <event name="onLoad">
           <forward name="error" component="error" view="ErrorDetail"/>
           <forward name="callback" component="zpm_enh_649" view="zPmEnh649Main" />
        </event>
        <event name="onGoEnh649">
         <forward name="default" component="zpm_enh_649" view="zPmEnh649Main" />
        <forward name="callback" component="zpm_enh_650" view="zPmEnh650Main"/>
       </event>
        <event name="onGoProcessRec">
         <forward name="default" component="zpm_enh_649" view="zPmEnh649Main" />
        <forward name="callback" component="zpm_enh_650" view="zPmEnh650Main"/>
       </event>
    </view>
    Thanks,
    Annie

  • Get the printer Graphics context before printing

    My applikation can print multiple pages where each page may look different. So I decided to implement the Pageable interface. When I create the object which implements the Pageable interface I must create the pages (which implement the Printable interface) of my print job. The number of pages depends of the size of some text paragraphs.
    My problem is that I must know the Graphics context object which will be used for printing when I create the pages of my print job because I must use the Graphics context to measure text. But I can not see a possibility to get the Graphics context before the actual printing starts with printJob.print(...).
    Has anyone an idea how I can solve the problem?

    Hi,
    if its a Smartform we can find the device in structure ssfcompop-tddest. Usually we define one structure with same type and pass the value to Smartform Function Module in driver program...
    If its a 'SAP SCRIPT' u can find the device in structure 'ITCPO-tddest', we pass this value to 'OPEN_FORM' Function Module in driver program.
    Hope it helps!!
    Regards,
    Pavan

  • How to get the SharePoint user context available in custom federated search connector?

    Hi,
    I'm investigating the possibilities for developing a federated search connector for SharePoint 2013 Online. This should allow us to search a customer's database through our custom developed application (both on premise). We intend to develop
    an remote federated search connector (using OpenSearch protocol) and configure a result source in SharePoint for that connector.
    The problem I'm struggling with is that I want different search results from this ressult source based on the permissions of the user that is executing the search. The admin should find a lot because he has permissions on certain items in the custom
    application. The employee should find just a few because he has no permissions on certain items in the custom application. We developed the custom application ourselveds and the search in that application is taking permissions into account: it doesn't
    return results if a user doesn't have sufficient permissions. That part works just fine.
    However, to be able to use that, the remote federated search connector must be able to identify the user that is executing the search in SharePoint Online. So: how do I get the SharePoint user context in the remote federated search connector?
    I know I can configure the replacement token {User.Name} in the result source configuration, but that gives me the name of the user only. This is insufficient to get an identity, principal, token or whatever, that let's me log in into our custom
    application.
    I also know that in a provider hosted app, user context is passed through from SharePoint and is known within the remote app. But since result sources need fixed (or anonymous) credentials configuration for connecting to the remote federated search connector,
    all users will be using the same credentials. This makes me assume these credentials are for securing communication and cannot be used within the execution of the search within the remote federated search connector.
    At the moment, I'm stuck. Any help will be greatly appreciated.
    Cheers,
    Ruud.

    Hi,
    Per my knowledge, we cannot get the SharePoint user context available in custom federated search connector with other methods.
    Here is a similar thread for your reference:
    https://answers.atlassian.com/questions/263735/atlassian-sharepoint-connector-federated-search-authentication-and-authorization
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • How to get / view Java Sound source code

    Hi All,
    I'm curious to view the Java Sound source code, is that possible? Let me know what I have done so far,
    1. In eclipse I have mapped the src.zip from the JDK directory, now I am able to view most of the source code.
    2. When I try to view AudioSystem.getProviders method it returns value from JDK13Services.getProviders
    But I dont have source code for JDK13Services class, indeed i don't have com.sun.media package source code, in the src.zip
    Do anyone know how to get com.sun.media package source code?
    Thanks in advance,
    Karthikeyan R

    It appears that the 3rd entry of this search
    [http://www.google.com/search?q=JDK13Services]
    give both the javadoc and source for JDK13Services, as follows:
    [http://www.docjar.org/docs/api/com/sun/media/sound/JDK13Services.html]
    The other search listings appear to contain useful information, also.

  • How to get Media File in Context

    Hello Everyone,
    I have an application on which i need to store and manage millions of media content (can be audio/visual). As i cannot maintain that much content in the WebContext, so i put the content on the different server.
    Now the problem is when someone need to play the media content than that content need to be with in the WebContext other wise the Media Player does not get the URL/Content.
    Now As i have put the data on different server, how i get the files in the Cureent Applications web context????
    I am out of ideas at the moment. Please suggest something. I am using Struts1.3,JSP,JSTL for the presentation layer and Hibernate for the DB Layer.

    You just need a servlet to access the place where the media content is, and stream it back to the client.
    http://balusc.blogspot.com/2009/02/fileservlet-supporting-resume-and.html has an example (and links) for a File/Image servlet that does something similar.
    You may need to adapt it if you are streaming stuff, but it the theory remains the same.
    cheers,
    evnafets

  • How to get the right graphics card on my macbook in order to play team fortress 2??!!

    does anybody know how to get a NVIDIA GeForce 8 or higher, ATI X1600 or higher, or Intel HD 3000 graphics card on a macbook, (mac OS X, version 10.5.8 with a 2.4 GHz intel core 2 duo, chipset model - GMA: X3100??? I desperately need to play team fortress 2 on my macbook!!

    alfie123lewis wrote:
    does anybody know how to get a NVIDIA GeForce 8 or higher, ATI X1600 or higher, or Intel HD 3000 graphics card on a macbook, (mac OS X, version 10.5.8 with a 2.4 GHz intel core 2 duo, chipset model - GMA: X3100??? I desperately need to play team fortress 2 on my macbook!!
    Buy a new one?
    Seriously, you can't upgrade a video card on a laptop, unless your a electronics whiz or something.
    The Intel HD 3000 is a integrated graphics, meaning the CPU does the graphics and isn't all that great because GPU's are more powerful than CPU's apparently.
    http://www.cbscores.com/index.php?sort=ogl&order=desc
    http://www.videocardbenchmark.net/high_end_gpus.html
    The most powerful vidoe cards are in desktop machines which you can exchange, and for less money Windows tower is a better 3D gaming platform as it comes with Windows when you buy the comptuer (a $300 savings) most games are on Windows because of the less expensive and open hardware.
    However!  If your into 3D gaming and need a Mac laptop, then you'll need a
    2.2 Ghz 15" MacBook Pro with 1GB Radeon 6750M video card or
    2.2 Ghz 17" Macbook Pro with 1GB Radeon 6750M video card.
    (2.3Ghz is fine too, not all that much faster really)
    This Radeon 6750M is THREE times faster than the pitiful Intel HD 3000. 
    The object being is you buy as much video card performance up front as you can, and play all the latest games at over 50 fps on max settings!
    Then over time as new games come out and demand more hardware, you trim down the graphics in the game itself to keep the frame rate up.
    Eventually though, you'll have to buy a new MacBook Pro, because you can't (reasonably) change the video card in laptops like you can with a desktop like a Windows PC tower or a MacPro.
    The iMac you can't do squat with neither. Which is a shame actually.

  • How to get "Executable java file"?

    Hi,
    I wanted to get the .class file of my java programme for execution. i.e say "c:\java Abc ", I wanted to get "Abc" so that I can execute my file in my GUI like "java Abc".
    Here is what I am doing
    File file;
    String command = "java";
    Process p;
    String classname = file.getPath(),fileName = file.getName();
    p = Runtime.getRuntime().exec(command+" "+classname);
    When I use this, I get the .java file. I wanted to get the "EXECUTABLE FILE ONLY", can any one help me?
    Thanks

    Put these lines after fileName = file.getName();
    if (fileName.endsWith(".java"))
        // Remove the .java extension from the filename
        fileName = fileName.substring(0, fileName.length() - 5);
    }

  • How to get only the graphics path without graphics names?

    Hi All,
    I need to get only the graphics path without graphics names like 'd:\Images\' instead of 'd:\Images\abc.jpg' in JS.
    Thanks,
    Praveen

    Something like this should get you close…
    #target indesign
    function main() {
         if (app.documents.length == 0) {
              alert('Please have an "Indesign" document before running this script.');
         return;
         docRef = app.activeDocument;
         with(docRef) {
              var x = rectangles[0].allGraphics[0].itemLink.filePath;
              var y = new File(x).parent.fsName;
              $.writeln(y);
    main();

  • How can get & use java true type fonts in my applets

    Hi
    I could get the System fonts in my Applet by making use of Toolkit.getFontList()
    I have used getGraphicsEnvironment to get fonts but my browser doesn't support it.I get ClassNotFoundException.
    How can I get & make use True Type Fonts in my Java Applet.
    any body knows reply immediate pls
    Siva

    similar problem:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=164516
    sorry, thats all i know.
    tobias

  • How-to get the JSF application context path?

    I want to do a redirect from within a JSF backing bean. How do I get the application context path?
    I plan to do this in the constructor of the backing beans in order to validate the user has previously logged in.
    public BackingBeanName()
    FacesContext facesContext = FacesContext.getCurrentInstance();
    HttpSession session = HttpSession)facesContext.getExternalContext().getSession(false);
    HttpServletRequest request = (HttpServletRequest)facesContext.getExternalContext().getRequest();
    userid = (String)session.getAttribute("userid");
    if (userid == null) {
    logger.info("userid attribute is not in session");
    ExternalContext ec = facesContext.getExternalContext();
    appContextPath = ???????????????????????;
    String redirectTo = appContextPath + "/logon.jsp";
    try {
    ec.redirect(redirectTo);
    catch (IOException e) {
    String msg = "redirect to " + redirectTo + " failed";
    logger.severe(msg);
    return; // throw an exception instead of return;
    Regards,
    Al Malin

    Frank, your suggestion of using JSF global navigation to the logon page looks like what I need but I need some advice implementing it.
    My backing bean constructor looks like this:
    public Search()
    FacesContext facesContext = FacesContext.getCurrentInstance();
    String userid = GpaUtil.getSessionUserid(facesContext);
    if (userid == null)
    logger.info("session userid not found, going to logon page");
    ??????? What goes here ????????
    ??????? I think I need to fire an event but I'm not sure how to do it, ????????
    ??????? let alone if this is what needs to be done ????????
    ??????? or even if this is the right spot in the code ????????
    gpas = ProductApproval.retrieveList("1=1","1");
    FWIW, the navigation rule looks like this:
    <navigation-rule>
    <navigation-case>
    <from-outcome>goLogon</from-outcome>
    <to-view-id>/logon.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    Your help is greatly appreciated.
    Regards,
    Al Malin

  • Help:How to get a java String value from a C char array?

    Hi,everyone,could you help me?
    the following is a C struct that i want to recieve a short message:
    struct MO_msg{
    unsigned long long msgID;          //Message ID
    char      dest_id[21]; //Destination Mobile Phone Number
    char      service_id[10];     //
    Now I want to put the "dest_id " value of this struct into a Java String variable.But I dont know how to implement it!
    The following is a block of source code that i implement this functions.But it cant get a String value ,and throw out a Exception:
    java.lang.NullPointerException
    at java.lang.StringBuffer.append(StringBuffer.java:389)
    JNIEXPORT jint JNICALL Java_md_EMAP_thread_RubeMOTSSX_getMO
    (JNIEnv * env, jobject obj, jint connId, jobject mo){
         struct MO_msg MO;
         tssx_cmpp_api_debug_flag = 1;
         int result = CMPP_Get_MO((int)connId,&MO);
         if (result == 0){
              jclass cls = (*env)->GetObjectClass(env,mo);
              jfieldID msgId = (*env)->GetFieldID(env,cls,"msgId","J");
              jfieldID dest_Id = (*env)->GetFieldID(env,cls,"dest_Id","Ljava/lang/String;");
              jfieldID serviceId = (*env)->GetFieldID(env,cls,"serviceId","Ljava/lang/String;");          
              (*env)->SetLongField(env,mo,msgId,MO.msgID);               
              (*env)->SetCharField(env,mo,dest_Id,*destId);
              (*env)->SetCharField(env,mo,serviceId,MO.service_id);
         return result;
    Please help me!Thanks!

    bschauwe:Thank you for your help!
    Yes,just as you say,using NewString Or NewStringUTF can import a C char array into a Java String variable! But now I have another question,when i use these two functions ,i found that it cant deal with Chinese character!
    do you have such experiences to deal with another language charset?if you have ,can you tell me how to deal with it.

  • HOW TO GET VALUE IN GRAPHICS

    Hi ,
    I want to get the x-axis value of a display(graph which is displayed in the form chart item). How can I get it. What should I write on the when-mouse-click trigger of the chart item ?
    Thanx
    Feroz

    You can try og_get_numcell or og_get_charcell or og_get_datecell depending on what is being plotted on the x-axis.
    Kamala
    null

Maybe you are looking for

  • How to set the variable of "path" and  classpath" in winxp

    I down a sdk1.4.2_01 and use it in windows xp system,I can use "javac"; but when I run "java *****"(eg: java abc),it do not work. The infomation is "Exception in thread "main" java.lang.NoclassfoundError:" I set my source code "C:\j21". PATH: C:\j2sd

  • I'm having trouble producing a "DVD with titles" from 4 slide shows.

    I have selected the slideshows and started the process to DVD in PSE. I found that PSE will only accept the slideshows as 1 group and will not let me add slideshows later (unsupported and/or codec missing). Some slides get turned through 90 deg when

  • Mainstage 2.1.3 going silent

    I'm using Mainstage [b]2.1.3[/b] on a MacBook [b]OSX 10.5.8[/b] Just spents untold hours programming patches and now as I'm rehearsing, Mainstage suddenly goes silent on the patch I'm using and some others too.  Have to re-boot Mainstage to get sound

  • GB 2 acting very strange.

    After getting my logic board replaced for the 2nd time because of previous problems with my iMac G5, i tried using garageband again to record my music. I was successful for 3 days, then this morning it started acting strange. The master volume knob w

  • Anyconnect using IKEV2 allowing access to Vendor

    Hi Everyone, We have configured Anyconnect using IKEv2 for our internal users and it is working fine. Recently i got  Request from our management to allow our  vendor to access our network but they dont need full access to our internal network. This