Advise needed on writing reusable components/customizations

My application requires heavy styling of the DataGrid
control. Some of it is plain for the looks of things and the others
are for data visualization.
Many, if not all of the styling customizations will be
interesting for reuse in other projects as well, so that I am
attempting to create them as generic components in a library.
Now, on one hand I would like each customization be its own
component (be it an extended class in ActionScript or an MXML
component) so that I can pick and chose them as needed for other
projects. But then how do I combine a couple of styles for a
DataGrid if each one of them is an extension of the DataGrid class?
For example, I would have Style1DataGrid.as,
Style2DataGrid.as, and Style3DataGrid.as and would like to use
"styles" 1 and 3 for my applicationA and "styles" 2 and 3 for my
applicationB.
How should I go about this kind of reuse? What
method/approach do you use for such a scenario?
Thanks

There are a few stept involved.
1 To be able to pass a comma delimited list of items you are interested in, you need to change the lovPopup.jsp to take an extra parameter, e.g. <bean:parameter id="lovDescriptorAttributeNames" name="lovDescriptorAttributes" value=""/>
2 Modify the JavaScript function jspLovPopup to take this as a (string) parameter. In this function you use this string to find the items in the calling form and put pointers to these items in a global variable.
3 Change the lovSearchResults.jsp page to take a comma delimited list of values as a parameter.
4 Modify the JavaScript function chooseLovValue to take this as a (string) parameter. In this function you copy these values to the items in the global variable with pointers.
Jan Kettenis
JHeadstart Team

