Display hints, custom format method in VO, is there yet another way?

Did you experience the same and had a solution?
Hi,
I am using JDeveloper 10.1.3.4 and looking for yet another way of customizing the display of an attribute of a view object.
I have two tables: BILL and AWARDS, with composite foreign key relationship (on the LDAP_UID and TERM fields) between them, as illustrated below.
The BILL table:
NAME       LDAP_UID    TERM   CREDIT_HRS
Tom Smith  tom.simth   200902       12.5
Jane Lopez jane.lopez  200906        4.0
The AWARD table:
LDAP_UID    TERM  SOURCE     APPLIED
tom.smith  200902 Perkins     2000.00
tom.smith  200906 Direct      1300.00
jane.lopez 200906 CN           500.00 At the business data model level, this is master(Bill)/detail(Awards) relationship. Bill is dragged from the data control palette to the page and displayed as a form, and Awards is dragged to the page as a table. When tom.smith logs in and chooses the 200902 TERM, the master and detail are joined on tom.smith=tom.smith and 200902=200902, so the $2,000.00 of Perkins loan is retrieved for him:
Name Tom Smith
Term 200902
Source    Applied  
Perkins   $2,000.00That works fine but not user friendly: the values in the TERMS column are a bit cryptic and need to be displayed in plain English, i.e., 200902 should be displayed as "Spring 2009" and 200906 as "Summer 2009". The display hints in the VO can not handle this. The only other way I know is writing a method in the Row class of the VO to do the translation. And this is the result:
Name Tom Smith
Term Spring 2009
Source        Applied  
No rows yet   Obviously, "Spring 2009" is used not only for display, but also for joining the master and detail tables. Of course "Spring 2009"!=200902, therefore no detail is retrieved for the user.
Question is: is there yet another way to customize the display, that does not affect the join of master and detail tables?
Many thanks for your help!
Newman

Hi, Chris,
That works!
I found the chapter where transient attribute is explained and an example is given creating a transient attribute in the entity object. It turned out that transient attribute works both in entity object and view object. I did it in the VO and it solves my problem.
I spent hours of time before posting that question, trying two different ways but neither worked. Your one sentence saved me a lot of time. I do appreciate you help very much!
Truly,
Newman

