Use own AttributeDefImpl [revisited]

So, I did what Shailesh has recommended in:
Use own AttributeDefImpl? How?
And it works quiet well. One question is left. Well, two actually.
How can I determine whether an attribute of a ViewObject is actually based on an entity's attribute?
I understand that AttributeDef.getAttributeKind() can do that. I would have guessed that ATTR_ENTITY_DERIVED is the return value to look for. The Javadocs say: "An attribute derived from an Entity Object." But a little bit down the page one can read: "These attributes are View Object attributes derived from transient Entity Object attributes."
So what's correct? Or is ATTR_PERSISTENT what I am looking for? What return value of getAttributeKind() indicates unambigously that it is an entity's attribute, transient or not?
I also thought about overriding the methods findAttributeDef(), lookupAttributeDef(), getAttributeDef() and getAttributeDefs() in ViewObject. Would it be wise (and safe) to do that? I have second thoughts about that. Right now my wrapper (which is not a subclass of AttributeDefImpl) only works on entity level.
Regards,
Sascha Herrmann

Forget both questions. I tried overriding the methods in ViewObject and it seems to work perfectly. No need to determine whether the attribute definitions are entity or VO definitions.
So .... BC4J is extensible there.
Anyway thanks for your assistance.

Similar Messages

  • Use own AttributeDefImpl? How?

    We have to extend the AttributeDefImpl class (I guess).
    We would like an attribute not only to carry that one label. We need several other things, like a label when used in a worklist, when used on an input form, short tooltip, long tooltip .... . We would like to define those additional labels on entity level, so that they can be used consistently throughout the whole application. Currently one can define one label. If want to define additional labels, I guess, we would need a new AttributeDef class. These additional labels should reside within the normal entity's ....ImplMsgBundle.java file, to facilitate internationalization. This is rather important. So we cannot use the everyday properties. We don't want to give the XML files to our translators. We may be not too bright, but we're not that stupid.
    Now in the BC4J Javadocs one can read:
    <snip>
    Advanced users can provide their own implementation of EntityDefImpl (by subclassing EntityDefImpl). Within it, they can create their own AttributeDefImpls by using:
    new AttributeDefImpl(...);
    <snip>
    From what I've described above, is that what we need? If yes, could you give us a little push in the right direction? What steps are necessary to pull that off?
    Regards and thanks in advance!
    Sascha Herrmann
    GEMS

    expose this message bundle class to the client via an
    attribute propertyDon't understand that concept.
    But eventually we will need our own AttributeDefImpl and AttributeDef anyhow, since we want to add more metadata to the attribute. For example, we will need a flag indicating whether the value of the attribute should be displayed in upper case in certain cases. Just one of many examples.
    Having our programmers access this metadata by getProperty(IS_UPPERCASE) is not really an option. We want real methods, e.g. AttributeDef.isUpperCase(). This method can then access properties alright. No problem.
    With regard to labels, the goal is to override the approriate methods in the JClient files. For example in JUTableBinding:
    public String getColumnName(int attrIndex)
    return getAttributeDef(attrIndex).getUIHelper().getTableColumnLabel(null);
    Creating our own AttributeDef, AttributeHint interfaces and an AttributeDefImpl class is not a big deal. But I don't understand how I can make EntityDefImpl use our implementation when it instantiates the DefImpls. And I don't understand how from the entity's AttributeDefImpls the ViewAttributeDefImpls are created.
    I mean, the Javadocs tell that it can be done. But there's not enough information to actually do it, IMHO. Just a hint here, and a hint there.
    Sascha Herrmann

  • Using own font in j2me

    Hi,
    i am facing problem using own font( bangla font) in my j2me application. i dont know how can i install my own font in the mobile and use it in my application. if u have any idea then please help me.
    ======================== mamun

    The only way to do it is using some custom code to display fonts, since there is no way to install new fonts onto a device.

  • HOW TO USE OWN LOGO IN 'REUSE_ALV_COMMENTARY_WRITE'

    HELLO THERE ,
    CAN ANYBODY TELL ME HOW TO USE OWN LOGO IN 'REUSE_ALV_COMMENTARY_WRITE' ?
    I HAVE TRIED THROUGH THE TRANSCATION 'OAOR' AND 'OAER' , BUT I'M UNABLE TO DO IT. SO CAN ANYBODY PLZ TELL ME ANY OTHER WAY?
    REGARDS.

    Hello NEON BLUE,
    First step first upload u r log in the sap system using the below steps.
    1.  Goto the transaction OAER
    2.  Enter the class name as 'PICTURES'
    3.  Enter the class type as 'OT'
    4.  Enter the object key as the name of the logo you wish to give
    5.  Execute
    6.  Then in the new screen select Standard doc. types in bottom window
         Click on the Screen icon 
         Now, it will ask for the file path where you have to upload the logo
    7.  Now you can use this logo in REUSE_ALV_COMMENTARY_WRITE
    call the FM
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY       = Y_I_LISTHEADER[]
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =

  • How to Change S960 Lockscreen wallpaper using own image?

    Can anybody advise on how to change S960 lockscreen wallpaper using own image? I only manage to use the default or existing lockscreen wallpaper which appear in theme setting.

    Hi all, the solution is very simple.Simply save the pictures that you want to use as your lockscreen into storage/sdcard0/Download/pictures/lockscreenYour lockscreen picture should be in 16:9 or (1920 x 1080 pixels). To set the pictures as your lockscreen, go to theme setings, swipe to the right and tap the lockscreen wallpaper option that is on the right (red box).You'll see all the lenovo default lockscreen wallpapers, as well as the lockscreen pictures that you saved. Just tap the picture and set as lockscreen wallpaper.

  • How to maintain the Alert History by using OWN Tables

    Hi,
    In BAM defalut alert "History" table having limited number of columns.
    But i want to maintain more informations about alerts so is there any other way to maintain the by using OWN alert history Table.
    Thanks and Regards,
    kash

    No you cannot maintain your own history tble.
    The only columns available are the ones displayed in the alert history data object.
    Apart from this no other information will be available.
    Alternatively you can create another Data object and create a look up field pointing towards the alert history label based on a particular key.
    If the key matches then the data from the alert history DO will be pulled into this DO.
    To this DO you can add your own columns and populate them with your own data.

  • Create document to change colour of certain graphics using own colour palette

    I want to create a flash document that allows me to change the colous of an image using a colour palette of my own. I am a complete beginner and have no idea where to start this, hence i would need to know what to do and how to do it.
    I basically want the image to be a simple 2d image that i will create using different layers in photoshop and import them into flash, the layer images will all be one colour so the colour of the whole layer changes.
    so the colour palette will be on the side of this and when i click on an image and then a colour the image changes to the colour i clicked.
    I know how i have explained this is a bit hard to understanbd but any help is greatly appreciated.
    Thank You

    the document is not for me to use but for me to give to a large group of peopleand they will themselves select their own colours, i want to be able to intergrate my own colour palette into it which will have hundereds of colours....very similar to a room planner kind of thing, where you select a colour and the object you selected changes to that colour, but i need it for somthing else.

  • BUG? using own EntityResolver with SAX doesn't work

    Hello,
    I was experimenting with the oracle.xml.parser.XMLParser using
    the SAX interface.
    I've written a test program that instantiates a driver and
    registers my own handlers (which just print to System.out).
    I also have my own org.xml.sax.EntityResolver, it looks like
    this:
    public class SAXEntityResolver implements EntityResolver {
    public InputSource resolveEntity(String publicId,
    String systemId) throws SAXException, IOException {
    System.out.println("<<Call to resolveEntity>>");
    try { //assume it's a URL of some sort
    URL url=new URL(systemId);
    return new InputSource(url.openStream());
    catch (MalformedURLException e1) {
    try { //it's not a URL, assume a file spec
    FileInputStream fin=new FileInputStream(systemId);
    return new InputSource(fin);
    catch (FileNotFoundException e2) {
    return null;
    //don't understand it, let the parser handle it.
    when I parse the following xml file:
    <?xml version="1.0"?>
    <!DOCTYPE dinner SYSTEM "dinner.dtd">
    <dinner>
    <location planet="Earth">Alma 3</location>
    <time>12:30</time>
    <date>Vandaag</date>
    </dinner>
    The parser generates an error to my org.xml.sax.ErrorHandler
    which prints it to the screen. The output looks like this:
    [C:\temp\xml]java -cp c:\TEMP\xml\oracle\lib\xmlparser.jar;.
    SAXParseXML oracle.xml.parser.XMLParser dinner.xml
    Locater accepted: oracle.xml.parser.SAXLocator@6ba51a96
    document parsing start
    [error: Couldn't find external DTD 'dinner.dtd']
    element dinner start: null:4:1
    (other output follows with no more errors)
    It seems as if the Oracle XMLParser doesn't use my EntityResolver
    to resolve it's external entities (the dinner.dtd file in this
    case, the file is indeed there, trust me!), otherwise it would
    have printed the message seen in the code above (<<Call to
    resolveEntity>>). If you're wondering how I configured the
    systemId in the SAX parser, here's how:
    File f=new File(args[1]);
    InputSource src=new InputSource(new FileInputStream(f));
    src.setSystemId(f.toURL().toString());
    p.parse(src);
    Can you tell me why this is? (I use NT4 with jdk 1.2)
    I've tested the same thing with the IBM, Microstar and Sun
    parsers, and they all seem to work fine with this example...
    Hope to hear from you! (cc in with mail please)
    Erwin.
    null

    Thanks for the post. You have identified a bug which will be
    fixed in a maintenance release. Until that time you can parse a
    String type rather than a InputSource type in SAXParseXML.java as
    a workaround.
    Oracle XML Team
    http://technet.oracle.com
    Erwin Vervaet (guest) wrote:
    : Oracle XML Team wrote:
    : : Which version of the parser are you using? If not 1.0.0.3
    (the
    : : latest) try that version. If the problem still exists it
    would
    : : help if you could provide your test program.
    : The readme.html in the xmlparser_v1_0_0_3.zip file (I download
    it
    : on monday 8/2/1999) says: 'Oracle XML Parser 1.0.0.3.0'.
    : So that's not the problem, below are all the files of the test
    : program. The command I use to start the program is the
    following
    : (note that there cannot be a classpath clash problem!, I use
    Sun
    : jdk1.2 on NT4 SP4):
    : [C:\temp\xml]dir
    : Volume in drive C is unlabeled Serial number is 2C90:8BDE
    : Directory of C:\temp\xml\*
    : 11/02/99 10:50 <DIR> .
    : 11/02/99 10:50 <DIR> ..
    : 9/02/99 16:34 <DIR> aelfred
    : 9/02/99 21:56 <DIR> oracle
    : 8/02/99 17:44 <DIR> xml-ea2
    : 8/02/99 14:10 <DIR> xml4j
    : 9/02/99 22:44 <DIR> xp
    : 9/02/99 16:42 215 dinner.dtd
    : 9/02/99 23:03 167 dinner.xml
    : 8/02/99 15:23 438 ParseXml.java
    : 11/02/99 10:50 2.402 SAXDocHandler.class
    : 9/02/99 21:14 1.585 SAXDocHandler.java
    : 11/02/99 10:50 1.129 SAXEntityResolver.class
    : 9/02/99 22:04 737 SAXEntityResolver.java
    : 11/02/99 10:50 976 SAXErrHandler.class
    : 9/02/99 15:39 495 SAXErrHandler.java
    : 11/02/99 10:50 1.261 SAXParseXML.class
    : 9/02/99 22:09 629 SAXParseXML.java
    : 10.034 bytes in 11 files and 7 dirs 12.800 bytes
    : allocated
    : 201.152.512 bytes free
    : [C:\temp\xml]java -cp c:\temp\xml\oracle\lib\xmlparser.jar;.
    : SAXParseXML oracle.xml.parser.XMLParser dinner.xml
    : Here are the files:
    : //file SAXErrHandler.java
    : import org.xml.sax.*;
    : public class SAXErrHandler implements ErrorHandler {
    : public void warning(SAXParseException exception) throws
    : SAXException {
    : System.err.println("[warning: " + exception +
    : public void error(SAXParseException exception) throws
    : SAXException {
    : System.err.println("[error: " + exception + "]");
    : public void fatalError(SAXParseException exception)
    : throws SAXException {
    : System.err.println("[fatal error: " + exception + "]");
    : //file SAXEntityResolver.java
    : import org.xml.sax.*;
    : import java.net.*;
    : import java.io.*;
    : public class SAXEntityResolver implements EntityResolver {
    : public InputSource resolveEntity(String publicId, String
    : systemId) throws SAXException, IOException {
    : System.out.println("<<Call to resolveEntity>> " + publicId + "
    : + systemId);
    : try { //assume it's a URL of some sort
    : URL url=new URL(systemId);
    : return new InputSource(url.openStream());
    : catch (MalformedURLException e1) {
    : try { //it's not a URL, assume a file
    : spec
    : FileInputStream fin=new
    : FileInputStream(systemId);
    : return new InputSource(fin);
    : catch (FileNotFoundException e2) {
    : return null; //don't understand
    : it, let the parser handle it.
    : //file SAXDocHandler.java
    : import org.xml.sax.*;
    : public class SAXDocHandler implements DocumentHandler {
    : private Locator locator=null;
    : public void startDocument() throws SAXException {
    : System.out.println("document parsing start");
    : public void setDocumentLocator(Locator locator) {
    : System.out.println("Locater accepted: " + locator);
    : this.locator=locator;
    : public void startElement(String name, AttributeList atts)
    : throws SAXException {
    : System.out.println("element " + name + " start: "
    : + locate());
    : for (int i = 0; i < atts.getLength(); i++)
    : System.out.println("attribute " +
    : atts.getName(i) + "=" + atts.getValue(i) + " (" +
    atts.getType(i)
    : + ")");
    : public void characters(char[] ch, int start, int length)
    : throws SAXException {
    : System.out.println("char data: " + new
    : String(ch,start,length));
    : public void ignorableWhitespace(char[] ch, int start, int
    : length) throws SAXException {
    : System.out.println("ignoring some whitespace: " +
    : new String(ch,start,length));
    : public void endElement(String name) throws SAXException {
    : System.out.println("element " + name + " end: " +
    locate());
    : public void processingInstruction(String target, String
    : data) throws SAXException {
    : System.out.println("PI: " + target + "=" + data);
    : public void endDocument() throws SAXException {
    : System.out.println("document parsing end");
    : private String locate() {
    : if (locator!=null) {
    : return locator.getSystemId() + ":" +
    : locator.getLineNumber() + ":" + locator.getColumnNumber();
    : return "";
    : //file SAXParseXML.java
    : import org.xml.sax.*;
    : import org.xml.sax.helpers.ParserFactory;
    : import java.io.*;
    : public class SAXParseXML {
    : public static void main(String[] args) {
    : if (args.length>1) {
    : try {
    : Parser
    : p=ParserFactory.makeParser(args[0]);
    : p.setDocumentHandler(new
    : SAXDocHandler());
    : p.setErrorHandler(new
    : SAXErrHandler());
    : p.setEntityResolver(new
    : SAXEntityResolver());
    : File f=new File(args[1]);
    : InputSource src=new
    : InputSource(new FileInputStream(f));
    : src.setSystemId(f.toURL().toString());
    : p.parse(src);
    : catch (Exception e) {
    : e.printStackTrace();
    : //file dinner.xml
    : <?xml version="1.0"?>
    : <!DOCTYPE dinner SYSTEM "dinner.dtd">
    : <dinner>
    : <location planet="Earth">Alma 3</location>
    : <time>12:30</time>
    : <date>Vandaag</date>
    : </dinner>
    : //file dinner.dtd
    : <?xml version="1.0" encoding="UTF-8"?>
    : <!ELEMENT dinner (location, time, date?)>
    : <!ELEMENT location (#PCDATA)>
    : <!ELEMENT time (#PCDATA)>
    : <!ELEMENT date (#PCDATA)>
    : <!ATTLIST location country CDATA "Belgium">
    Oracle Technology Network
    null

  • Using own SQLite DB in combination with Data Management

    Hi,
    Currently on a huge project we're we are using LCDS 3.1 in combination with a AIR 2.5 client.
    I've been reading "Using Adobe LiveCycle Data Services ES2 version 3.1" and I have a question. In the chapter "Building an offline-enabled application" it says on the very first line:
    "You can use an offline adapter with an AIR SQLite database to perform offline fills when a desktop client is disconnected from the LiveCycle Data Services server. An offline adapter contains the SQL queries for AIR SQLite for retrieving cached items like an assembler on the server retrieves items from the data source."
    However, in my experience that AIR SQLite database is not just any DB but one that Datamanagment designs and generates itself, based on the Dto the DataManagement destination is managing. The offline adapter doesn't work like an assembler at all, because the documentation says you can only override the methods pertaining to constructing the WHERE, and ORDER BY parts of the queries, not the SELECT, CREATE, FROM,... parts.
    In our case, we have a database on the server, constructed according to a very specific ERD, and we have a SQLite database on the client, also constructed according to a very specific ERD. What we want to do is execute every fill, create, update, delete against the offline cache and only synchronize with the backend when we want it the synchronize (technically possible by playing with the autoMerge, autoSaveCache, autoConnect,... properties). So what part of datamanagement can we customize to use our DB instead of a generated one?
    Thx in advance!

    You are correct in noting that Data Management does not allow you to use your own database to store offline data.  This data is exclusively managed by the LCDS library for the developer.  The intent is that the local cache is a reflection of the server data, not an independent copy.
    If you have an existing database in AIR, then you will have much more direct control over the querying and updating of that data by using the SQLite APIs directly.
    That being said, you can in essence replicate the data stored on the server, managed by Data Management, in the offline cache.  In an upcoming release (winter 2011) we will have a few features ('briefcases' and a 'changes-only' fill) that will make this story even more compelling for your use cases.  But even with the 3.1 functionality, you can do something like the following:
    Perform a fill() to collect the data you want to have available on the client, save this in the offline cache
    Construct an Offline Adapter Actionscript class that implements the fills you want to perform on the local data
    Use the DataService.localFill() API to perform all of the client application fills, turn off autoCommit.
    When the client is online, call commit() to store client changes and call fill() to refresh the cached data.
    This should give you some ideas on how you could go about constructing your app to leverage the offline features of Data Services.
    Tom

  • Using own domain name on Business Catalyst / Muse

    I have a 'complete plan' subscription to CC and I believe 5 free sites with Business Catalyst.
    From checking this forum and FAQ it appears I should be able to link a domain name I currently own to a BC site so my URL drops the businesscatalyst.com element of the name. I have changed teh NS to ns1.worldsecuresystems.com  (and ns2 / ns3) and the next stage is to go to Site Settings and enter the doman name.
    My problem is where do I find the menu Site Settings as I can not see it within Muse?
    Peter H

    Hi Peter
    The settings to add the domain is not with Muse but in Business Catalyst domain settings.
    You would need to publish the site first to Business Catalyst and then make the site live.
    After performing the steps you can add the domain.
    More Details :
    http://forums.adobe.com/thread/1401662?tstart=0
    http://helpx.adobe.com/business-catalyst/using/change-site-domain.html
    Thanks,
    Sanjit

  • How to use own created STYLE at SMART FORM

    Hi all,
    i am making a smart forms in which i want to use my own created STYLE even tough i already copied my style from the existing one and activate it it but when i m going to use it at SMART FROM,it give me  SMART FROM default style.i can't understand what is the issue and why it is not showing in smart form even i have already activate it.
    Thanks & Regards,
    sappk25

    Thanks every body,i have resolved it by my own self.
    Thanks & Regards,
    sappk25

  • How to use own or other creditcard in Family Share?

    Hello together,
    i'm using the Family Sharing functionality(for example my dad set up the Family Share), great ideal. But now i want to buy an App on my own and do not want to use the Family-Creditcard but my own creditcard (sometimes i want to pay on my own).
    Each time i buy an App in the AppStore the Money is taken from the creditcard which is registered for Family Sharing.
    is there a way to decide which creditcard Shall be used for buying an App?
    if yes, were i have to change which creditcard shall be used?
    Or is there no function to decide and only the "Family" creditcard of my father  is used?
    please help,
    thankx

    you can't directly store a tree in a list.Ummm... Just to be contrary... Yes you CAN store a tree in a table.... In fact that's how the windows file system works.
    Having said that... you would be well advised to investigate tree data-structures before resorting to flattening a tree into a list.
    So... Do you have a specific requirement to produce a List? Your umming-and-erring about Vector vs ArrayList makes it sound like you're still at the stage of choosing a datastructure.
    Cheers. Keith.

  • Problem when using own domain name

    Hi,
    I recently updated my site and gave it a fresher look. I have my own damian name and use iweb and mobileme to host it. the site works fine but the one problem i have is that no matter what page I view of my site it always says my web address in the address bar. For example my site is thecarpetfitter.co.uk. It this site I have 7 pages plus some pages of photos. Now when i'm viewing my about me page the address bar still only says the main site address not thecarpetfitter.co.uk/about me. It does this for all my pages. It's a problem because nobody can bookmark an the actual page they want only the first pages that loads up (welcome page). How can I change this?
    cheers

    It sounds like you're using Forwarding rather than CNAME to link to MobileMe. See this article for the difference in the browser address bar:
    http://iwebfaq.org/site/iWeb_Domains.html
    Also this Apple doc for setting up CNAME:
    iWeb ’08: Using your own domain name

  • Problem with "Run Web Layout" using own template

    When I run a report (using Run Web Layout) which uses my own template (a modified version of rwblue.tdf), it outputs a plain page on the browser (as though it has no template).
    When running the same report (using Run Paper Layout), the output is as it should be.
    Can anyone help? Thank you in anticipation.

    Hi John
    Take a look at Reports product site on otn site. It has an example on how to create a web template for Reports Web View. In addtion to tdf file, for web layout, you need to have a .css file as well as a html code template.
    Hope this will help.
    Thanks
    Rohit

  • New bt infinity with HH5. How to use own router?

    Hi guys,
    I have just this morning had my infinity 2 installed. Went with BT as I had read it's very easy to use your own router.
    My engineer has just left. I was expecting an openreach modem, but didn't realise HH5 had the modem built in. No problem, must be very similar to my old virgin superhub, combo device. I'll putt he home hub into modem only mode right?
    Nope, can't see such an option. Is there anyway I can get around this? Will be a deal breaker for me!
    Thanks

    At worst you can buy a HG612 from "a well known auction site"
    If you found this post helpful, please click on the star on the left
    If not, I'll try again

Maybe you are looking for

  • WHERE Clause issue

    Hi, I have run the following command successfully without the WHERE clause on the last line.  However, when I try to use a parameter, it fails.  Is there anything wrong with it? CREATE TABLE #DateList Dates DateTime NOT NULL PRIMARY KEY DECLARE locDa

  • OIF 11.1.1.4.0 Signing Certificate Question

    How does the old/new model for Wallets (Security and Trust) used for Signature and Encryption works? We are trying to roll out two signing certificates at the same time. This will allow our customer to update their IdPs (the ones that decided to veri

  • Upgrade oracle 10gR2(10.2.0.1) xe to oracle 10gR2(10.2.0.3) in Linux 4

    Hello everyone, I am using Patchset "p5337014 10203 LINUX.ZIP" to upgrade the oracle 10gR2(10.2.0.1)express edition into oracle10gR2(10.2.0.3).In Installation i got the followoing error: OUI-10091: There are no patches that neeed to be applied from t

  • Customizing reports in ARD3

    Well, I trying to gather user history from our ARD that includes the users' long name and other short name. For example, if user ssleestak logs into and works on eMac 1 I need to generate a user report that includes ssleestak's long name (S. Sleestak

  • Purpose of Contribute

    Hi everyone, I have to create a content management system for a small website I'm creating for a client. I was planning on using xml and php to create it but then I wondered about the possibility of my clients using contribute to update the site. I'v