How to access static resources in ear without specifing context-root

Hello, i have a problem with my ear.
The war's structure is like this:
---/jsp
---/css
---/images/ViewRisposte.gif
---/xsl/Request.xsl
---/Common/data.xsl
/error.xsl
/input.xsl
xsl files reference css and images files that are contained in css and images dir.
I can't use the "../" to specify css and images path into xsl and jsp due to security policy setting on the Http server (and I can't change this policy).
In the ear's application.xml is specified the context root of the module web with the name SABEARWeb
<?xml version="1.0" encoding="ISO-8859-1"?>
<application>
<display-name>SABEARWeb module</display-name>
<module>
<web>
          <web-uri>SABEARWeb.war</web-uri>
          <context-root>SABEARWeb</context-root>
     </web>
</module>
</application>
For example with this following code (Request.xsl), how can i replace the "../" notation to access xsl and image resouces without write the context root? How i can insert the images and css references into xsl and jsp files?
<xsl:import href="../Common/data.xsl" />
<img align="center" width="20" src="../images/ViewRisposte.gif" id="viewXslRisp" title="Visualizza Risposta">...</img>
Thanks a lot

>>As I understand I should change View1 by handling command of button “Edit”, and then View 2 should be displayed, then I change data and then View1 should be updated. How to do it?
For information about how to handle a command, please refer to my blog post:
http://blog.magnusmontin.net/2013/06/30/handling-events-in-an-mvvm-wpf-application/
You could bind the Command property of the edit button to an ICommand property of VMMain. When this command is executed you could then send a message using an event aggregator or some kind of messenger. Please refer to my blog post for more information about
how to for example use Prism's event aggregator class to pass events between view model classes:
http://blog.magnusmontin.net/2014/02/28/using-the-event-aggregator-pattern-to-communicate-between-view-models/
Andy has written an example of how to use MvvmLight's Messenger class:
http://social.technet.microsoft.com/wiki/contents/articles/26070.communicating-between-classes.aspx
The concepts are the same but you will have to download and reference either Prism:
https://www.nuget.org/packages/Prism/
...or MvvmLight: https://www.nuget.org/packages/MvvmLight/
You then subcribe to this event or message in the main view model and change the value of the CurrentPageViewModel property whenever you recieve an event. Note that the class must implement the INotifyPropertyChanged interface and raise its PropertyChanged
interface for this to work:
https://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
This is how you are supposed to communicate between different view model classes.
Hope that helps.
Please remember to close your threads by marking helpful as answer and then start a new thread if you have a new question.

