Topic
  • 2 replies
  • Latest Post - ‏2013-01-31T17:30:27Z by CarlD
CarlD
CarlD
46 Posts

Pinned topic How do I retrieve schema for variable reference in coordinator

‏2013-01-31T15:22:21Z |
I'm writing a custom builder and one of my input fields uses a picker to generate a reference that looks like ${Variables/varDataInput}. I need to get my hands on the schema that defines the variable the user picks. I've scoured com.bowstreet.webapp.WebApp and associated classes but cannot find anything.

Help?

Thanks. Carl.


IBM Certified Solution Developer - WebSphere Portlet Factory 7.0
My blog http://dsixe-wpf.blogspot.com
Updated on 2013-01-31T17:30:27Z at 2013-01-31T17:30:27Z by CarlD
  • mburati
    mburati
    2568 Posts

    Re: How do I retrieve schema for variable reference in coordinator

    ‏2013-01-31T15:39:27Z  
    Carl,
    Typically you would use an indirect reference picker when you want to generate code that will resolve that indirect reference at runtime. Do you need to do that here? If not, maybe use a Variable picker instead so you get back a variable name?

    Once you have the variable name, you should be able to get the com.bowstreet.webapp.Variable object for that variable (via webAppAccess at runtime and via the WebApp at design and regen time). From the Variable you should be able to call getSchemaPath() to determine whether there's a schema/element path associated with that Variable (check for null in case they picked a variable with no schema path).

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • CarlD
    CarlD
    46 Posts

    Re: How do I retrieve schema for variable reference in coordinator

    ‏2013-01-31T17:30:27Z  
    • mburati
    • ‏2013-01-31T15:39:27Z
    Carl,
    Typically you would use an indirect reference picker when you want to generate code that will resolve that indirect reference at runtime. Do you need to do that here? If not, maybe use a Variable picker instead so you get back a variable name?

    Once you have the variable name, you should be able to get the com.bowstreet.webapp.Variable object for that variable (via webAppAccess at runtime and via the WebApp at design and regen time). From the Variable you should be able to call getSchemaPath() to determine whether there's a schema/element path associated with that Variable (check for null in case they picked a variable with no schema path).

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    That did it! For future reference, here's what I used:

    
    <Editor JavaClass=
    "com.bowstreet.widget.Reference" > <Argument name=
    "useCurlyBrace">false</Argument> </Editor>
    

    Thanks. Carl.


    IBM Certified Solution Developer - WebSphere Portlet Factory 7.0
    My blog http://dsixe-wpf.blogspot.com