APEX_COLLECTION - where does the code go?

I am trying to create my first APEX collection.
Where does the code go?
Do I create a region as a PL/SQL anonymous block?
Please advise -
Regards,
Stan

Hi,
I think best is create page process where you create/populate collection
Br,Jari

Similar Messages

  • Multiple dispatch and Symmetric methods - Where Does That Code Live?

    Hi all.
    I am stuck with the above problem, which looks to be a very common and fundamental one. Supposing I have some sort of relation or operation to be performed on various different pairs (or n-tuples) of classes of object. Where does this code belong, given that it is not sole property of any one of the classes, but a kind of property of the collection of classes?
    An bad example for me to bring up, but one that neatly illustrates the point, is the equals method. In order to retain the symmetric and transitive properties of the equals method, and object can only make judgement calls about it being equal to another object of it's own type. This prevents the concept of equivalency from crossing between types.
    In order to compare a with b (if a and b are of different types), b must supply some sort of representation of itself as an a, then the comparison statement a.equals(b.asA()); must be called.
    This of course means b must supply an 'asXXX()' method for each class XXX it wishes to equate itself to. Furthermore, by an extension of the equals contract for symmetricality, the method AsB() in class A (if it exists) must be such that, if a.AsB() .equals (b), then b.AsA.equals( a ).
    This sort of design is unfeasible for obvious reasons, the main reason being that it is impossible to anticipate evey case where an instance of class A could reasonably be compared to an instance of some other class X.
    The other annoyance is all that hard work of providing methods to equate A with something else, would go unused for 99% of the time.
    With this in mind, I was thinking. Suppose in some program environment, we have only 3 classes, A, B, and C, such that:
    {A,B} can be meaningfully compared
    {B, C} and {A, C} cannot.
    It would be OK to supply code (somewhere) for comparing A's with B's. We also know that under no circumstances will an A or a B, and a C, ever need to be compared for equality.
    Supposing an extension of this environment were created, introducing class D.
    {D, A} and {D, B} can be meaningfully compared.
    Now, neither A nor C knows what a D is, or how to compare themselves to it. But D was developed with A, B and C in mind, and contains logic for the various comparisons (with A and with B). An obvious idea for this is to let D bring it's new code into play, by registering these new comparison functions in the environment somehow.
    Supposing instead that equality comparison was delegated to some third party, instead. This third party contains a table of pairs of classes, which act as keys to look up a comparison object.
    So, when class A is loaded, something of the sort happens:
    public class A {
        static {
            Equals.comparer.addEntry(A.class, B.class, new EqualsMethod() {
               // details of the EqualsMethod interface implementation go here
    public class B {
        static {
            // since equals is symmetric, this method clashes with the above in A
            // This could happen...
            Equals.comparer.addEntry(B.class, A.class, new EqualsMethod() {
               // ... different approach to the above
    public class D {
        static {
            Equals.comparer.addEntry(D.class, A.class, new EqualsMethod() {
            Equals.comparer.addEntry(D.class, B.class, new EqualsMethod() {
        } // Ds can now be compared with Bs and As. They can now be compared with Ds
    }There is a problem with the above. As can clearly be seen, there are 3 unique situations that might occur between two classes (call them X and Y).
    o One of X or Y contains code to compare them both.
    o Neither X nor Y contain code to compare the two. X equals Y is always false
    o Both X and Y contain code to compare the two.
    The third causes the problem. What if X and Y disagree on how to compare themselves? Which method gets chosen? The only solution would be to let whosever static initialiser gets called first be the one to supply the code.
    I said before that equals was a bad example to bring up. this is because the usage of equals and the concept of equality in java is already well defined, and works just fine. However, in my own pet project at the moment, I have run into the same problems as outlined above.
    I am currently assembling a generic pattern API for use in various other applications I am writing (I was finding that I was writing code for matching objects to patterns, in different guises, quite frequently, so I made the decision to refactor it into its own package). An important part of the API is the section that handles the logic for combining patterns, ie with AND, OR and NOT operations.
    The Pattern interface is this:
    interface Pattern<E> {
         public boolean match(E toMatch);
         public Pattern<E> not();
         public Pattern<E> or(Pattern<E> other);
         public Pattern<E> and(Pattern<E> other);
    }There are a few basic Patterns:
    TruePattern<E> - a pattern that always returns true no matter what E is passed for it toMatch
    FalsePattern<E> - self-explanatory.
    ExactValuePattern<E> - true if and only if the E that it is passed toMatch is .equal to the E that this pattern was constructed with.
    NotPattern<E> - a pattern that contains another pattern, and returns true for any E that returns does not match it's contained pattern. Used for when the contained pattern cannot be logically reduced to one pattern under the NOT method in the Pattern interface
    AndPattern<E> - a pattern that contains 2 other patterns, and returns true for some E iff both contained patterns return true for that E. Used for when the 2 patterns cannot be logically reduced into one pattern via the AND method in the Pattern interface
    OrPattern<E> - self explanatory
    RangePattern<E extends Comparable <E>> - a pattern for comparing if some Comparable lies between two other comparables.
    Every pattern has the opportunity to provide a reduction, when combined with another pattern through And or Or. For example, any pattern AND a FalsePattern can be reduced just the FalsePattern. any pattern OR a TruePattern can be reduced to just the TruePattern.
    The methods AND and OR from the Pattern interface present the same problems as the .equals() example I was using before.
    o AND and OR are symmetric operations
    o There exist situations where two patterns of unrelated class could be meaningfully combined (and reduced) under these two operations.
    Example: The pattern on Integers '0 < X < 3' and 'X is 5' can be reduce to the FalsePattern
    Example: The pattern on Doubles '0 < X <= 10' or 'X is 5.5' or 'X is 7.2' can be reduced to '0 < X <= 10'.
    Example: The pattern on Integers ('0 <= X <= 5' and 'X is not 0') or ('X is 6') or ('x is 7') can be reduced to '1<=X<=7'.
    So the question is, where does the code belong? a.and(b) should return the same as b.and(a), but both b and a may well disagree as to what happens when they are combined under and. At present, both a and b need to supply their own separate implementations. Clearly though, the code for combining patterns A and B belongs to neither A alone, not B alone, but to A and B as a whole.
    Thanks in advance, and sorry for this overlong post.

    So the equivalent thing in my scenario would be an
    AndAnator, and an OrAnator? :)
    The thing is, it would be nice for comparison between
    A and B to take place automatically, without the poor
    coder having to maintain a reference to a Comparator
    and invoke the comparison method each time. Likewise
    in my situation, it'd be nice to say A.or(B) instead
    of andAnator.and(A,B), yet have all the goodness of a
    third party doing the comparison (or in this case,
    the anding).
    I am going to go and test this all out, but do you
    have any suggestions on a good structure? I think it
    would involve pulling the and/or/not methods from the
    interface (this appeals, as many implementors may not
    wish to supply logic for running these methods
    anyhow), and then putting them... somewhere else.I didn't consider your speicifc problem very deeply because after such a long detailed explanation I figured you'd be up for kicking around the idea for a while.
    In your case, I see that you would want to be able to call the and and or methods on the Objects themselves. Luckily, in this case, I think you can have your cake and eat it too.
    You can make your and and or methods fa�ades to the third party 'referee'. This way you can enfore symmetry. It's difficult (if not impossible) to enoforce transitivity with this design but I think you don't even need that in this case. That is if a == b and b == c then a == c should be true but if a and b and b and c then a and c is not necessarily true. In your case, it may not even make sense.

  • Apple maps has received a poor performance rating just after introduction of the iPhone 5. I am running google maps app on the phone. Siri cannot seem to get me to a specific address. Where does the problem lie? Thanks.

    Apple maps has received a poor performance rating just after introduction of the iPhone 5. I am running Google Maps app on the phone. SIRI cannot seem to get me to a specific address. Where does the problem lie? Also can anyone tell me the hierarchy of use between the Apple Maps, SIRI, and Google maps when the app is on the phone? How do you choose one over the other as the default map usage? Or better still how do you suppress SIRI from using the Apple maps app when requesting a "go to"?
    I have placed an address location into the CONTACTS list and when I ask SIRI to "take me there" it found a TOTALLY different location in the metro area with the same street name. I have included the address, the quadrant, (NE) and the ZIP code into the CONTACTS list. As it turns out, no amount of canceling the trip or relocating the address in the CONTACTS list line would prevent SIRI from taking me to this bogus location. FINALLY I typed in Northeast for NE in the CONTACTS list (NE being the accepted method of defining the USPS location quadrant) , canceled the current map route and it finally found the correct address. This problem would normally not demand such a response from me to have it fixed but the address is one of a hospital in the center of town and this hospital HAS a branch location in a similar part of town (NOT the original address SIRI was trying to take me to). This screw up could be dangerous if not catastrophic to someone who was looking for a hospital location fast and did not know of these two similar locations. After all the whole POINT of directions is not just whimsical pasttime or convenience. In a pinch people need to rely on this function. OR, are my expectations set too high? 
    How does the iPhone select between one app or the other (Apple Maps or Gppgle Maps) as it relates to SIRI finding and showing a map route?  
    Why does SIRI return an address that is NOT the correct address nor is the returned location in the requested ZIP code?
    Is there a known bug in the CONTACTS list that demands the USPS quadrant ID be spelled out, as opposed to abreviated, to permit SIRI to do its routing?
    Thanks for any clarification on these matters.

    siri will only use apple maps, this cannot be changed. you could try google voice in the google app.

  • Where does the word document store?

    Hi Expert,
    Using webdynpro java to upload the file, where does the file actually store?
    I refer to below tutorial but have no ideal where the file is store. Please help.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
    Thank you.
    Regards,
    Henry

    Hi Henry,
      Once you reach the Action handler of the FileUpload UI Element your file has already been uploaded and is available in your context attribute. Now depending on the requirement you need to store the file.
    If you need to store the file in a shared location then you need to write the file to that location using normal java I/O.
    IWDResource resource = element.getMyResAttr();
    InputStream is = resource.read(true);
    try
    /* read bytes from stream and write it to file */
    finally
      try { is.close(); } catch (final IOException ex) {}
    If you need to store the file on the R/3 system then you need to call the function module/BAPI capable of doing so and pass the resource file to the function module. Some times you might need to convert the IWDResource file to a byte array. The code given above can be modified to do that. If there are no function modules or BAPI's capable of storing the Word Document available you will have to write one.
    Let me know if this helps.
    Regards,
    Sanyev

  • Where does the Bill of substance maintained in property tree?

    Dear Experts,
    Where does the Bill of substance maintained in property tree? My understanding is it shows in section 2 in MSDS under composition tab. Please correct or confirm my understanding.
    Devdatt

    Dear Devdatt
    there are by standard two options available. Both have their pros and cons:
    a.) Standard EHS Export => a process which is not user friendly and without specific access rights can not be used
    b.) There are two other output variant available which you could check if they fulfill the needs of the users etc.:
    Check e.g. Displaying Properties - Basic Data and Tools (EHS-BD) - SAP Library
    as well as:
    Displaying Specification Data - Basic Data and Tools (EHS-BD) - SAP Library
    Regarding the first one: you can only download at max 50 properties in one run; regarding the second one: I am using this rarely but it is the most flexible one; not sure if the DG properties are supported. In any case: try it.
    If neither a.) nor b.) are the right solution: just create your onw ABAP code and prepare a suitable output variant on your own. You can use the "full blown SAP scenario" here (a.g. ALV like output variants etc.) ; you need to "only" learn from ABApcode of the standard output variant so that you are able to create your own one. This approach is quite standard and used very often
    Keep in mind. if you use STANDARD property tree and you have a lot of properties/data to be read performance is in most cases "bad"
    C.B.

  • Where is the code behind buttons?

    Hi,
    I need to modify some forms developed several years ago. There are some buttons on a horizontal toolbar. They all work ok except one button. I tried to find code behind these buttons by clicking the "+" sign in front each button item, but it looks like no trigger is attached to any of the buttons. Where can the code be hidden? Even if the buttons are inherited from object group or property class, I should be able to see some code, right? Any idea?
    Thanks.
    Sherry

    Hi,
    I think if the buttons do default actions e.g Exit does EXIT_FORM, tnen there is no need for triggers - try creating a WHEN-BUTTON-PRESSED trigger under one of the items with MESSAGE('Hello World'); and see what happens. Forms can work with no triggers at all if all that is required is default functionality. When you require, for example, conditional validation/navigation a trigger is needed. Take a text item: pressing RETURN will fire the NEXT_ITEM built-in unless you explicitly change Forms behaviour by coding a KEY-NEXT-ITEM trigger (which could contain any PL/SQL e.g. EXECUTE_QUERY if you want a query block to execute a query upon hitting RETURN from an item.
    Hope this helps

  • Where does the ejb store the state

    hi all,
    where does the statefull session store the state in
    between multiple methods invocations of the client.
    In which format it will store

    Where and in what format stateful session state is stored is an implementation detail of the container.
    In many cases passivation will not take place at all, so the session bean state is simply stored in
    memory between invocations. If passivation does take place, the container is allowed to store the
    passivated state anywhere it likes. Many implementations provide configuration that determines where
    the state is stored. In SUN's implementations, the deployer can choose between a file system store,
    a high availability database, or in-memory replication.
    The important thing is that the application code does not have to concern itself with most of these
    details. All you need to do as a developer is ensure that the bean class state conforms to the
    contracts for Serializability. The exact rules are covered in Section 4.2.1 of the EJB 3.0 spec.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Z77a-g45 where does the little speaker go and why does my computer pause on c5

    so my computer boots does evrything plays games etc but when it starts these numbers in the bottom right corner go off then it stops at c5 for a second then goes to bios screen then boots to windows. is this bad?
    also where does the little speaker plug into.

    it will be fine its just a hang not an error or failure! its just struggling for a short time to get the hard drive opperating thats all and is nothing to loose any sleep over!
    Hang = nothing to worry about really
    failure = thats the oposite of a hang its where it never starts and is to actually worry about!
    unless your computer never gets past that code and refused to load because its failed its not a issue to really bother about! like Xmad said you could try a BIO's update to the most recent one and do a firmware update if you have an SSD! its just a detection hang and an update of both could fix it!
    if you are thinking about doing a bios update use this >>Use the MSI HQ Forum USB flasher<<
    do not use live update to do the bio's flash as it has a 50/50 chance of bricking the board and the tool above has never had a failure of a flash!

  • Why I need a code for rent a film and where ist the code? (I dont have a card)

    Why I need a code for rent a film and where ist the code? (I dont have a card)

    it's unclear what you mean
    you say you dont have a card which I guess is you don't have a creditcard
    in which case the other option is to pay by a giftcard which include a code which you put in
    because to rent you have to pay otherwise it's not really renting

  • Random Vectors/images color inverted in print, but not in PDF. Where does the fault lie?

    Sent a PDF to the newspaper printer and some of the images had inverted/strange colors. However...
    In one case I had duplicate images of a pink vector flower. SOME of the flowers were inverted, to a dark blue/black, and some were fine(pink). These were embedded vectors.
    In other instances vectors, went from orange to blue/black, pink to blue/black, and yellow/white to blue black. I specify because in one vector image, a ring, the ring was yellow, but the diamond was white, and it all changed to the same blue/black in print.
    Finally, there were two greyscale Tiff photographs of a pair of ladies. These are not embedded, and have not been altered at all and since the last time this paper has been printed, (which printed fine). This time, they were inverted. Nothing else on the page was inverted.
    As far as I can tell, there is not a separation issue, and I have saved the file from InDesign CC to pdf using the same settings as dozens of times before. The pdf on my end looks fine. The printer says they just print what they receive, but as far as I can tell, there is no issue on our end. The fact that some duplicated images printed fine, and others did not seem to confirm this. Everything is properly linked. Has anyone else experienced this problem? Is this a pdf, InDesign, or even an adobe problem at all, or it is something on their end? I have heard of inverted colors before, but can't find a solution (especially as I can't even see the problem on my end.)
    Using Windows 8, up-to-date InDesign CC, and Acrobat Pro, Illustrator CS6 ver.16.2.0 64bit
    I have no idea what the printer uses.

    Where does the fault lie? - in an environment where they (the newsprinter) collect up front, have no responsibility for quality and arrogantly believe, perhaps correctly, that you'll be back with another paying job in the future.
    Check the file you sent via Acrobat Preflight or Output Preview for RGB elements.
    Check the file you sent via Acrobat Preflight - Checks - For Transparency Used
    Do any of these elements off color involve rgb or interact (with or near) any transparency?
    (InDesign could show these attributes via the links panel or a Live Preflight. Both can be (probably should be in your case) changed via the PDF Export)

  • I'm trying to use Dictation.  Where does the text go, and how can I retrieve it?  Thank you.

    I'm trying to use Dictation.  Where does the text go, and how can I retrieve it?  Thank you.

    You dictate after you open a blank page in any text editor. The text goes on the page.
    You can use Text Edit for example (in your applications folder).
    With the blank page open, go to the Edit menu and select Start Dictation. When you are finished, you save the file as you would any other document. You can retrieve it, edit it or anything else you want, because it is a file like any other you create with that text editor.

  • When I capture a still frame froma video in Llightroom 4.3, where does the captured frame end up?

    When I capture a still frame froma video in Llightroom 4.3, where does the captured frame end up? I cannot find it. Stan

    It will be right next to the movie in your library and the jpg file will end up on your hard disk right next to the movie file. You can see the actual file by right (or control) clicking on the image in the library view and selecting "show in Finder/Explorer"

  • When I transfer photos from my camera to my computer, where does the computer store them?

    When I transfer photos from my camera to my computer, where does the computer store them?

    Assuming you're using iPhoto 09 or later.
    By default the photos are stored in the iPhoto Library in your Pictures Folder.
    The iPhoto Library is a Package File. This is simply a folder that looks like a file in the Finder. This is a simple protection from users inadvertently corrupting their library by browsing through it with other software or making changes in it themselves.
    Want to look inside?  Go to your Pictures Folder and find the iPhoto Library there. Right (or Control-) Click on the icon and select 'Show Package Contents'. A finder window will open with the Library exposed.
    Standard Warning: Don't change anything in the iPhoto Library Folder via the Finder or any other application. iPhoto depends on the structure as well as the contents of this folder. Moving things, renaming things,, deleting them or otherwise making changes will prevent iPhoto from working and could even cause you to damage or lose your photos.
    As an FYI: There are many, many ways to access your files in iPhoto:   You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    (Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)
    You can access the Library from the New Message Window in Mail:
    There's a similar option in Outlook and many, many other apps.  If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    If you want to access the files with iPhoto not running:
    For users of 10.6 and later:  You can download a free Services component from MacOSXAutomation  which will give you access to the iPhoto Library from your Services Menu.
    Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and 10.5 Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    Drag and Drop: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    File -> Export: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    Show File:  a. On iPhoto 09 and earlier:  Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.    3.b.
    b: On iPhoto 11 and later: Select one of the affected photos in the iPhoto Window and go File -> Reveal in Finder -> Original. A Finder window will pop open with the file already selected.

  • Where does the ipad back up stored

    where does the ipad back up stored

    iTunes places the backup files in these locations:
    Mac: ~/Library/Application Support/MobileSync/Backup/
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    Note: To quickly access the Application Data folder, click Start > Run. Type %appdata% and click OK.
    Windows Vista Windows 7: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
    Note: To quickly access the AppData folder, click Start, type %appdata% in the search bar, and press the Return key.
    Windows 8: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
    Note: To quickly access the AppData folder, move the cursor to the upper-right corner, click the magnifying class, type %appdata%, and press the Return key.

  • Where does the router fallback to load IOS when the IOS in flash memory is corrupted?

    If the ios image stored in flash is corrupted from where does the IOS is picked up?

    Hi,
    The following details the router boot process:
    1. The router is powered on.
    2. The bootstrap program (ROMmon) in ROM runs Power-On Self Test (POST)
    3. The bootstrap checks the Configuration Register value to specify where to load the IOS. By default (the default value of Configuration Register is 2102, in hexadecimal), the router first looks for “boot system” commands in startup-config file. If it finds these commands, it will run boot system commands in order they appear in startup-config to locate the IOS. If not, the IOS image is loaded from Flash . If the IOS is not found in Flash, the bootstrap can try to load the IOS from TFTP server or from ROM (mini-IOS).
    Last if it doesnt find the software anywere it would end up in rommon mode.
    HTH
    Regards
    Inayath

Maybe you are looking for