Similar Messages

  • How to access another resource in Groupwise

    Could anyone tell me or direct me to a sample of some code, that shows how to access another resource in Groupwise with VB.
    The main goal is to send a appointmentsfrom another resource by accessing this resource that you have authority from own mailaccount
    or from an account I have access to.
    This so far I have come:
    Dim objApp
    Dim objAccount As Account
    Dim objDraftMsg
    objApp = CreateObject("NovellGroupWareSession")
    ' objAccount = objAccount.ObjType.egwResource
    objAccount = objApp.Login("", "") 'My own account but want to access either the account that owns the resource or from my own
    ' objAccount = objApp.objtype.egwresource("Schema")
    objDraftMsg = objAccount.WorkFolder.Messages.Add("GW.MESSAGE.APP OINTMENT")
    Dim date1 As New Date(2013, 5, 2, 8, 30, 0)
    objDraftMsg.StartDate = date1
    objDraftMsg.Duration = 1.5 / 24 ' duration
    objDraftMsg.OnCalendar = True
    objDraftMsg.Subject.PlainText = "Testar schema" ' Subject
    objDraftMsg.BodyText.PlainText = "Hlsar Giggi" ' Body
    objDraftMsg.Recipients.Add("XX")
    objDraftMsg.Send()
    Thank you un advance
    Giggi

    On 4/30/2013 1:26 PM, giggi wrote:
    >
    > Could anyone tell me or direct me to a sample of some code, that shows
    > how to access another resource in Groupwise with VB.
    >
    > The main goal is to send a appointmentsfrom another resource by
    > accessing this resource that you have authority from own mailaccount
    >
    I don't have time to write code but as I recall you have to PROXY into
    the account. There's a proxy method IIRC that returns an Account from
    which you can send mail if you were granted rights to do so.

  • How to access android resource in java native extension....??

    hi..
    i want access android resource..
    for example, res/menu/menu.xml, res/values/strings.xml ... etc...
    - R.java -
    /* AUTO-GENERATED FILE.  DO NOT MODIFY.
    * This class was automatically generated by the
    * aapt tool from the resource data it found.  It
    * should not be modified by hand.
    package com.flash.extension.nativelib;
    public final class R {
        public static final class attr {
        public static final class drawable {
            public static final int icon=0x7f020000;
            public static final int notification_icon=0x7f020001;
        public static final class layout {
            public static final int main=0x7f030000;
        public static final class string {
            public static final int extension_app_name=0x7f040001;    -> "hi extension"
            public static final int extension_hello=0x7f040000;
    so i used getResourceId("string.extension_app_name");
    but it's not work.. throw NotFoundException error..
    so i used context.getString(R.string.extension_app_name);
    it's work, but return incorrect value.. -> return value is "0.0.0".. it's versionName in actionScript Client Project..
    why can't access android resource in native extension?
    how to get android resource in java natvie extension..??
    Is there anyone who has a sample source??
    help.. me.. please..

    Hello,
    I am facing the same issue with the native extension i am using follwing code to get the resource id
             Intent inte = new Intent(context.getActivity().getApplicationContext(),SecondActivity.class);
              inte.putExtra("layout",context.getResourceId("layout.secondactivity"));
              context.getActivity().startActivity(inte);
    i am getting this exception "android.content.res.Resources$NotFoundException:layout.secondactivity"
    I have included activity in the native manifest file as well as flex's manifest file for android.
    please help me with this or an example will be great thanks.

  • How to access ejb jar in ear package from other war web package?

    How to access ejb in jar packed in ear package from other war web package?

    Typically you would just look the EJB Home up in JNDI. If you're
    looking for example code, the medrec example in WLS 8.1 or petstore has
    plenty of webapps calling EJBs.
    -- Rob
    CottonXu wrote:
    How to access ejb in jar packed in ear package from other war web package?

  • How to configure multiple virtual hosts for the same context root /

    Hi,
    I am using Glassfish V1 U1 - b14 on Solaris.
    I am trying to configure two applications to be mapped to the / root context, each one in its own virtual host.
    Two things I have noticed:
    1. I have to manually add virtual-hosts="hostId" in domain.xml/application-ref ... looks like just simply deploying the app does not do that although the application is set as default for its particular virtual host. Is this a bug?
    2. Although I have set for each virtual host the default web-app correctly, and they both respond fine, I cannot map both of them to the / context. The second application (chronologically deployed) does not respond when called with the / context ....
    Any ideas? Is this a bug again?
    Regards,
    Rares
    Message was edited by:
    raresp

    Wow, that's a shame. All mighty Application Server and two different apps on two different virtual hosts are considered ambiguous to have the same context root definition.... Fair play to Tomcat and 90% of the rest of servlet containers!
    In my case I have the same EAR we are planning to deploy to many (up to 30) virtual hosts. Faking different context roots for each deployment will bring unnecessary overheads...
    Should I file a bug or feature request?
    Thanks again for your answer, although you're basically saying it is not possible I will wait and look a while for a possible solution before bringing this topic to a conclusion.

  • How to access JDBC Resource registered in Sun Java System App Server ?

    I want to create a stand-alone JDBC application with Java SE using Swing technologies and JNDI technology. The purpose of using JNDI technology is to avoid change of Java Source Code every time I move the database to different location. This Java application will be used in a standalone PC installed with Windows XP Professional with no LAN / WAN connection. Of course, Internet connection is available with the PC.
    I use JavaDB to store the data tables and the location of the database is D:\E-DRIVE\SAPDEV. Tomorrow, if I move this database to C:\SAPDEV or any network drive, I do not want to change the Java Source code. I want to use JNDI which, if I am not wrong, helps developers to avoid manual change of Java source code whenever the database location is changed. Changes have to be made only in the JNDI Name which contains all relevant information about the database in order to get connection no matter where the database SAPDEV is stored; it can be placed under D:\E-DRIVE directory or C:\ directory of the hard disk. To implement my intention, I started developing Java application as per the steps mentioned below:
    Step 1:
    To proceed, first, I sought the help of Sun Java System Application Server Admin Console. I created JNDI object for Connection Pool using the menu path Common Tasks->Resources->JDBC->Connection Pools.
    JNDI Name : ABAPRPY
    Resource Type : javax.sql.DataSource
    Datasource class : org.apache.derby.jdbc.ClientDataSource
    Description : ABAP Program Repository
    The Connection Pool creation has options for General, Advanced and Additional Settings tabs and I made all the settings relevant to the database I created in D:\E-DRIVE\SAPDEV.
    To confirm whether the above settings are correct, I pressed the Ping push button which is available in the General tab of the connection pool creation screen. The system responded with the message Ping Succeeded.
    Step 2:
    I created a JDBC Resource using the menu path Common Tasks->Resources->JDBC->JDBC Resources.
    JNDI Name : jdbc/SAPDEV
    Pool Name : ABAPRPY
    Description : Database Connection for SAPDEV database
    Status : Enabled
    I can see all the above settings recorded in the domain.xml which is placed in the folder
    C:\Sun\AppServer\domains\domain1\config
    Step 3:
    I have made sure that Sun Java System Application Server is up and running in the background with JavaDB server. I created a Java Program making sure the following JAR files are included in the classpath:
    appserv-admin.jar
    appserv-ee.jar
    appserv-rt.jar
    javaee.jar
    fscontext.jar
    Plus, the lib directory of JDK 1.6 & C:\Sun\AppServer\domains\domain1\config
    Source code of the program is as follows: I used NetBeans IDE to create my project file.
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.naming.*;
    import javax.activation.DataSource;
    public class JNDILookup {
    public static void main(String[] args) {
    try {
    InitialContext initCtx = new InitialContext();
    DataSource ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/sapdev>");
    } catch (NamingException ex) {
    Logger.getLogger(JNDILookup.class.getName()).log(Level.SEVERE, null, ex);
    When I attempted to compile the above program in NetBeans IDE ,no compilation error reported. But while executing the program, I got the following run-time error message:
    SEVERE: null
    javax.naming.NameNotFoundException: No object bound for java:comp/env/jdbc/sapdev> [Root exception is java.lang.NullPointerException]
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:224)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:396)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at SAPConnect.JNDILookup.main(JNDILookup.java:21)
    Caused by: java.lang.NullPointerException
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
    ... 3 more
    Now, I want to come out of this situation; at the same time, I want to preserve the settings I have made in the Sun Java System Application Server Admin Console. That is, I want to programmatically access the data source using Connection Pool created in Sun Java System Application Server Admin Console.
    I request dear forum members to provide me an appropriate solution.
    Thanks and regards,
    K. Rangarajan.

    jay44 wrote:
    Bare in mind I am attempting the context.lookup() from inside the container (my code is in a session bean). I have accessed the server and have my bean "say hello" first to verify the bean works OK, then I call a method with this rather standard code:
    String jndiDataSourceName ="Second_EJB_Module_DataBase";
    Logger.getLogger(DynamicPU.class.getName()).log(Level.INFO,"Programatically acquiring JNDI DataDource: "+ jndiDataSourceName);
    InitialContext ctx;
    try {
    ctx = new InitialContext();
    ds =(DataSource)ctx.lookup("java:comp/env/jdbc/"+jndiDataSourceName);
    } catch (NamingException ex) {
    Logger.getLogger(DynamicPU.class.getName()).log(Level.SEVERE, null, ex);
    return "Exception generated trying to preform JDBC DataSource lookup. \n"+ex.toString();
    But when I run the code the server log shows the initial context is created Ok, but an exception is thrown becasue the resource name is not found:
    (and i have tried vriations of ctx.lookup("jdbc/"+jndiDataSourceName) etc etc
    You are fine here. It works in container because the InitialContext properties have been supplied already. That was the link I forwarded earlier. The InitialContext you create locally needs to locate the container JNDI. That is what the properties specify.
    Where I am confused is where you indicate the stack below is from the server log. So, you initiate a standalone (java main method) application, create an InitialContext, and you see the results in your app server log?
    LDR5010: All ejb(s) of [EJB_Module_1] loaded successfully!
    Programatically acquiring JNDI DataDource: Second_EJB_Module_DataBase
    The log message is null.
    javax.naming.NameNotFoundException: Second_EJB_Module_DataBase not found
    at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
    at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
    at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:192)...
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
    This is strange since I can see this resource (a JDBC connection named Second_EJB_Module_DataBase) is configured on the server from the server's admin console.
    That is why you can obtain a lookup from within the container (app server).
    For this lookup to work it may be that one must map the name inside an ejb-jar.xml deployed with the application, but I have also read some resources like jdbc connection should have a default name. Does anyone know if my lookup() should work without using an ejb-jar.xml mfile to explcitly map the reource for my application?
    Both EBJ's and data sources can be referenced via JNDI. It's a remote lookup (that is normally optimized if it is running in the same JVM). You should not have any dependencies on a JDBC data source being set-up on ejb-jar.xml. That file can of course impact your EJB's. However, data sources are normally set-up on a container-specific basis (e.g., you probably did it through a console, but there is a spec somewhere about how to set up a data source via a resource the app server looks for; it varies from app server to app server). However, once you have that container-specific data source set-up, JNDI operates vendor-neutral. You should be able to take the code above and move it to JBoss or Weblogic or Tomcat or whatever (this is an ideal, in practice, the vendors sometimes put a data source in a name you would not expect, but again, you can use their JMX console to see what the JNDI name is).
    (As I stated above if I have to use a deployment discriptor to get at this JNDI datasource, then solution is not "programmatic" as newly configured datasources could not be accessed without redeploying the entire application).
    As JSchell alluded to, you will always have at least something vendor-specific. JNDI itself (the code you wrote) is totally portable. However, you have to set the various JNDI environment properties to a given vendor's spec. Ideally, you should not need a vendor's actual InitialContext application, but it's a possibility. Once you can safely cast to Context, you should be vendor-neutral (if not, demand your money back).
    So that is exactly where I am stuck, trying to get the lookup to work and wondering if it should work without and xml file mapping the resource for my app.
    What we ended up doing for standalone was to provide our own JNDI. If you look at the open source project JOTM, there are examples on how to use that with XBean (if integrating with Spring, as we did), you can easily set up a data source that runs standalone exactly as you get in the container. Another benefit is you get full JTA/JTS support and the ability to run XA transactions. (This might all be alphabet soup, but the app server gives it to you, and this is the way we ended up doing the same: JNDI + JTA + JTS + XA). It ends up the same application code uses a "vanilla" InitialContext and all we have to do is write one or two xml files (one for our app server, a couple for JOTM), and our actual code works the same.
    I still think you have a shot at getting to the container's JNDI, just not using their full-blown app server JAR.
    I think there must be a simple way to do this with an ejb-jar.xml, I am no expert in JNDI, I could be missing something simple, I will keep at it and post an answer here if I come up with it.
    Thanks, jayIt is simple to code. Getting it to integrate with your app server, yes, that can be challenging. But it has nothing to do with EJB's. Write a simple test. Using nothing but DataSource and InitialContext. Let us know where you get stuck.
    - Saish

  • How to access images in my localmachine without deploying them

    Hi
    I am trying to access images in my localmachine from an ADF Application (11.1.2.4). If the source of the images is an url address it works fine. However, if they are in my local machine I don't know how to make it work. I don't want to deploy them with the application. I want them to be referenced like:
    file:///C:/images/bla/bla.jpg
    I might be failing is something really silly. Apologies in advance.
    Regards

    You can only address images inside your web root directly. The application can't just reference your file system.
    You can archive this using a servlet which you call via an url with parameters (e.g. the filename) and send the image from there (where you have access to the file system).
    Timo

  • How to access Application.Resources resource by it's name?

    <x:Array x:Name="NBresource" x:Key="nb" Type="{x:Type System:String}">
    <System:String>10</System:String>
    <System:String>15</System:String>
    <System:String>20</System:String>
    </x:Array>
    In my application.Resources I have got an Array. In the code behind MainWindow I am trying to access this array but I don't find any way in doing so using it's name only? 
    If I would have defined the resources in the MainWindow.xaml, I could easily access it using it's name only. 

    >>The Resources property of both the Application class and the Window class is of type ResourceDictionary and ResourceDictionary
    is a class that implements the IDictionary interface. This interface includes an [] operator that lets you access an element by its key and
    nothing else.
    If I would define it like this:
    <Window.Resources>
    <x:Array x:Name="NBresource" x:Key="nb" Type="{x:Type sys:String}">
    <sys:String>10</sys:String>
    <sys:String>15</sys:String>
    <sys:String>20</sys:String>
    </x:Array>
    </Window.Resources>
    Then it would have been possible to get the values like this:
    PipeSizeNTD_comb.ItemsSource = NBresource.Items;
    I was using it with its name, but now I want to move it from Window.Resources to Application.Resources so that it would be available to
    the whole application and it's not possible to use its name. 

  • How to add static resource file into the NetBean project

    I have several static data files(such as icons, images and etc.) need to be loaded by the program. How to add them into the NetBean project?
    Thanks

    Try a NetBeans forum. This is the Java Compiler forum.

  • How to access Administration console from OEM without providing any credent

    Hi Experts,
    I have installed OEM 12c Cloud Control and added one WebLogic domain as target. When I am monitoring that target I find links for Administration Console and Fusion middleware control on some target pages. When I click on that link it redirescts me to Administration console or Fusion middleware control. But there I have to provide credentials for log-in. Is is possible to configure OEM in a way that it directly open the Administration console and Fusion Middleware Control without asking the username and password?
    Please guide!!

    Hi Roshni,
    The links are provided for any administration tasks that you might want to do outside EMCC and to ensure you can easily navigate to the correct console given that most customers sometimes have hundreds of domains running. However, a single log-in across all domains monitored in EMCC are not included as part of that navigation as not everyone with access to the WLS monitoring capabilities on the WLS target home page in EMCC would automatically get access to the full administration rights provided in those consoles.
    -Glen

  • How to access static variable from a Thread class

    Kindly help me.......
    here's the code.....
    class Thread1 extends Thread
    int j=0;
    myClass2 mc = new myClass2();
         public void run()
              for( int a=0;a<6;a++)
                        {try
                             { Thread.sleep(5000);
                             catch(Exception e){System.out.println("Interrupted Exception");}
                             j++;
    mc.change1(i);
    } System.out.println("Thread1 executes "+j+" times");
    class Thread2 extends Thread
    int k=0;
         myClass2 mc1 = new myClass2();
         public void run()
              for( int a=0;a<6;a++)
                        {try
                             { Thread.sleep(5000);
                             catch(Exception e){System.out.println("Interrupted Exception");}
                             k++;
    mc1.change2(i);
    }System.out.println("Thread2 executes "+k+" times");
    class myClass2
    static int i=5;
    public synchronized void change1(int s)
    s=6;
    System.out.println("New value of i:"+s);
    public synchronized void change2(int s)
    s=7;
    System.out.println("New value of i:"+s);
         public static void main(String args[])
    Thread1 b1 = new Thread1();
    Thread2 b2 = new Thread2();
         b1.start();
    b2.start();
    I am unable to pass the variable i in my method call in Thread1: mc.change1(i); and similarly in Thread2:mc.change2(i);

    You can declare your i variable in myClass2 as public static and then simply call there
        mc.change1( myClass2.i ) ;

  • How to define JDNI resource to look up from ldap root

    Hi ,
    Can someone please help? I am stuck....
    In my application, I need to perform some modification which requires fully distinguished name. At the moment the jndi resource configurated using jndi-lookup-name="dc=actd,dc=admin,dc=misk,dc=com,dc=au" so the modification won't work because everything is started from "dc=actd,dc=admin,dc=misk,dc=com,dc=au".
    Is there a way, I can tell LdapContext to start from root, not from "dc=actd,dc=admin,dc=misk,dc=com,dc=au"? I don't think so but maybe I am wrong.
    On the other hand, how can I configurate the jndi resource so it lookup from root ?
    In my case, I am using SunOne application server to configurate external resource for the ldap. jndi-lookup-name is a compulsory field. I have tried to put "/" into it but doesn't work.
    <external-jndi-resource enabled="true" factory-class="com.sun.jndi.ldap.LdapCtxFactory" jndi-lookup-name="dc=actd,dc=admin,dc=misk,dc=com,dc=au" jndi-name="active_directory_misk" res-type="javax.naming*ldap.LdapContext">
    <description>connect to AD ldap port</description>
    <property name="java.naming.provider.url" value="ldap://129.94.154.22:389"/>
    <property name="java.naming.security.authentication" value="simple"/>
    <property name="java.naming.security.principal" value="Username"/>
    <property name="java.naming.security.credentials" value="password"/>
    </external-jndi-resource>
    Without using JNDI resource as following, it works. But I need to use the external jndi resource for the application. How do I configure the JNDI resource to do the same thing?
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "ldap://129.94.154.22:389/");
    env.put(Context.SECURITY_CREDENTIALS, "password");
    env.put(Context.SECURITY_PRINCIPAL, "username");
    LdapContext ldapCtx = new InitialLdapContext(env, null);
    Any ideas? Thank you very much in advance
    Tara

    Hi,
    If you remove the $ and braces (as shown below) it will work.
    <data-source-aliases>
    <aliases>
    <data-source-name>MYDS</data-source-name>
    <alias>BRANCH50DS</alias>
    </aliases>
    </data-source-aliases>
    Regards,
    S.Divakar

  • How to access the structure of a dynamically created context node/element

    Hi All,
    in method wddoinit I have added a context node and some attributes
    lo_node = wd_context->get_child_node( name = wd_this->wdctx_instructors ).
      lo_node_info = lo_node->get_node_info( ).
      lo_node_info = lo_node_info->add_new_child_node( name                  = 'OCCUPANCY'
                                                       is_mandatory          = abap_true
                                                       is_multiple           = abap_false
                                                       is_multiple_selection = abap_false ).
          lo_node_info->add_attribute( ls_attr ).
    So far, I have node INSTRUCTORS (0...n) with a subnode OCCUPANCY (1...1)
    In the supply_method of INSTRUCTORS I would like to fill the instructors node and the OCCUPANCY subnode.
    The thing is I do not know the structure of the dynamicaly created subnode OCCUPANCY there. How can I get a description of this node (that, what in non-dynamic programming would be wd_this->element_occupancy...)??
    THANKS,
    Johannes

    ...I got this one solved by myself...
    I simply added this coding:
    lo_node_info = lo_node->get_node_info( ).
      lt_attributes = lo_node_info->get_attribute_names( ).
    This appers to be enough information to be good to gogo
    Thanks anyway.

  • How to access a dynamic created attribute in a context node?

    <i>Hello,</i>
    <i>who could help? I can't set a value for a dynamically created attribute which is bind to a table.</i>
    <i>My context of the view looks as follow (is defined in NetWeaver):</i>
      - Context
         - Availability (Node)
             - vctxService (Attribute)
             - vctxServiceDesc (Attribute)
             - ... (further predefined attributes)
             - ... (some have to be set dynamically as follows)
    <i>Then I have added attributes dynamically in the wdDoModifyView(...) - method, as follows:</i>
    for (int i = 0; i < max; i++) {
       // some code to dynamically create table columns
       // adding attributes dynamically
       IWDAttributeInfo attrInfo =       wdContext.nodeAvailability().getNodeInfo().      addAttribute("vctxAvailability_" + i, "ddic:com.sap.dictionary.string");
       tv.bindText(attrInfo); // bind to TextView in table
    <i>In the method onPlugFrom... I tried to set the values for the attributes "vctxAvailability_ + i" as follows:</i>
    for (int i = 0; i < max; i++) {
       IAvailabilityElement newAvailNodeElement =     wdContext.createAvailabilityElement();
       // some values will be set for the
       // predefined attributes of AvailabilityNode
       // newAvailNodeElement.set...( value );
       // newAvailNodeElement.setVctxService( xy.getServ() );
       // now the values of dynamically created and added
       // attributes in AvailabilityNode will be added
       // THIS DOESN'T WORK
       newAvailNodeElement.setAttributeValue    ("vctxAvailability_" + i, "value" + i);
    <i>It would be great if someone could help me.
    Thanks in advance.
    Kind regards,
    Carsten</i>

    Carsten,
    Here is a sample code that creates context attributes dynamically and also sets values:
    //Creates a node
    IWDNodeInfo nodeInfo = wdContext.wdGetAPI().getRootNodeInfo().addChild("TestNode", null, true, true, false, true, false, true, null, null, null);
    //If you want to bind the node to a model node then the
    //second argument to the above method should be the
    //model class.
    //Creates an attribute under the node just created.
    IWDAttributeInfo testAttrib = wdContext.wdGetAPI().getRootNodeInfo().getChild("TestNode").addAttribute("testAttrib", "ddic:com.sap.dictionary.string");
    IWDNodeElement testNode = wdContext.getChildNode("TestNode", IWDNode.LEAD_SELECTION).getCurrentElement();
    IWDNode testNode2 = wdContext.getChildNode("TestNode", IWDNode.LEAD_SELECTION);
    //Now you can bind testNode with the Model Node
    //You can also set a value to the newly created attribute
    testNode.setAttributeValue("testAttrib", new String("Value"));
    Hope this helps.
    Shakeel

  • How do I unlock a disabled phone without erasing context

    Help,
    My son passed away and his iPhone 4S is disabled. I need to read the last messages he sent. I do not wAnt to restore factory settings. It is imperative to retrieve those messages the day he died. It will answer some questions we his parents have.

    I'm sorry to tell you, but you don't. If it's been disabled from entering an incorrect passcode too many times, there is no option other than to restore it or wipe it using find my iPhone.

Maybe you are looking for

  • PO Document type in ME59

    Hi... During conversion of PR to PO through ME59 , how will the system determine which Purchase order document type to be generated for PO, i.e suppose if i have two  PO document type Z1 & Z 2, and if i create a PO from PR through ME59 how will the s

  • How can I fix having to "save" before I can even open a PDF?

    I have Adobe Acrobat 9 Pro (9.5.5) and when a recent update came thru I am no longer able to simply click and view the PDF sent, but now am required to save it before viewing.  Is there any simple way to correct this back to the old way?  I don't wan

  • ARE1 link to Excise invoice

    Hi gurus, Can any one tell me how to get the ARE1 form number on the printout of output type ARE1 which can be excuted from VF03 as well J1IP. when i post the ARE1 document in j1ia101 i am getting the Form no. in SAP and its getting updated in the ta

  • Facing pages options missing in new Pages

    Am I missing something or is the facing pages options not available in new Pages app?

  • Too many photos on iphoto

    Should I create several libraries to manage a large amount of photos , or can i load all 10,000 photos without causing slowdowns .