Java code in the expression editor

The Java tab in the expression editor makes me think it should be possible to write a bunch of lines of code java, somehow but no matter what I try it always refused. The java code only I got to work was create a set command, and then write the right side a

var x = something;

statement. Since there is no try/catch, if, while, instructions etc. in the java tab, should not be possible to use somehow? And if so, what can they be used in (quite apparently the game is bad)?

I use IPCC 4.5 with Premium license and I am able to write java code inside the set command.

The java code must be writing in brackets {}; for example

{

try {}

int i = 0;

int result = 0;

for (i = 0; i<>

result = result + i;

}

return the result;

} catch (Exception ex) {}

Returns - 1;

}

}

Hope this helps.

Stefano

Tags: Cisco Support

Similar Questions

  • I want to use the expression editor control in a DLL VC ++ how?

    Hello

    as mentioned I want to use the expression editor control in my DLL written with VSC ++ 2005 MFC. But I came across some problems:

    If I simply add the ExpressionEdit control in the toolbar to my dialog box then the dialog box will appear not during execution. As soon as I remove the control from the dialog box appears.

    In the examples of TS is a called "TCL" (...) Instruments\TestStand national 4.1.1\Examples\Tcl\source\EditSubstep). It is programmed in C++ and uses the expression editor control.

    The original dll works fine, but as soon as I compile the editsubstep with my VS 2005 I get a runtime error (see image).

    What should I do to be able to use this control?

    Does anyone have an example of a job for me?

    Frank has soon

    Hi, I found the solution and now it works fine.

    I just had to enable support for OLE controls in my dll.

    Nevertheless, thanks for your help!

    BOOL CMyDLLApp:: InitInstance()

    {

    CWinApp:: InitInstance();

    AfxEnableControlContainer();  enable support for OLE controls

    Return TRUE;

    }

    Frank has soon

  • Unable to see the function of the technology in the Expression Editor - ODI 11 G

    Hello

    I develop Interface while I am unable to see the technology functions in the Expression Editor where I'm doing a transformation.

    Secondly, in the header, it is show the default language instead of SQL (Oracle)

    any difficulty please...

    Thank you

    KPimage001.png

    I fixed it myself - thank you

    Below, was the step that I did which solved the problem. hope this will help others

    Go to the Studio of ODI

    Develop the language in topology-

    Import new language

    Import mode INSERT_UPDATE synonym

    The definitions of the language of $ODI_HOME/oracledi/xml-reference/LANG_SQL.xml

    Click OK

    Close ODI Studio and open again. that fixed my problem.

    Thank you

  • inserting submenu items via the code - not the file editor graphics *.uir (not the edit &gt; &gt; Menu Bars... method!)

    How submenu items are constructed by code and not the edit menu bar settings in the *.uir Editor?  NemMenuItem (...) does not do that, or I'm not plugging in parameters correctly, which I doubt is the case.  BTW, he has no explanation in the help of v.8.0.1 AIC menu items on NewSubMenu (...) and how to use the subMenuHandler for all other functions.  At least everything I found had nothing to do with submenu items.  Is it impossible to do it by programming?

    Hi Chris,

    You can paste the code below directly to the interactive execution window and run.

    The result is in the attachment.

    #include

    public static int NLP, mbar, menu;
    public static int mitem, submit, submitem;

    NLP = NewPanel (0, "", 250, 250, 250, 250);
    mbar = NewMenuBar (NLP);
    menu = NewMenu (mbar, "menu",-1);

    mitem = NewMenuItem (mbar, menu, "submenu",-1, 0, 0, 0);
    prese = NewSubMenu (mbar, mitem);
    submitem = NewMenuItem (mbar, submit, "submenuitem",-1, 0, 0, 0);

    DisplayPanel (NLP);
    RunUserInterface ();

    I hope that's what you asked for.

    Have a nice weekend

  • What is the problem with this single line of Java code in the software special approval BPEL code?

    Hello

    My java code does not build in jdev if I leave this line in java tissue BPEL code

    Criteria of SearchCriteria = new SearchCriteria (AttributeName.USER_LOGIN.getId (), une_chaine, SearchCriteria.Operator.EQUAL);

    With the help of Jdev 11.1.1.7.0

    oimclient is inside of the SCA-INF/lib, manifest says it is version 11.1.2.2.0

    Error message does not say much

    at com.collaxa.cube.lang.compiler.template.CubeProcessGenerator.compile(CubeProcessGenerator.java:313)

    at com.collaxa.cube.lang.compiler.template.CubeProcessGenerator.generate(CubeProcessGenerator.java:169)

    at com.collaxa.cube.lang.compiler.BPEL1Processor.transform(BPEL1Processor.java:257)

    at com.collaxa.cube.lang.compiler.BPEL1Processor.process(BPEL1Processor.java:161)

    at com.collaxa.cube.lang.compiler.CubeParserHelper.compile(CubeParserHelper.java:47)

    at oracle.fabric.bpel.bpelc.BPELComponentValidator.validate(BPELComponentValidator.java:40)

    at oracle.soa.scac.ValidateComposite.validateComponentTypeServicesReferences(ValidateComposite.java:1066)

    at oracle.soa.scac.ValidateComposite.doValidation0(ValidateComposite.java:514)

    at oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:493)

    at oracle.soa.scac.ValidateComposite.run0(ValidateComposite.java:214)

    at oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:195)

    at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:187)

    Do I need exactly the same version of jdev to oimclient?

    TIA

    Leo

    Well it seems to work when I remove all imports, even classes in java.util. as map, list, etc.

  • Impossible to compile the Java Code using the Oracle API

    Hi all

    I use the following code for use in Oracle 11 g. What pots of IOM should I include to get this to compile? I seem to have all the necessary jars, except the one that contains Thor.API.Operations... If someone could point me in the right direction for this, I would be very grateful.

    package AdTest;

    Thor.API import. *;
    Import Java.util;

    public class {AdTest

    public void AddProcessChildData (long pKey) {}
    try {}
    tcFormInstanceOperationsIntf f = getUtility ("Thor.API.Operations.tcFormInstanceOperationsIntf") (tcFormInstanceOperationsIntf);
    tcResultSet childFormDef = (f.getProcessFormDefinitionKey (pKey), f.getProcessFormVersion (pKey)) f.getChildFormDefinition;

    childKey long = childFormDef.getLongValue ("Structure Utility.Child Tables.Child Key"); If there is only 1 child for the form table parent on the other you have to iterate over the result set

    Map attrChildData = new HashMap();
    String NUGroupe = "someValue";

    attrChildData.put ("UD_ADUSRC_GROUPNAME", NUGroupe);

    f.addProcessFormChildData (childKey, pKey, attrChildData);
    } catch (Exception e) {}
    e.printStackTrace ();
    }
    }
    }

    xlAPI.jar

  • Run the java code before the page is rendered

    Hello

    In a workflow, can I run the code java before the page/view is rendered (i.e. some preprocessing). I need to be able to have access to the links on the page.

    Thank you!

    Yes, you can.
    Right-click on the activity of your method call, choose create the definition of the page and you can add the links you need.

  • Java code for the current date more than 30 days

    I searched this forum and google to see if I could get something to work with negative results. I created a form in Livecycle 8.2 and I'm trying to set a due date 30 days from today's date. When the form is opened, I have the date and time, read-only, displays so I also the expiry date to automatically display. I don't know anything about Java, and that I have used so far I was able to copy and paste to my form. Any help would be greatly appreciated.

    It was too complicated. All you need is:

    $ = Num2Date (date () + 30, ' MM/DD/YYYY')

  • What is the Java code for the symbol ' # ' "end of the cell?

    Thank you first of all!

    I'm doing a script to delete tabs and spaces right before paragraph return and end of table cells symbols "#".

    I can get the paragrahs (\r) to work, but I don't have a clue as to what the code is for the end of the table cell symbol #.

    Help, please.

    Bill Bernhardt

    Publications of Doosan

    Old dog trying to learn new tricks!

    Use the end-of-section marker, \Z:

    app.findGrepPreferences.findWhat = "\\s+\\Z";

    app.changeGrepPreferences.changeTo = "";

    Peter

  • How to see the public API java code (including police)

    Hello

    Excuse my noobishness, but I recently met {this} message and can't seem to find out how Mantaker (and other participants of the discussion) discovered the java code in the class of the police?

    Am I missing something? Is it possible for any public class?

    Please fill in my blanks of knowledge.

    Thank you.

    If you look at the post just above that you have linked to you will see that they used the javap command.  It's legal and it comes with the JDK.  Either way, you will notice that it does not give the complete code just the headers of the method and fields.

    For example, to get information, they passed the command line and navigate to the directory where your net_rim_api.jar file is.  Then type

    javap net.rim.device.api.ui.Font
    

    Of course, this assumes that the javap command is in your path.

  • export of Muse code in the HTML of a marketing automation software tool Editor

    Dear reader,

    I would like to export Muse code in the HTML of our marketing automation software tool Editor. However, when paste us the code in the HTML editor is not pulling the sheet style or javascript. If the result shows that the text w/o design. To resolve this issue, our software tool support of MY tells me to write the full path in the form style or the javascriptin in the code.

    Muse can do this?

    If so, it is a Muse setting when you save a file? Or can / should I adjust the Muse code manually?

    Does anyone here know?

    Thanks a lot for your help!

    Paul

    URL to external resources in Muse is on the root folder of global site and / or the subfolder by page more prior global stuff hosted on TypeKit and Business Catalyst. That and, of course, much is channeled through the widgets in the respective scripts folder. And since the Muse uses several classes for many items, you must refer to all. And did I mention that your software will most likely to mess with the styles that he rewrites the code and when it sends emails probably half of the stuff will break down because the external resources will be blocked for technical reasons or safety? Overall, your plan is not really sense - for me at least. You simply use the wrong tool and possibly the wrong methodology. These systems usually have very specific requirements, and you need to work within these rules, do not try to circumvent the. Fancy that you can't through is unnecessary at all. If you insist with Muse, you always do a vast cleanup and rewrite in Dreamweaver, but otherwise just start here right now using inline styles and formatting which can easily be copy & pasted together in the first place.

    Mylenium

  • Where to put the java code - best practices

    Hello. I work with the Jdeveloper 11.2.2. I'm trying to understand the best practices for where to put the code. After reviewing the http://docs.oracle.com/cd/E26098_01/web.1112/e16182.pdf, it seemed that request module was the preferred location (although many examples in the pdf file reside in the main methods). After some time of coding, if, I noticed that there was a certain libraries imported and wondered if this would impact performance.

    I looked at the articles published on the forum, in particular Re: programmatically access the method of service (customer interface) . This link mentions for access to the code a bean of support - and the bulk of the recommendations seem to be using the data control to drag to the Joint Strike Fighter, or use the links to access code.

    My interest lies in where to put the java code in the first place; In the view object, entity object, and... other Am, backing bean object?

    I can describe several guess better know where to put the code and the advantages and disadvantages:

    1. in the application module
    Benefits: Central location for code makes development and support easier as there are not multiple access points. Kinda like a data control centralizes the services, the module of the application can act as a conduit for the different parts of the code you have in your model objects.
    Cons: Everything in one place means that the module of the application becomes bloated. I don't know how the memory works in java - if the app module has tons of different libraries are all called when even a method of re - run a simple query is called? Memory of pigs?

    2. write the code in the objects it affects. If you write code that accesses a view object, write it to a display object. Then make it visible for the customer.
    benefits: the code is accessible through ducts less (for example, I expect that if you call the module from the application of a JSF backing bean, then the module of the application calls the view object, you have three different pieces of code-)
    CONT: the code gets spread, more difficult to locate etc.

    I would greatly appreciate your thought on the issue.


    Kind regards
    Stuart

    Published by: Stuart Fleming on May 20, 2012 05:25

    Published by: Stuart Fleming on May 20, 2012 05:27

    First point here is when you say 'where to put the code of java' and you're referring to ADF BC, the point is that you put 'code of java business logic' in the ADF business components. Of course it is very good to have the Java code in the ViewController layer that covers the user interface layer. Just don't put the business logic in the user interface layer and don't put no logical user interface in the model layer. In your 2 examples you seem to consider the ADF BC layer only, so I'll assume that you're not only serious logic java code.

    Meanwhile, I'm not keen on best practices in the term that people are following best practices without thinking, usually best practices come with conditions and forget to apply. Fortunately you do not here that you have thought through the pros and cons of each (nice work).

    Anyway, back on topic and turn off my soap box, regarding where to put your code, my thoughts:

    (1) If you have only 1 or 2 methods set in the AppModuleImpl

    (2) If you have hundreds of methods, or there is that a chance #1 above will turn into #2, divide the code between the AppModuleImpl, the ViewImpl and the ViewRowImpls. Why? Because your AM will become overloaded with hundreds of methods making it unreadable. Put the code where it should logically go instead. Methods that operate on a specific line of VO Approfondissez partner ViewRowImpl, methods that work across lines in a VO enter the ViewImpl and methods that work throughout your in the associated AppModuleImpl.

    To be honest that you never the option you choose, one thing I recommend as a best practice is to be consistent and document standard so not know your other programmers.

    BTW, it is not a question about loading a lot of libraries/imports in a class, it has no performance cost. However if your methods require a lot of class variables, then yes there will be a memory of the costs.

    On a side note, if you are interested in more ideas on how to create ADF applications properly think about joining the EMG "ADF", a forum which deals with ADF architecture, best practices (cough), deployment architectures free online and more.

    Kind regards

    CM.

  • Change the precision of the express vi table

    Hello friends.

    I have a problem.

    I use an Express VI to create a Table.

    If you see an example below, he has a table with precision set to 2.

    Now if I want to change the precision, I must right click, go to properties and make the change in accuracy.

    Is there a way to change the accuracy by programming. I couldnot see any node property for precision adjustment.

    Can someone help me?

    PS: I'm not very familiar with Labview, so I would stick to screw Express. I know that they are not preferred by the senior programmers, but they are somehow very easy and convenient to use for newbies like me.

    Rgds,

    Rohit Chawla.

    Not possible in Express VI itself, but you can add your own code between the Express VI and the resulting table. See that attached to modified VI to get the idea.

    See you soon,.

    Cerati

  • reuse Java code?

    Hello

    I need to use the same java method in jsp pages (templates).

    so I created an element of CS and I put all the common inside java code using the < %! % >

    Can I use < %@include = file "" % > to call this CS element and use the methods? "

    Because I think it does not with the < render: callelement...

    Kind regards

    Ghazi H.

    Hello

    What you are trying to do is a bad practice in my opinion and I recommend you to create a new library of classes (jar) and import the classes you need in the different models.

    It will be useful,

    Gerardo

  • ODI filter expression editor

    Hello

    I created a filter in ODI, but I can't make an expression in the expression editor. I need to use a statement "Case when" but I get an error "Invalid relational operator.
    I have attached a screenshot: [http://postimage.org/image/brt3u74up/]
    If someone could help or give me a hint, I'd appreciate it.

    Thank you

    Let's not the syntax of your expression. Please try this

    TIP. TIPO_PEDIDO =
    CASE
    WHAT TRICK. CENTRO ('L150', 'L180', 'L358', 'L395', "L151") THEN 'CENTRAL '.
    OTHERWISE "DESCENTRAL".
    end

Maybe you are looking for