Similar Messages

  • I can't seem to find the data tab in format inspector...is there any other way to format numbers as currencies?

    I can't seem to find the data tab in format inspector...is there any other way to format numbers as currencies?

    Hi Aakritie,
    What version of Numbers are you using?
    What operating system?
    Your profile shows  Macbook Pro  (that is OS X) and also iOS
    I am using Numbers 3.2 on a Mac book Pro under OS X 10.9.2
    Format Inspector shows this when a cell is selected:
    Then choose a Data Format:
    Then:
    Regards,
    Ian.

  • I want to display all errors in a listbox. Is there a simple way to do this, such as a vi that takes as input: error_in, error_out, listbox and then appends the error text to the listbox if the error_out is different than error_in?

    would like to display time of occurrence and error text, so possibly a table instead of a listbox

    You can check on the alliance page for a product that does this, but there are no LabVIEW utilities to do this specific task. You will have to build one yourself it seems.

  • Where to put my customized formatting that Control Hints does not provide?

    To whom that know or have experience with it:
    The control hints does not provide solutions for all possible formatting needs. For example, I need to display only last four digits of social security numbers (i.e., for "123-45-6789", display "***-**-6789"). Another data table column stores school semesters as YYYYMM, e.g., 200902, where 2009 is the year and 02 is the month that represents Spring (MM can also be 06 and 09 that represent Summer and Fall). I need to display the semester in a more user-friendly way (i.e., for "200902", display "Spring 2009"). Of course, I can not change data format in the table; I only seek to format the display of the data.
    I would think that it takes only a few lines of java code to do these formatting by splitting the string into sub-strings, replace some of them with appropriate new values, then re-assemble them. But where to put such code? Does any documentation cover this topic?
    Newman

    Shay,
    I read the document, tried it, and it worked out nicely.
    There is not the getAttributeName() method in the ViewObjectImpl class in version 10.1.3.4, which is the version I am using. But the EO class has it and it works out all the same.
    I don't know how long it would otherwise take me to read and fumble to find out where to put the custom formatting code. Your experience and familiarity with the technology really saved me a huge amount of time. Thank you so much for your help!
    Newman

  • Date not being displayed in the custom format

    Hi ,
      I have a problem wherein i am unable to change the format of the date.
    I need the date to be in the format 'January 10,2010.' however the date is being displayed as '1/10/10'. I have tried all options for the date formatting. I specified the custom format as 'MMMM D,YYYY' as mentioned in the SAP Library. I am trying to use the std custom options like YYYY-MM-DD, the date is not being dispalyed in the custom format provided by SAP either.
    I have binded date from the context, used the Current Date field provided by SAP.  Nothing works.
    Its not working on the new form. However the old forms have the same kind of formatting and are being displayed as desired.
    Please suggest as to what the issue could be.
    Thanks,
    Soumya.

    Hi All,
    Even I'm encountering the same issue. I'm trying to control the outputted date format programmatically.Please have a look.
    data: v_int_date like sy-datum,
            v_ext_date(10).
    v_int_date = '20110201'
    write v_int_date to v_ext_date MM/DD/YYYY.
    Here I've tried to convert the date to external format using a fixed format(MM/DD/YYYY). But still it's getting outputted in the format DD/MM/YYYY only as that's the way its defined in the User Master!
    Is there any solution for this? How can I 'override' defaults in the SAP User Master?
    Thanks,
    Mahesh

  • How to format date/time in display hints?

    To those of you who know it:
    One of the attributes in a VO is of Date type. To display of the date in the format of "10/25/2009 11:45 PM", I only managed to display "10/25/2009 11:45" with only the clue of the few examples provided in display hints when doing the formatting (the format mask I use is MM/dd/yyyy hh:mm). I would appreciate it if someone could advise how to display the AM/PM part of the format mask. Or better yet, point me to a source of reference for such formattnig.
    Thanks!
    Newman

    Newman,
    As suggested by Puthanampatti, you have to use 'a' in the date pattern to display AM/PM.
    You can find date and time patterns in [SimpleDateFormat API doc|http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html] which describes more about the letters to be used for each pattern which you can also use with attribute display hints in VO.
    Sireesha

  • How to make custom format mask?

    Hi all,
    i'm working in application using Hijri Dates ( ex : 01/01/1434 ) .
    the data stored in the following format (ex : 01011434 ) .
    to display data i made java method to make format then in viewRowImpl then pass the getAttributeInternal to the method
    public static  String formatHijriDate(String val)
    try
    return val.substring(6,8)+"/"+val.substring(4,6)+"/"+ val.substring(0,4);
    catch(Exception ex)
    return " ";
    is there is a way to make declarative custom format mask to easy my task to format the Hijri dates ?

    can you try to create a transient SQL attribute in the view object
    to_date(Hijri_Date_String, 'ddmmyyyy')

  • Custom formatting of JDK 5 (1.5) annotations

    Hi,
    I'd like to customise the way I format a JDK 5 annotation in the generated javadocs
    Lets say I have the following Class, with a custom annotation @Referencing:
    @Referencing("AW00189")
    public class FooBar {
       // body of class
    }Now, what I'd like to have in my javadoc is a link to some internal documentation with the anchor AW000189. So I'd have the following javadoc:
    public class FooBarextends java.lang.Object
    Since:
    29 Feb 2008
    Author:
    Joe Soap
    References:
    http://some.internal.url/path#AW000189
    How do I go about customizing the format of 1.5 Annotations?
    Thanks,
    Justin
    http://www.ewage.co.za
    Edited by: justinwalsh on Feb 28, 2008 9:49 PM

    Hi Justin,
    I think, there is no way to do such a customization with the standard Javadoc (i.e. powered by the Standard Doclet).
    After all, the job of the standard Javadoc is doing standard (general) things and I just cannot imagine any general rule (setting or option) that would embrace all kinds of possible customizations about displaying of annotations.
    So, the only way in your situation would be to modify the doclet itself. You can try tweaking the standard doclet: overload some its classes or change sources (according to the license they provide). However, I just can say, that way proved to have lots of limitations.
    Fortunately, I could suggest you a different rote that would allow you solving your problem in a few minutes. We have a product called "DocFlex/Javadoc":
    http://www.filigris.com/products/docflex_javadoc/
    This is a highly customizable Javadoc doclet. More exactly, this is a system for rapid development of professional quality doclets (with the support of both framed/single-file HTML and RTF output).
    With that tool, the generation of every sort of Javadoc output is programmed in special templates (using graphic Template Designer). The product is provided with the "standard template set" that generates the HTML Java API documentation very similar to the standard Javadoc.
    In fact, to solve you task, you will need to modify a subtemplate called "annotations.tpl". See on this page: http://www.filigris.com/products/docflex_javadoc/templates.php
    If you are interested about all this, we could help you to modify the necessary template absolutely free. Then, you will need only to buy a full product license to have everything work without limitations and that will be all!
    So, if you are interested, please let us know by sending a e-mail to the address found on this page:
    http://www.filigris.com/company/contact.php
    Regards,
    Leonid Rudy
    http://www.docflex.com

  • Custom formatting text?

    I some documents with custom formatting in them, for example if a sentence was:
    This should be {red}color.
    Then the world "color" should be red and the {red} should not appear.
    Now my current way of doing this it though a JTextPane.
    I do something like this (currently dont have the code with me so it may not be 100% accurate):
    // Get our temp
    String temp = this.getText ( );
    // Get our pos
    int pos = temp.indexOf ( "{red}" );
    // Set the first half
    this.setText ( temp.substring ( 0, pos ) );
    // Set the second half
    this.setText ( this.getText ( ) + temp.substring ( pos + 6, temp.length ( ) - pos - 6 );
    styledDocument.setCharacterAttributes(pos, this.getText ( ).length ( ) - pow, styledDocument.getStyle ("Red" ), false);Is their any better ways to do this?
    Can I automatically do like a
    styledDocument.addReplace ( "{red}", styledDocument.getStyle ("Red" ) ); So that it will automatically know what to replace? Thanks for any help!

    Can I automatically do like a styledDocument.addReplace ( "{red}",
    styledDocument.getStyle ("Red" ) ); So that it will automatically know what to replace? No idea what you are asking. You can write you own method to do that if you want. But the StyledDocument can't do that for you.

  • Can We Display a Tabular Format in the Decision Report?

    Hello,
    One of my current OPA integrations is replacing an Excel-based application that calculates entity values across rows and columns. In the OPA version, the rows are separated into screens, and the columns - the results - are displayed in a decision report that shows a single value per line, and is not vertically aligned. This makes the results much more difficult to view "at a glance" compared to the legacy solution. I'm wondering if there's any way to incorporate tabular formatting (mainly vertical alignment) within the decision report - does anyone know?
    Thanks!
    - Patrick

    With version 10.3 and the BI publisher integration you can design virtually any format for the decisions you wish. When using BI publisher, a completely customized decision report is quite easy. See the OPM help topic "BI Publisher code for Oracle Policy Modeling" and/or the example that ships with 10.3 for more info. If using the web service to make determinations, you could also post process the XML for the decision report (i.e. using XSLT or code) to produce a table in XML or HTML. Customizing the "default" decision report into a tabular view would probably prove more difficult than the other options.

  • How to delete a custom format in Numbers 3

    I am one of the poor unfortunates that has upgraded to Numbers 3 BIG mistake!!
    However does anyone know how to delete a custom format in Numbers 3?
    I'm not sure where the custom format came from in the erlier version of numbers. I guess I must have created it for something, I can't remember what.
    It now appaers that when I send a Numbers 3 document via email to an Excel format  it adds a weird custom format that turns currency into garbage. Once in Excel simply going to format cells and deleting this odd format cures the problem.
    If I could find a way of deleting it in Numbers 3, hopefully the problem will go away.
    This is far from the only problem I'm having with Numbers 3. It's begining to look like I'll have to abandon Numbers 3 having had to go to the expense of buying a new iPad because Numbers 3 documents (and presumably Pages Keynote etc) no longer work on the original iPad.

    I never promote the method the deletion unless you understand the underlying tables of planning, if you search on the forum you will see posts on the subject just like this one - Delete dimension from planning application
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to Display Values in Format [hh]:mm:ss in Xcelsius chart

    Hello,
    I have a Situation where i am Getting the Data Through Web Services into Xcelsius.
    And then based on a certain criteria i have to Vlookup the Data and Display the Data. But the Data is in the Format [hh]:mm:ss 
    Example:-  Avg Time - 30:45:12 Signifying [hh]:mm:ss
    Say I have Ten rows of Such Data from Avg Time 1. Avg Time 2... etc...and Corresponding Values
    I am Trying to Display these Values in Charts (Pie, Line) but i am Not able to Do so.  The Graph Shows Blank with No Data.
    Could Anybody Suggest me a way to do the Same.
    Do i have to Change it to any number or Custom Format ?
    Thanks For the Help
    Karthik

    Hi Karthick,
    Try giving the this option in the properties of pie chart.
    Go to apperance tab in pie chart propeties->select mouse over values ->in the number format selct TIME and selct the hh:mm:ss format.
    Hope this helps..
    Let me know if you have any queries.
    Cheers,
    Sudharam

  • Using WE to display a custom box

    I have a report that I want the user to be able to sort or filter by clicking on a col header. When the user clicks on a col header, I want a small box to appear just below the col header with radio buttons to choose Asc or Desc and a drop-down list to choose a value to filter the col on.  I worked out the javascript for this in a text editor and it works (and I thought it was pretty cool). I've converted the javascript to Crystal Reports syntax and created some Webelements functions:
    This first one sets up the styles and js functions -
    // WEsortfilter
    // Add options to sort A/D and to filter on columne clicked
    // Pass in string of values from main rpt and sort ASC
    // When col header is clicked - display form with radio buttons and drop
    //      down list of values.
    //When sort is selected or member of list execute sort/filter.
    Function ()         
    '<STYLE type="text/css">'
    + '.Test{border-style:solid;border-width:1px;border-color:navy;'
    + 'position:absolute; z-index:66; background-color:lightblue;width:6cm;'
    + 'height:.83cm;padding-left:10px;padding-top:5px;font-family:Verdana;font-size:9pt;}'
    + '.sortlink{font-size:10;font-family:Verdana;color:blue;}'
    + '</STYLE>'
    //End of styles
    //Javascript  to call sort/filter box
    + '<SCRIPT LANGUAGE="JavaScript">'
    + 'function displaySortFilter(myid){'
    + 'var topObj=document.getElementById(myid).offsetTop;'
    + 'var leftObj=document.getElementById(myid).offsetLeft;'
    + 'var cdObj=document.getElementById("Test").style;'
    + 'cdObj.display="";'
    + 'cdObj.left=leftObj;'
    + 'cdObj.top=topObj+26;'
    + '}</SCRIPT>'   //End of function
    + '<form name="sortfilter">'
    + '<div ID="Test" NAME="Test" class="Test"'
    + 'STYLE="display:none">'
    + '<div id="divradio" STYLE="position:absolute">
    + '<input type=radio name=radio ID=radio value="asc">'
    + '<Span>ASC</Span>'
    + '<input type=radio name=radio ID=radio value="desc">'
    + '<Span>DESC</Span>'
    + '<SELECT NAME="filteroptions" ID="filteroptions" >'
    + '<OPTION VALUE="0" selected>Choose One<BR>'
    + '<OPTION Value="00">First<BR>'
    + '</SELECT>'+ '</div></div></form>'
    The second function creates a link for the user to click:
    //WEcallSortFilter
    Function ()
    '<A Style="text-decoration:underline" ID="sbu" class="sortlink" href="" onClick="'
    + 'displaySortFilter(this.id);return false">SBU</A>'
    The third one adds the style and js functionality to the report:
    //Display sortfilter custom function
    WhilePrintingRecords;
    WEsortfilter
    The last one adds the link to the report for the user
    //Call sortfilter custom function
    WhilePrintingRecords;
    WEcallSortFilter
    When I run this in the report through Infoview, the box pops up, however,
    1)     it doesn't show up right under the link clicked, but in the location where it was placed in Crystal Reports design view. It shows up like a static object instead of at the location clicked.
    2)     When the box displays, it is transparent. The other text on the rpt shows right through the box. I've tried changing the z-index to no avail. And no, making the box a solid color doesn't make it opaque. The other text showing through makes it difficult to click on any of the radio buttons.
    All this is beyond the WE examples, but I''ve to kick it up  a level (or three) to get this project done.
    Thanks

    hey, ran some tests on your scenario. to answer your questions...
    1) all of the functions are designed so that you don't have to make copies of them...all controls should be aok with being on a report more than once, as long as the element names are different...the ones that create on-click functionality (such as the collapsible section) require a different name for each control or you'll run into problems...the last iteration of the control on the report will be the only one that (sort of) works.
    that being said, i created 2 formulae and ran your code without any issues with a duplicate of the function.
    the only things that should cause something like this is
    (a) a control name starting with a number or containing certain non alpha-numeric characters...they follow the same rules as javascript...unfortunately this little tip was not in the user guide even though it was on the list (my fault, sorry) or
    (b) two control names that are the same or
    (c) a duplicate of the same formula on the report.
    2) another little tip that seemed to not make it into the user guide is to follow the same ordering principles on a report that you would with normal layering when designing a crystal report...i.e. right-click on objects in the designer and choose Format, then use the Move object action to bring the objects to the front.
    note that if there is a select menu below these controls you will not be able to have the collapsible section (or any other control) cover that select menu up...this is a known issue in internet explorer and there is no workaround for that one.
    hope that this helps,
    jw

  • Display the Customer/Vendor Name in the General Ledger Report

    **I have Questions about General Ledger Report in SAP Business One. How can Display the Customer/Vendor Name in the General Ledger Report.**
    *Just would like to ask if its possible to display the Customer/Vendor Name in the General Ledger Report? The format simply have the Customer/Vendor Code on the said report. Is there a work around on this?*

    If ur selection creteria by g/l account,u can display customer/vendor name by including
    offset account from form settings.

  • Display the Customer/Vendor Name in the Check Register Report

    Just would like to ask if its possible to display the Customer/Vendor Name in the Check Register Report? The format simply have the Customer/Vendor Code on the said report.  Is there a work around on this?
    Thanks...

    Llowen,
    You may develop a Query like this
    SELECT T0.CheckNum, T0.PmntNum, T0.VendorCode, T0.VendorName,  T0.TaxDate, T0.CreateDate, T0.PrnConfrm, T0.CHECKSUM FROM OCHO T0
    WHERE T0.Canceled = 'N' AND (T0.CheckDate BETWEEN  '[[%0]]' AND '[[%1]]') OR (T0.CheckNum BETWEEN '[[%2]]' AND '[[%3]]')
    Suda

Maybe you are looking for