Similar Messages

  • Help needed for writing query

    help needed for writing query
    i have the following tables(with data) as mentioned below
    FK*-foregin key (SUBJECTS)
    FK**-foregin key (COMBINATION)
    1)SUBJECTS(table name)     
    SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
    2           02           Computer Science
    3           03           Physics
    4           04           Chemistry
    5           05           Mathematics
    7           07           Commerce
    8           08           Computer Applications
    9           09           Biology
    2)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
    383           S1      9           4           2           3
    384           S2      4           2           5           3
    ---------I actually designed the ABOVE table also like this
    3) a)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
    383           S1
    384           S2
    b)COMBINATION_DET
    COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
    1               383          9
    2               383          4
    3               383          2
    4               383          3
    5               384          4
    6               384          2          
    7               384          5
    8               384          3
    Business rule: a combination consists of a maximum of 4 subjects (must contain)
    and the user is less relevant to a COMB_NAME(name of combinations) but user need
    the subjects contained in combinations
    i need the following output
    COMB_ID COMB_NAME SUBJECT1 SUBJECT2      SUBJECT3      SUBJECT4
    383     S1     Biology Chemistry      Computer Science Physics
    384     S2     Chemistry Computer Science Mathematics Physics
    or even this is enough(what i actually needed)
    COMB_ID     subjects
    383           Biology,Chemistry,Computer Science,Physics
    384           Chemistry,Computer Science,Mathematics,Physics
    you can use any of the COMBINATION table(either (2) or (3))
    and i want to know
    1)which design is good in this case
    (i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
    good method to link with same table but if 4 subjects only(and must) comes
    detail table is not neccessary )
    now i am achieving the result by program-coding in C# after getting the rows from oracle
    i am using oracle 9i (also ODP.NET)
    i want to know how can i get the result in the stored procedure itsef.
    2)how it could be designed in any other way.
    any help/suggestion is welcome
    thanks for your time --Pradeesh

    Well I forgot the table-alias, here now with:
    SELECT C.COMB_ID
    , C.COMB_NAME
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
    FROM COMBINATION C;
    As you need exactly 4 subjects, the columns-solution is just fine I would say.

  • Need help writing host program using LabView.

    Need help writing host program using LabView.
    Hello,
    I'm designing a HID device, and I want to write a host program using National Instrument's LabView. NI doesn't have any software support for USB, so I'm trying to write a few C dll files and link them to Call Library Functions. NI has some documentation on how to do this, but it's not exactly easy reading.
    I've written a few C console programs (running Win 2K) using the PC host software example for a HID device from John Hyde's book "USB by design", and they run ok. From Hyde's example program, I've written a few functions that use a few API functions each. This makes the main program more streamlined. The functions are; GetHIDPath, OpenHID, GetHIDInfo, Writ
    eHID, ReadHIC, and CloseHID. As I mentioned, my main program runs well with these functions.
    My strategy is to make dll files from these functions and load them into LabView Call Library Functions. However, I'm having a number of subtle problems in trying to do this. The big problem I'm having now are build errors when I try to build to a dll.
    I'm writing this post for a few reasons. First, I'm wondering if there are any LabView programmers who have already written USB HID host programs, and if they could give me some advice. Or, I would be grateful if a LabView or Visual C programmer could help me work out the programming problems that I'm having with my current program. If I get this LabView program working I would be happy to share it. I'm also wondering if there might already be any USB IHD LabView that I could download.
    Any help would be appreciated.
    Regards, George
    George Dorian
    Sutter Instruments
    51 Digital DR.
    Novato, CA 94949
    USA
    [email protected]
    m
    (415) 883-0128
    FAX (415) 883-0572

    George may not answer you.  He hasn't been online here for almost eight years.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • Reusable components

    Hi Experts,
    Can anybody provide me some material on Reusable components in SAP/ABAP HR to have better understanding of the concept.
    Gd points will be awarded for the well wishers of mine.
    Regards,
    Rahul

    Hi Anand,
    I would say, that you are not able to open a new window or trigger a navigation
    from the component controller thru a call from anaother component.
    So the descision whether to show the view or to send directly must be done by the
    using component.
    The EMAIL component provides the view which you can embedd in the using component in a new window or just a simple view (ViewContainerUIElement).
    The using component then decides whether it should call the method directly, or navigates to the view which contains the interface view of the EMAIL component.
    Hope this helps,
    Sascha
    Message was edited by:
            Sascha Dingeldey

  • I need help in understanding the customization of Landscape in R/3.

    I need help in understanding the customization of Landscape in R/3. Setup of SAP Landscape from an SAP SD point of view. Being as SAP SD consultant what would be my role in customizing the Landscape server. Help needed. Thx

    Hi,
    In a standard SAP project implementation, the 3 standard transport procedures are:
    Development System (DEV) --> QA System (QAS) --> Production System (PRD)
    In the above structure, the Training Client (TRN) could be made from the copy of PRD (after when real-time master data has been available) or from QA system (where configuration has been tested in DEV client, and the master data is uploaded manually for training purposes)
    Sandbox (standalone): This can be refreshed with Golden Client to reflect the latest configuration performed to facilitate the development/testing purposes.
    -Development (DEV): Where all system configurations and development activities are carried out.
    -Quality Assurance (QAS): Where functional testing is carried out. The System Integration Testing (carried out by the -Development Team) and the User Acceptance Testing (carried out by XXX appointed personnel) is carried out in this server.
    -Training (TRN): End Users are trained on this server.
    -Production (PRD): After the System is commissioned all data entry and administrative functions will be carried out in this server.
    This is by far the standard landscape architecture that is adopted and practiced in most implementations.
    Hope the above helps.
    Thanks.

  • Error: "Variable State has been used outside the reusable components"

    When I open a query in the ad hoc query designer I get several error messages like "Variable State has been used outside the reusable components."  I don't what this means or how to fix it.
    "State" is one of the variables used.  And there is a error for every variable that is used.
    All the variables are in the free characteristics.
    When I open the query in Query Designer, it is ok.
    Any ideas?

    Hi Fong,
    PLease check the following link:
    http://help.sap.com/saphelp_nw04/helpdata/en/1f/03223c5f00612be10000000a11402f/content.htm
    It states that:
    You cannot integrate variables into the query directly.
    However, you can use variables in reusable structures, or restricted or calculate key figures, which are used in the Ad-hoc Query Designer
    Hope this helps...

  • I need help writing a script that finds the first instance of a paragraph style and then changes it

    I need help writing a script that finds the first instance of a paragraph style and then changes it to another paragraph style.  I don't necessarily need someone to write the whole thing, by biggest problem is figuring how to find just the first instance of the paragraph style.  Any help would be greatly appreciated, thanks!

    Hi,
    Do you mean first instance of the paragraph style
    - in a chosen story;
    - on some chosen page in every text frames, looking from its top to the bottom;
    - in a entire document, looking from its beginning to the end, including hidden layers, master pages, footnotes etc...?
    If story...
    You could set app.findTextPreferences.appliedParagraphStyle to your "Style".
    Story.findText() gives an array of matches. 1st array's element is a 1st occurence.
    so:
    Story.findText()[0].appliedParagraphStyle = Style_1;
    //==> this will change a paraStyle of 1st occurence of story to "Style_1".
    If other cases...
    You would need to be more accurate.
    rgds

  • Need help writing small program!

    Hi. I'm learning Java programming, and I need help writing a small program. Please someone help me.
    Directions:
    Create a program called CerealCompare using an if-then-else structure that obtains the price and number of ounces in a box for two boxes of cereal. The program should then output which box costs less per ounce.

    class CerealCompare {
        public static void main(String[] args) {
            // your code goes here
    }Hope that helps.
    P.S. Java does not have an if-then-else statement.

  • Need Help Writing Server side to submit form via API

    Hey
    I need help writing a serverside application to submit
    information via API to a separate server.
    I have a client that uses constant contact for email
    campaigns. We want to add to her website a form taht submits the
    information needed to subscribe to her email list, to constant
    contact via API.
    FORM.asp :: (i got this one under control)
    name
    email
    and submits to serverside.asp
    SERVERSIDE.ASP
    In serverside.asp i need to have
    the API URL
    (https://api.constantcontact.com/0.1/API_AddSiteVisitor.jsp)
    username (of the constant contact account)
    password (of the constant contact account)
    name (submited from form.asp)
    email (submitted from form.asp)
    redirect URL (confirm.asp)
    Can anyone help get me going in the right direction?
    i have tried several things i found on the net and just cant
    get anyone to work correctly.
    One main issue i keep having is that if i get it to submit to
    the API url correctly - i get a success code, it doesnt redirect to
    the page i am trying to redirect to.
    ASP or ASP.NET code would be find.
    THANKS
    sam

    > This does require server side programming.
    > if you dont know what that is, then you dont know the
    answer to my question. I
    > know what i need to do - i just dont know HOW to do it.
    If you are submitting a form to a script on a remote server,
    and letting
    that script load content to the browser, YOU have no control
    over what it
    loads UNLESS there is some command you can send it that it
    will understand.
    No amount of ASP on your server is going to change what the
    remote script
    does.
    http://www.constantcontact.com/services/api/index.jsp
    they only allow their customers to see the instructions for
    the API so i
    can't search to see IF there is a redirect you can send with
    the form info.
    But posts on their support board say that there is.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Why do I need Flash Remoting MX Components

    hello;
    it has been 2 years since I have worked with remoting,
    specifically on the Communication Server; then I only needed the
    NetConnection.call();
    but now I am being told that I need Flash Remoting MX
    Components which have to be downloaded and installed like a plugin;
    does NetConnection NOT offer the same access??
    any thoughts or opinions please;
    thanks
    Shannon Burnett
    Chicago

    You need it for data because you have to use the remoting
    classes for remoting to work in flash 8.
    I have nevered used comm server because red5 is free so I
    could not tell you how to connect to that.

  • Customizations JSP; advise needed

    To implement the following I hope to get some advise.
    I will first explain the case:
    2 tables: ARTICLES and ORDER_LINES
    ARTICLES
    ========
    id (PK)
    code (UK)
    description
    price
    vat%
    vat
    ORDER_LINES
    ===========
    order_id
    line
    article_id
    amount
    price
    vat%
    vat
    As you can see the columns price, vat% and vat are also included in the ORDER_LINES table.
    This is done because the values can be different then the default values (in the ARTICLES table).
    In the order line JSP page I'd like to display the
    Article code, description, amount, price, vat% and vat.
    The code, description, price, vat% and vat MUST be entered by invoking a LOV on the Articles.
    The price, vat% and vat can be changed after invkoing the LOV
    The problem is I don't know how to give back more than 1 value with a JHeadstart LOV!
    How can I solve this problem best?

    There are a few stept involved.
    1 To be able to pass a comma delimited list of items you are interested in, you need to change the lovPopup.jsp to take an extra parameter, e.g. <bean:parameter id="lovDescriptorAttributeNames" name="lovDescriptorAttributes" value=""/>
    2 Modify the JavaScript function jspLovPopup to take this as a (string) parameter. In this function you use this string to find the items in the calling form and put pointers to these items in a global variable.
    3 Change the lovSearchResults.jsp page to take a comma delimited list of values as a parameter.
    4 Modify the JavaScript function chooseLovValue to take this as a (string) parameter. In this function you copy these values to the items in the global variable with pointers.
    Jan Kettenis
    JHeadstart Team

  • Need help writing a Java rule in PDF Forms

    I have created an invoice for my contractors via "forms", and in turn made each cell either a drop down list or "read only" field so they cannot change the rate of pay, etc.  Here is my issue...My first drop down cell is titled "Job Description".  When the contractor selects one of the 8 dropdown options within the Job Description field, I would like it to automatically fill in the hourly rate that is associated with that particular job description (or skill).  I currently have my "rate" cell as a drop down, and I want to make that a read only, and when you select the A1 position from Job Description, it will populate the "rate" field with the appropriate amount for that A1 rate.  I believe this can be done with writing some Java script, but I have never played with Java and I don't really have the time to teach myself.  If anyone can help with me a quick tutorial, or even the formula I should use, so that I can just plug and play, that would be super helpful.  If this is a time consuming issue, I would be interested in paying someone to do it for me. Thank you!

    Hi George,
    I was able to copy my data over to a fresh document, and now it works just fine....thank you so much for your insight and help!
    I have another question if you have a moment. 
    I am trying to do a simple calculation of start time and end time for my employees.  Do I need to do this via a javascript, and if so, what area in properties of the result field should I copy it to?  for the purpose of the script, the fields are as follows:
    DataField1 = start time
    DataField2 = end time
    DataField3 = total time
    I would like to use the h:MM tt format for my time fields if possible.
    I've attached a link to the file through my dropbox account, and you'll notice that I created three new fields at the top of the invoice just to test the time calculations before i mock up the whole document.
    Dropbox - Contractor Invoice Template (1).pdf
    Any help you can give me would awesome! 
    Thank you!!

  • Help needed in writing a function.

    I am using Oracle 11g and SQL plus. I am a complete newbie, so I need some help here in writing a function. I guess my question is more about writing the trigonometric functions within the function.
    latA, longA latB, longB // these are the four input parameters,
    theta = longA - longB
    distX = sin( latA * PI / 180) * sin ( latB * PI /180) + cos ( latA * PI/180) * cos ( latB * PI/180) * cos ( theta * PI / 180)
    distY = acos(distX) // this is arc cosine
    distZ = distY * 180 / PI // PI refers to the mathematical PI
    distP = distZ * 60 * 1.1515; // this value should be returned. Of course the intermediate variable names don't matter.
    Please help. Thanks.

    CREATE OR REPLACE FUNCTION fucntion_name(latA IN NUMBER, longA IN NUMBER, latB IN NUMBER, longB IN NUMBER) RETURN NUMBER
    IS
    pi      CONSTANT NUMBER:=3.14159;
    theta NUMBER;
    distX  NUMBER;
    distY  NUMBER;
    distZ  NUMBER;
    distP  NUMBER;
    BEGIN
    theta :=longA - longB;
    distX :=sin( latA * PI /180) * sin ( latB * PI /180) + cos ( latA * PI/180) * cos ( latB * PI/180) * cos ( theta * PI / 180);
    distY :=acos(distX); --this is arc cosine
    distZ :=distY * 180/PI;  --PI refers to the mathematical PI
    distP :=distZ * 60 * 1.1515; --this value should be returned. Of course the intermediate variable names don't matter.
    RETURN distP;
    END;Edited by: Ora on May 3, 2011 11:46 PM

  • Help needed in writing installers for swing application

    Hi ,
    I want to write an installer for one of our home grown profiler tool. I need to write the installer for different platforms such as windows,linux,solaris,HP-UX.
    Does anybody have any idea of how to go ahead in writing installations. Share if there is any good links such as tutorials as well is thr any opensource tool (similar to installsheild) to write installers . As well following is the tentative algorithm for my install sheild
    1. Create a home dir for the tool and put all the application files in tht.
    2. Installing a 3rd party jar and make a home for it.
    3. Option for user to select the features(i hv 2 features. user can either select both or select individual feature) to be installed.
    4. Select the appserver home if any. On selection i hv to update the classpath in the startup batch file for the application(This is the toughest step i beleive bcoz each appserver have different folder structures and different startup batch files).

    Tried obtaining the output using SQL and the result is as follows:
    SQL> WITH T AS
      2  (
      3  SELECT 1 COL1 FROM DUAL
      4  UNION
      5  SELECT 2 COL1 FROM DUAL
      6  UNION
      7  SELECT 3 COL1 FROM DUAL
      8  UNION
      9  SELECT 4 COL1 FROM DUAL
    10  UNION
    11  SELECT 5 COL1 FROM DUAL
    12  UNION
    13  SELECT 8 COL1 FROM DUAL
    14  UNION
    15  SELECT 9 COL1 FROM DUAL
    16  UNION
    17  SELECT 10 COL1 FROM DUAL
    18  UNION
    19  SELECT 13 COL1 FROM DUAL
    20  UNION
    21  SELECT 14 COL1 FROM DUAL
    22  UNION
    23  SELECT 15 COL1 FROM DUAL
    24  UNION
    25  SELECT 16 COL1 FROM DUAL
    26  UNION
    27  SELECT 23 COL1 FROM DUAL
    28  UNION
    29  SELECT 24 COL1 FROM DUAL
    30  )
    31  SELECT OUTPUT FROM
    32  (
    33  SELECT DECODE(COL3,NULL,COL1, COL2)  || '-' || LEAD(DECODE(COL3,NULL,COL3, COL1)) OVER (ORDER BY DECODE(COL3,NULL,COL1, COL2)) OUTPUT  FROM
    34  (
    35  SELECT COL1, LEAD(COL1) OVER (ORDER BY COL1) COL2, LAG(COL1) OVER (ORDER BY COL1) COL3 FROM T
    36  )
    37  WHERE
    38  (COL2 - COL1 > 1 OR COL2 IS NULL OR COL3 IS NULL)
    39  )
    40  WHERE OUTPUT != '-';
    OUTPUT                                                                         
    1-5                                                                            
    8-10                                                                           
    13-16                                                                          
    23-24

  • Help needed  in writing a Query/Procedure

    Hello All,
    Need all ur help in writing a query or procedure
    Lets say the Table name is DEMO
    There i have one column like num it has values
    1
    2
    3
    4
    5
    8
    9
    10
    my query output should be
    1-5
    8-10
    i,e .. if the diff between two rows is greater than 1 then it result should be in a separate group
    I need a query/Procedure for this. Kindly help
    Regards,
    Chandra

    Tried obtaining the output using SQL and the result is as follows:
    SQL> WITH T AS
      2  (
      3  SELECT 1 COL1 FROM DUAL
      4  UNION
      5  SELECT 2 COL1 FROM DUAL
      6  UNION
      7  SELECT 3 COL1 FROM DUAL
      8  UNION
      9  SELECT 4 COL1 FROM DUAL
    10  UNION
    11  SELECT 5 COL1 FROM DUAL
    12  UNION
    13  SELECT 8 COL1 FROM DUAL
    14  UNION
    15  SELECT 9 COL1 FROM DUAL
    16  UNION
    17  SELECT 10 COL1 FROM DUAL
    18  UNION
    19  SELECT 13 COL1 FROM DUAL
    20  UNION
    21  SELECT 14 COL1 FROM DUAL
    22  UNION
    23  SELECT 15 COL1 FROM DUAL
    24  UNION
    25  SELECT 16 COL1 FROM DUAL
    26  UNION
    27  SELECT 23 COL1 FROM DUAL
    28  UNION
    29  SELECT 24 COL1 FROM DUAL
    30  )
    31  SELECT OUTPUT FROM
    32  (
    33  SELECT DECODE(COL3,NULL,COL1, COL2)  || '-' || LEAD(DECODE(COL3,NULL,COL3, COL1)) OVER (ORDER BY DECODE(COL3,NULL,COL1, COL2)) OUTPUT  FROM
    34  (
    35  SELECT COL1, LEAD(COL1) OVER (ORDER BY COL1) COL2, LAG(COL1) OVER (ORDER BY COL1) COL3 FROM T
    36  )
    37  WHERE
    38  (COL2 - COL1 > 1 OR COL2 IS NULL OR COL3 IS NULL)
    39  )
    40  WHERE OUTPUT != '-';
    OUTPUT                                                                         
    1-5                                                                            
    8-10                                                                           
    13-16                                                                          
    23-24

Maybe you are looking for

  • 10.6.1: panic running latest vuze

    Happened a number of times. Have run disk verify, etc; happens without any uncorrected problems. Panic message (give or take the hex) always the same. HW: Macmini2,1; various USB/FW devs, Only other oddity 4GB RAM installed (3 usable, maxmem=3072 was

  • Is the iPhone for me?

    Hi, I currently have service with Verizon and will be studying abroad next year for about 4 months in Europe (Vicenza, Italy and traveling to other countries). Since Verizon has expensive international plans and does not use SIM cards I feel like the

  • BPM Simple Sample Application Error!!!

    hi, i have some problems with the bpm simple sample applications on our local sap nw ce system (7.1 ehp1 sp0)? on the esworkplace i have download the *.sca file and have import this file into my nwds. i following the simple sample documentation an de

  • Break the SELECT statement.

    Hi, My requirement is to break the Select statement and get the fields in where clause in one internal table. For eg: Select VBELN                       POSNR                       MATNR  from VBAP into wa_vbap where VBELN = '0000000001'             

  • How to Configure Dual UOM in Inventory

    Hi All, I'm facing some problem regarding dual unit of measurement. our client is Purchasing Raw material Quintal wise.  But they are issuing  the Raw material for Production bag wise . The average weight of Bag   (Total available stock weight in Qui