Building JSF 1.2 Custom Components with EL and standard components

Hi all,
I have built custom components in jsf 1.1 with great success but i am finding replicating the same functionality in jsf 1.2 very difficult. I have some conditions for my new custom component.
- Using jsf 1.2
- Must use unified EL, i am using a UIComponentELTag
- iam using jsf standard html components from javax.faces.component.html here in particular i wont HtmlCommandLink.
Essentially i am constructing a real time command menu. I have a backing bean from which i get command names and descriptions values. I wont to then in real time construct a table of links (using HtmlCommandLink) - all this work is to be processed by a custom component. Basically the commandLink issues a command in my backing bean, a parameter (param) is passed with the commandLink, this is later picked up in the backing bean method.
I can generate the table, and all the HtmlCommandLinks, i have simply looped throught and encoded each of them.
What i can do: i can see the table and the HtmlCommandLinks, but the links dont perform any action when i press them.
What i want help with:
I want to encode a HtmlCommandLink in my custom component with a param, traditionally i would set the action but this is now deprecated, and i need to use the setActionExpression method. I have tried to do this but the actions are note fired its simply doesnt function.
Note:
In jsf 1.1 I use to loop through all the HtmlCommandLink and peform their processDecodes method within my custom components very own processDecodes. The same in jsf 1.2 doesnt seem to yield any results.
Can someone give be an example or solution to this? I have read articles on the net and they seem to all discuss jsf 1.1 which i have done and it works, but i am using unifed EL and jsf 1.2 now.
Many Thanks,
Kev

Hi all,
I have built custom components in jsf 1.1 with great success but i am finding replicating the same functionality in jsf 1.2 very difficult. I have some conditions for my new custom component.
- Using jsf 1.2
- Must use unified EL, i am using a UIComponentELTag
- iam using jsf standard html components from javax.faces.component.html here in particular i wont HtmlCommandLink.
Essentially i am constructing a real time command menu. I have a backing bean from which i get command names and descriptions values. I wont to then in real time construct a table of links (using HtmlCommandLink) - all this work is to be processed by a custom component. Basically the commandLink issues a command in my backing bean, a parameter (param) is passed with the commandLink, this is later picked up in the backing bean method.
I can generate the table, and all the HtmlCommandLinks, i have simply looped throught and encoded each of them.
What i can do: i can see the table and the HtmlCommandLinks, but the links dont perform any action when i press them.
What i want help with:
I want to encode a HtmlCommandLink in my custom component with a param, traditionally i would set the action but this is now deprecated, and i need to use the setActionExpression method. I have tried to do this but the actions are note fired its simply doesnt function.
Note:
In jsf 1.1 I use to loop through all the HtmlCommandLink and peform their processDecodes method within my custom components very own processDecodes. The same in jsf 1.2 doesnt seem to yield any results.
Can someone give be an example or solution to this? I have read articles on the net and they seem to all discuss jsf 1.1 which i have done and it works, but i am using unifed EL and jsf 1.2 now.
Many Thanks,
Kev

Similar Messages

  • Enhancing Customer Reports with Commands and Parameters

    Hi All,
    I am implementing the mentioned tutorial. I have succesfully deployed the AccessStatisticApplication PAR on portal. While scheduling the report from Content Management -> Reports -> Running Reports, it is giving error "<b>Can't find bundle for base name com.sap.netweaver.km.stats.reports.DocumentAccessReport, locale en_US</b>". Has anyone faced the problem, can anyone please help to remove this runtime error.
    Related Link: <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7d28a67b-0c01-0010-8d9a-d7e6811377c0">Enhancing Customer Reports with Commands and Parameters</a>
    Regards
    Poonam

    <i>True, the application property service is apparently not to be used for a real-life scenario</i>
    You can definitely use the application property service in production scenarios - it's used by other components in a standard KM install, i.e. out-of-the-box.
    <i>in our case it forced the server down with deadlocks. </i>
    This should definitely not happen! Did you get SAP support to take a look at this? Was it the most popular documents report that caused this, or some other custom code? There should be no such problem with this service, since it's been around for quite some time and in production use.
    <i>
    Even if the code sample is not to be used for real-life scenarios it could at least make use of something else than the application property service which isnt't optimal for this use.
    </i>
    The application property service is good for a lot of scenarios, so it is realistic to use in in real-life scenarios. The only time I have seen this approach (storing the number of hits on documents in the database) fail is in very high-load scenarios.
    <i>Could you provide me with a link to the documentation for the logging framework?</i>
    <a href="http://http://help.sap.com/saphelp_nw70/helpdata/en/d2/5c830ca67fd842b2e87b0c341c64cd/frameset.htm">Logging and Tracing</a> on help.sap.com and <a href="https://help.sap.com/javadocs/NW04S/current/en/index.html">Logging and Tracing API (J2EE Engine API)</a> for NW 7.0.

  • Customer Statement with opening and closing balances

    Dear Forum,
    The users want to generate the Customer Statement with opening and closing balances like the traditional one. The statement now generated gives the list of all open items as on date, but the users want the statement with opening balances as on the date of the begining of the range specified and the closing balance at the end of the period for which the statement is generated. Is there a way to generate the same from the system.
    Thanks for the help.
    Regards,

    Hi,
    SPRO> Financial Accounting (New) > Accounts Receivable and Accounts Payable > Customer Accounts > Line Items > Correspondence > Make and Check Settings for Correspondence
    You can use the program RFKORD10 with correspondance type SAP06 for your company code
    This program prints account statements and open items lists for customers and vendors in letter form. For account statements, all postings between two key dates, as well as the opening and closing balance, are listed.
    Regards,
    Gaurav

  • I have a sharepoint custom list with Title and image attachments, now i want to display image attachments in div based on the title.

    hi,
    i have a sharepoint custom list with Title and image attachments, now i want to display image attachments in div based on the title.

    i am using the below code only
     SPSite mySite = new SPSite("http://sharepoinsiteaddress");
    SPWeb myweb = mySite.OpenWeb();   
    SPList myList = myweb.Lists["Announcements"];   
    SPListItem myListItem = myList.GetItemById(1);   foreach (String attachmentname in myListItem.Attachments)
    String attachmentAbsoluteURL =    myListItem.Attachments.UrlPrefix // gets the containing directory URL
       + attachmentname;
       // To get the SPSile reference to the attachment just use this code
      SPFile attachmentFile = myweb.GetFile(attachmentAbsoluteURL);
       // To read the file content simply use this code
       Stream stream = attachmentFile.OpenBinaryStream();    StreamReader reader = new StreamReader(stream);
       String fileContent = reader.ReadToEnd();
    here i am using panel, how can i attach this attached image to panel

  • Discover Bluetooth LE Device and its custom service with uuid and its characteristics

    Hello Team,
    I have a requirement for developing a library in C# which can be used in any windows app (Metro or Non Metro) apps to discover Bluetooth LE devices which are advertising a custom service with uuid and pair and find all the characteristics of the service
    and send parameters and receive response.
    I have tried 32feet.NET library which everyone talks about but realized it doesn't support Bluetooth LE devices. Is there any way I can do that? Or do I have write C# wrapper to use winsock2.2 library to call native code to access Bluetooth stack?
    Please suggest. We have been able to achieve this requirement in Mac OSX by using their core Bluetooth framework.

    Hello Priyanku,
    >>Is there any way I can do that?
    As far as I know, there is not such API that you can use to enumerate all services belonging to a Bluetooth LE device, nor all characteristics belonging to a service.
    >>Or do I have write C# wrapper to use winsock2.2 library to call native code to access Bluetooth stack?
    I suggest that you could try it.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • What's the difference between wcc system components and standard components

    hi Experts,
    My customer has a question on the difference between wcc system components and standard components, I didn't find it from doc, anyone can help on answering this?
    Best regards

    Hi ,
    System components are those which are providing the basic functionalities on UCM server by default . Standard components are those which are provided as-in on the server but need to be enabled per case basis . For example Framework Folders which is not necessary for the basic functionalities but is needed if user wants to .
    This guide gives the administration level overview for UCM  : http://docs.oracle.com/cd/E23943_01/doc.1111/e10792/toc.htm
    Hope this helps .
    Thanks,
    Srinath

  • Can I build a interactive log-in form with Edge and Export Raw code to edit?

    Hey Everyone,
    I love adobe edge, but I'm still getting used to it. It's very easy to use, but I ran into an issue. I am redesigning a webpage for a client and need to build a log-in page and re-design the site. The site is a Dashboard that will be on an ipad and computer. What I need to do is take my design and design a template for them to use. They require HTML4 and up with some coding (not a fan of coding, I am strictly a designer, and before you guys critize about why I took the job when I don't know coding, it's a side project they are having me do for them while the main design project is being evaluated and I'm on contract so I don't have a choice, still would like to learn how to achieve what I need) but I still want to maintain the animation I have planned for the log in, very simple nothing special. Basically what I want is when you log in and click in the "text" box the background image will go from the clear image to the blur image.
    What I've done so far,
    I built the log-in page as a test to see if it would work (didn't take long since I saved as a PSD and imporated the files). I've attached an imagw to show a visual of what I am trying to do. The animation works fgreat for what i need, but now I want the box I click in to be writtable inside and work with the animation. I can't seem to figure out how to make the box's I created typable to type in for a "Username" and "Password" in other word interative. I used the boxes provided in edge because they are HTML boxes, but I want them to become text boxes to enter the Username and Password (It doesn't have to be perfect just enough for me to type in to pass off to the programmers). I know you can make edge interative with muse and what not and I was hoping to achieve what I want for them so I can export it and pass it off to the programmers. Is there a way to add this in Edge? If not, I know you can export to Dreamweaver and  when I import the file to Dreamweaver I just see a grey box with the file I created (.oma I think) from Edge but not the content unless I "Preview it" in a browser.
    So is there a way to build what I want in edge without resorting to dreamweaver? If so and there is code to input can you guys provide step by step on how to put it in the program? And is there a way to export the project so I can pass the RAW code to the programmers to do there thing? Lastly, is there a way to incorporate Jquery mobile to Edge? For the Dashboard can I build the same thing in Edge? Example what will be in there are things like charts, Calendars, Dates, Etc, Etc.  If I need to resort to building it in dreamweaver I can provide the code for you guys to alter to change for what I need. Like I said I'm not a big fan of coding and a little stranger to it. I just know the basics and the fact I haven't touched dreamweaver since CS4 makes it even harder to use. Some tools I like are gone such as AP divs. However i like the new elements you can inject into the program such as the Jquery stuff, but for the simplist things I want to do such as moving them left or right or centering them is a different story.
    Please Help!
    Thanks!

    if you search on the forum you can find useful posts about creating a form in edge
    Zaxist

  • Can you build an iOS app on windows with dreamweaver and submit it to the apple store?

    Hi
    I am interested in starting to develop my own apps for the App Store,
    I own a windows computer and I am wondering if its possible to build an app
    In dreamweaver and then submit it through phonegap build to the apple store.
    Can't seem to find the answer anywhere =(
    Thanks,
    Nic

    I am interested in starting to develop my own apps for the App Store,
    I own a windows computer and I am wondering if its possible to build an app
    In dreamweaver and then submit it through phonegap build to the apple store.
    I have an app in the App Store that I designed in Photoshop, developed in Dreamweaver CS6, and packaged with Adobe PhoneGap Build. The first three steps - design, development, and packaging I did on a Windows computer. But I used a Mac for my developer certificate and provisioning profile, as well as the finall step of preparing and submitting it to the App Store through Application Loader.
    Here is some info: Building for iOS
    You'll also need an Apple Developer account, and an Intel-based Mac running Mac OS X Snow Leopard or later to develop and distribute iOS  apps. If you're building an app for a client, you'll use their developer account for the submission process.
    Here is a little more info: iOS Developer Program

  • Common Bills only with future and current components

    Hi all,
    We want to common BOMs which have components with date effecitivity in the past in a new ORG.
    Therefore we would like to common only the future and current components. Otherwise we had to enable all the old items (components) in the new org.
    Has anybody an idea how to do this respective has experiences with a cusomization concerning this issue (in standard it seems not possible).
    Thanks!
    Best regards
    Oliver

    Hi all,
    We want to common BOMs which have components with date effecitivity in the past in a new ORG.
    Therefore we would like to common only the future and current components. Otherwise we had to enable all the old items (components) in the new org.
    Has anybody an idea how to do this respective has experiences with a cusomization concerning this issue (in standard it seems not possible).
    Thanks!
    Best regards
    Oliver

  • Making custom icons with transparency, and Cover View mode

    I tried making a new icon for a folder, and transparency doesn't seem to be treated the same in Leopard as it was in Tiger.
    Trying to get an object to float onscreen, without a square white background, I tried pasting the following onto the folder's icon at the top of a Get Info window:
    1. one layer of a .psd file
    2. the image Saved For Web in Photoshop (as a GIF), open in Photoshop
    3. the same image saved as a .png, opened in Photoshop
    4. a Photoshop EPS with a clipping path, opened in Photoshop
    5. the GIF file opened in Preview
    6. the .png file opened in Preview
    the results:
    1. the transparency surrounding the object comes out as white
    2. a speckled, purple image with a white background
    3. the same as 2
    4. the same as 1
    5 and 6: the transparency seems to work: the icon on the
    Get Info window loses its white background and the icon floats correctly on the Desktop. But in Cover Flow viewing mode, it completely disappears.
    What am I missing? By the way, the icons for the image files, in Cover Flow, show the white background for the .psd and .png files, but not for the .gif, where the transparency shows correctly. The .gif's icon seems to show the image with a white background in List and Icon view, but only the generic GIF icon in Column view. This all seems strange to me.

    I think you probably discovered the Cover Flow Bug. See this thread and the older one referenced in it as well:
    http://discussions.apple.com/thread.jspa?messageID=6846850
    As for the rest, well, at least you can copy something with a transparency out of Preview and paste it as an icon. Preview and Photoshop seem to me to not play well together with transparencies. I've gotten some VERY strange looking things, going back and forth between them with pngs and tiffs. Don't use gifs, or eps files, but I did notice that Finder does a rotten job coping with Photoshop's alpha channel (especially weird since once upon a time it worked fine, ditto for being able to show thumbs for eps files).
    Francine
    Francine
    Schwieder

  • Need help with  HTML and Swing Components

    Dear All,
    I am using HTML text for Jbutton and Jlabel and MenuItem.
    But when i am trying to disable any of these, its foreground color is not being grayed out.
    For that, I have overrided the setEnable() method as mentioned below:
    import java.awt.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.*;
    import javax.swing.plaf.FontUIResource;
    * HtmlLabelEx.java
    public class HtmlLabelEx extends javax.swing.JDialog implements MouseListener{
         * Creates new form HtmlLabelEx
        public HtmlLabelEx(java.awt.Frame parent, boolean modal) {
            super(parent, modal);
            UIManager.put("swing.boldMetal", Boolean.FALSE);
            initComponents();
            setLayout(null);
            this.addWindowListener(new WindowAdapter()
                public void windowClosing(WindowEvent event)
                    System.exit(0);
            JLabel jLabel1 = new JLabel()
                public void setEnabled(boolean b)
                  super.setEnabled(b);
                  setForeground(b ? (Color) UIManager.get("Label.foreground") : (Color) UIManager.get("Label.disabledForeground"));
            JButton jButton1 = new JButton()
                public void setEnabled(boolean b)
                  super.setEnabled(b);
                  setForeground(b ? (Color) UIManager.get("Label.foreground") : (Color) UIManager.get("Label.disabledForeground"));
            add(jButton1);
            String str = "<html><body><b>Label</b></body></html>";
            System.out.println("str = "+str);
        jLabel1.setText(str);
        add(jLabel1);
        jLabel1.setBounds(10,10,100,20);
        jLabel1.setEnabled(false);
        jButton1.setText("<html><body><b>Button</b></body></html>");
        jButton1.setEnabled(true);
        jButton1.setBounds(10,50,100,20);
        System.out.println("getText = "+jLabel1.getText());
        setSize(400,400);
        addMouseListener(this);
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
        private void initComponents() {
            getContentPane().setLayout(null);
            setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
            pack();
        }// </editor-fold>                       
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new HtmlLabelEx(new javax.swing.JFrame(), true).setVisible(true);
        // Variables declaration - do not modify                    
        // End of variables declaration                  
        public void mouseClicked(MouseEvent e)
            if(e.getButton() == e.BUTTON3)
                JMenuItem mit = new JMenuItem("<html><body><b>Menu Item</b></body></html>");
                JPopupMenu pop = new JPopupMenu();
                pop.add(mit);
                mit.setEnabled(false);
                pop.show(this,e.getX(),e.getY());
        public void mousePressed(MouseEvent e) {
        public void mouseReleased(MouseEvent e) {
        public void mouseEntered(MouseEvent e) {
        public void mouseExited(MouseEvent e) {
    But, I think it is difficult to write like this for each component.
    I am looking for an optimized solution so that the change will be only in one place.
    so that, It wont leads to change so many pages or so many places.
    And i have the following assumptions to do this. please let me know the possibility.
    1.Implementing custom UI class, extending the JButton/JMenuItem (As the BasicButton/MenuItemUI class does not have setEnabled() method to override) and putting this in UIManager.put("ButtonUI/MenuItemUI","CustomClass).
    2.If there is any possibility to achieve this, by just overriting any key in the UIManager
    3.By setting any client property globally.
    My requirement is to do this only at one place for entire the application.So, that we need not change all the buttoins, sya some 30 buttions are there in a dialog, then we need to override each button class.
    Please suggest me the possibilties..
    Thank you

    Hi camickr ,
    I know that to set the font we have to use component.setfont().
    But, as per my requirement,i am not setting any font to any component in my application.
    i am just passing HTML text along with FONT tags to all the components in my Application.SO, in this case we will get bold letters and that problem fixed when we set swing.boldMetal = false in UI Manager.
    But actual problem irrespective of font settings is when ever we use HTML rendered text, when the button or menuitem is disabled,then that one will not be changed to gray color. i.e., it still looks like normal controls, even it is disabled.(It is also reported as bug)
    But, as per my knowledge we can fix by overrding setEnabled or paint() methods for each and every component.
    But, if we do like that, for an application that has 200 buttons or MenuItems, it is difficult to follow that approach.
    So, We should find a way to achieve that only in one place like using UIManager or other one as i mentioned in previous posts if possible.
    I hope you understood what my problem is exactly.
    Thank You
    Edited by: sindhumourya on Mar 4, 2010 7:26 AM

  • Build a product, step by step with visuals and updated price?

    Hello all,
    What I'm looking for has probably been covered but I cannot find it in a search because it's akward to describe. It is also possible that what I'm looking for is more of a javascript than flash...but since I'm more familiar with Flash I wanted to start here. I'm hoping to find some sort of a program or generator (willing to pay) that will build a product on the screen based on sub-categories that a customer would choose. Idealy, the following would take place.
    The customer would see a blank base product on the screen
    They would select the color (color would fill the product in the picture)
    They would select additions to be added to the product and those additions would appear as selected.
    The price would update itself with each selection or extra added to the product build
    They could proceed to checkout from there.
    Here is an example (we're not selling shoes) that I believe is more detailed than what we need...but the process is similar. Time is an issue and we have a good understanding of flash design but none of us are advanced or professional actionscripters. Is there a program out there for purchase (if not freeware.....wishful thinking?.) that could give us a template to use for something like this?
    http://shop.vans.com/catalog/Vans/en_US/category/custom-shoes.html#/selectGenderAndSize
    Any help is greatly appreciated.
    Thanks!
    Jay

    i would code that all on one frame using library movieclips to create the visual display.
    the associative arrays would be used to store data about the next part to be selected given the current state of the construction.
    it's pretty hard to be more specific with such a general topic other than saying, i suspect, you will need to hire someone to do this for you.

  • How to create a custom kernel with initrd and ARCH patches

    Hi,
    I like the default kernel because everything seems to work well and I think the Arch kernel includes patches I need (such as the mactel patch). But some options that i would like to be enabled are not. in fact i would like to use powertop but i can't because it needs the CONFIG_TIMER_STATS option.
    What I would like is a kernel based on the arch kernel but with a different config file. Nothing more.
    if i look at the solution on the Wiki, I see that I have to add all patches the standard kernel have ... Moreover there is no initrd creation. i think i will need it if I use the Arch kernel configuration.
    And if i use the kernel26 PKGBUILD, I must change the package name in order to keep my current kernel. It's easy to do in the PKGBUILD but much more complicated to do it in the kernel26.install file beacuse I have to change the filenames in /boot and I do not want to replace the kernel26 files.
    So do you have any ideas how to compile my custom kernel ? Is there a better solution ?
    Thanks.
    Mildred.
    Last edited by mildred (2007-07-03 01:46:33)

    tomk wrote:It's possible I'm missing something here, but I don't understand what you're worried about. If I understand correctly, you now have a PKGBUILD and associated files for kernel26mildred (or whatever you've decided to call it). Why do you think you would have to change the files again when kernel26 is updated?
    don't the patches change from version to version?
    anyways, i was bored so i wrote a little script... edit the configuration variables at the top and it'll do the work for you. just put it in /var/abs/kernels or wherever you have the kernel26/ at, chmod +x scriptname, and run.
    if you're in /var/abs/kernels you'll probably have to run as root.
    from my testing, it seems to be all working (looking at resulting files and no errors so far from makepkg); but i'm still building my test kernel with it.
    #!/bin/bash
    # Author: kano <[email protected]>
    # Configuration #
    appendname="-custom1" # Name to append to kernel package
    BUILD=0 # Build package when done? No = 0; Yes = 1
    #MAKEPKGOPT="" # Uncomment if you're building after you make; Add any options you want passed to makepkg (can be nothing)
    # Work starts here; shouldn't have to edit anything below #
    mkdir kernel26${appendname}/
    cp kernel26/* kernel26${appendname}/
    regen_md5sum() {
    if [ ${file} != 'PKGBUILD' ]; then
    echo "Regenerating md5sum for ${file}"
    cat kernel26${appendname}/PKGBUILD \
    | sed "s/'`md5sum kernel26/${file} | awk '{ print $1 }'`'/'`md5sum kernel26${appendname}/${file} | awk '{ print $1 }'`'/;" \
    > PKGBUILD.tmp
    mv PKGBUILD.tmp kernel26${appendname}/PKGBUILD
    fi
    for file in "PKGBUILD" "kernel26.preset" "kernel26.install"; do
    echo "Editing ${file}"
    cat kernel26/${file} | \
    sed "s/kernel26/kernel26${appendname}/g" \
    | sed "s/vmlinuz26/vmlinuz26${appendname}/g" \
    | sed "s/kconfig26/kconfig26${appendname}/g" \
    | sed "s/System.map26/System.map26${appendname}/g" \
    > kernel26${appendname}/${file}
    # Regenerate md5sum
    regen_md5sum
    done
    for file in "config" "config.x86_64"; do
    echo "Editing ${file}"
    cat kernel26/${file} | \
    sed "s/CONFIG_LOCALVERSION=\"-ARCH\"/CONFIG_LOCALVERSION=\"-ARCH${appendname}\"/" \
    > kernel26${appendname}/${file}
    # Regenerate md5sum
    regen_md5sum
    done
    mv kernel26${appendname}/mkinitcpio-kernel26.conf kernel26${appendname}/mkinitcpio-kernel26${appendname}.conf
    mv kernel26${appendname}/kernel26.install kernel26${appendname}/kernel26${appendname}.install
    mv kernel26${appendname}/kernel26.preset kernel26${appendname}/kernel26${appendname}.preset
    # Add make menuconfig to PKGBUILD
    cat kernel26${appendname}/PKGBUILD | \
    sed 's/# load configuration/\n # configure kernel before build\n make menuconfig\n\n # load configuration/;' \
    > PKGBUILD.tmp
    mv PKGBUILD.tmp kernel26${appendname}/PKGBUILD
    echo "Custom kernel pkgbuild created."
    # To build or to not to build?
    if [ ${BUILD} -eq 1 ]; then
    cd kernel26${appendname}
    makepkg ${MAKEPKGOPT}
    fi

  • Problem with Checkbox and Button components....(Simple one)

    Hi all,
              As I am new to flash and ActionScript 3.0,I have the following issue regarding Flash.
              I have 2 swf files whose contents are as follows: First.swf file contains a check-box (instance name:my_checkbox).    Second.swf file contains a button component(say,label name of Submit and with instance name: submit_btn).      
             Now, my requirement is: Whenever I click the submit_btn button, then the check_box must be get selected/visible. If I click it once again, then it must get deselected/invisible. The process must be continued till I stop the click-event on button component.
       Reply me as soon as possible..  Thanks in advance...
    Srihari.Ch

    Hi Ross Ritchey,
                    I am attaching the two .fla files(with ActionScript 3.0 code in respective layers) that are resultant to your reply. (viz., CheckDemo.fla &&ButonDemo.fla respectively). Please check them once..
                       The functionality (i.e., When ButtonDemo.swf file is executed and the Submit button("myBtn") is clicked, the Checkbox component(s) present in "CheckDemo.swf" file is getting appeared in "ButtonDemo.swf" and is ready to access. Also, the selection/enability/visibility also works properly).
                       Also, check the added code.I had added all the required code to fulfil the requirement.
                       When I click the "Submit_btn", the checkbox components placed in "CheckboxDemo.swf" file are appearing in "ButtonDemo.swf". Instead, I don't need to get them.
                    So, here my requirement is: " When i click "submitButton" in ButtonDemo.swf file, then the action must be performed to the checkbox component(s) present in CheckDemo.swf file.
    Thanks a lot for your help. I am so happy with your reply, because(As you know, I am new to Flash/AS3), after a long time my is getting forward. And I hope the same form of reply to this mail or issue.
    AS3 code in ButtonDemo.fla:
              var url:String="CheckDemo.swf";
    var urlRequest:URLRequest=new URLRequest(url);
    var myLoader:Loader = new Loader();
    myLoader.load(urlRequest);
    addChild(myLoader);
    myBtn.addEventListener(MouseEvent.CLICK,doChangeCheckbox);
    function doChangeCheckbox(e:MouseEvent):void {
    (myLoader.content as MovieClip).myCheckbox.selected = !(myLoader.content as MovieClip).myCheckbox.selected;
    (myLoader.content as MovieClip).myCheckbox2.enabled = !(myLoader.content as MovieClip).myCheckbox2.enabled;
    (myLoader.content as MovieClip).myCheckbox3.visible = !(myLoader.content as MovieClip).myCheckbox3.visible;
    Srihari.Ch

  • Can you use a custom cursor with drag and drop?

    Hi there! I'm a newbie flash user and working on a simulation for a graduate course in instructional design. I'm using Flash Professional CC on Mac. Here's what I'm trying to do. I have several draggable sprites on the stage and three target sprites. I have specified the original x,y locations of the sprites and have set the end x,y locations as those of each of the three targets. Items must be dragged to one of the three targets.
    Some questions:
    1. Can I specify more than one End x,y location for a draggable sprite? I'm creating a lesson to teach kindergartners how to sort lunchroom waste. If they have a napkin, for example, it could either go into the compost OR into the recycling. In cases like this where an item could really be placed into more than one bin, I want them to get it right if they do either of those things, rather than forcing them to choose which one.
    2. To make my project more "fun" for kids, I wanted to customize the cursor with a graphic of  hand. When I tried this in the flash file it works perfectly until I add the drag and drop functionality for the wasted items. Then the cursor will more around  but not pick up any items. Once I revert back to the standard pointer, the correct drag and drop functionality is restored.
    3. I have it set to snap back to the original location if learner attempts to drop the item on the wrong target. I want to be able to play a sound file when that happens, as well as play a sound file when it lands on the correct target, as well as shrink the item and change its opacity so that it appears invisible. I want to give the illusion of it being placed into the bin. I have no idea as to the proper way to code these events so that they happen.
    4. I've watched dozens of hours of youtube tutorials before coming here. I'm a quick study, but am very new to action script. In one of the videos the developer showed referencing an external action script file which I don't think is an option in CC. The coding method he used seemed much more streamlined and "clean" than the chunks I'm working with now. Is there an easy way for me to code information about these objects  than the way I've got it here now? I hate starting new things with bad habits. The perils of self-teaching.
    Thanks!
    I'm pasting my code from the actions panel below so you can see what's going on:
    stop();
    /* Custom Mouse Cursor
    Replaces the default mouse cursor with the specified symbol instance.
    stage.addChild(customcursor);
    customcursor.mouseEnabled = false;
    customcursor.addEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor);
    function fl_CustomMouseCursor(event:Event)
      customcursor.x = stage.mouseX;
      customcursor.y = stage.mouseY;
    Mouse.hide();
    //To restore the default mouse pointer, uncomment the following lines:
    customcursor.removeEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor);
    stage.removeChild(customcursor);
    Mouse.show();
    //set up variables and objects for dragging
    var offset:int = 10;
    var appleStartX:int = 243;
    var appleStartY:int = 156;
    var appleEndX:int = 522;
    var appleEndY:int = 22;
    apple.buttonMode = true;
    apple.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    apple.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var cupStartX:int = 39;
    var cupStartY:int = 266;
    var cupEndX:int = 520;
    var cupEndY:int = 175;
    cup.buttonMode = true;
    cup.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    cup.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var barStartX:int = 178;
    var barStartY:int = 234;
    var barEndX:int = 522;
    var barEndY:int = 22;
    bar.buttonMode = true;
    bar.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    bar.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var orangeStartX:int = 284;
    var orangeStartY:int = 102;
    var orangeEndX:int = 522;
    var orangeEndY:int = 22;
    orange.buttonMode = true;
    orange.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    orange.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var bottleStartX:int = 172;
    var bottleStartY:int = 303;
    var bottleEndX:int = 520;
    var bottleEndY:int = 175;
    bottle.buttonMode = true;
    bottle.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    bottle.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var bananaStartX:int = 113;
    var bananaStartY:int = 123;
    var bananaEndX:int = 522;
    var bananaEndY:int = 22;
    banana.buttonMode = true;
    banana.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    banana.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var napkinStartX:int = 248;
    var napkinStartY:int = 271;
    var napkinEndX:int = 520;
    var napkinEndY:int = 175;
    napkin.buttonMode = true;
    napkin.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    napkin.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var yogurtStartX:int = 27;
    var yogurtStartY:int = 136;
    var yogurtEndX:int = 518;
    var yogurtEndY:int = 329;
    yogurt.buttonMode = true;
    yogurt.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    yogurt.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var strawberryStartX:int = 120;
    var strawberryStartY:int = 285;
    var strawberryEndX:int = 522;
    var strawberryEndY:int = 22;
    strawberry.buttonMode = true;
    strawberry.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    strawberry.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var sandwichStartX:int = 7;
    var sandwichStartY:int = 364;
    var sandwichEndX:int = 522;
    var sandwichEndY:int = 22;
    sandwich.buttonMode = true;
    sandwich.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    sandwich.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var juiceStartX:int = 88;
    var juiceStartY:int = 347;
    var juiceEndX:int = 518;
    var juiceEndY:int = 329;
    juice.buttonMode = true;
    juice.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    juice.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var foilStartX:int = 39;
    var foilStartY:int = 416;
    var foilEndX:int = 520;
    var foilEndY:int = 175;
    foil.buttonMode = true;
    foil.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    foil.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var waxbagStartX:int = 235;
    var waxbagStartY:int = 342;
    var waxbagEndX:int = 522;
    var waxbagEndY:int = 22;
    waxbag.buttonMode = true;
    waxbag.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    waxbag.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    function startDragging (e:MouseEvent) {
      e.currentTarget.startDrag();
    function stopDragging (e:MouseEvent) {
      e.currentTarget.stopDrag();
      switch (e.currentTarget) {
      case apple:
      if (apple.x < appleEndX - offset || apple.x > appleEndX + offset || apple.y < appleEndY - offset || apple.y > appleEndY + offset) {
      apple.x = appleStartX;
      apple.y = appleStartY;
      else {
      apple.x = appleEndX;
      apple.y = appleEndY;
      //checkGame();
      break;
      case sandwich:
    if (sandwich.x < sandwichEndX - offset || sandwich.x > sandwichEndX + offset || sandwich.y < sandwichEndY - offset || sandwich.y > sandwichEndY + offset) {
      sandwich.x = sandwichStartX;
      sandwich.y = sandwichStartY;
      else {
      sandwich.x = sandwichEndX;
      sandwich.y = sandwichEndY;
      //checkGame();
      break;
      case orange:
    if (orange.x < orangeEndX - offset || orange.x > orangeEndX + offset || orange.y < orangeEndY - offset || orange.y > orangeEndY + offset) {
      orange.x = orangeStartX;
      orange.y = orangeStartY;
      else {
      orange.x = orangeEndX;
      orange.y = orangeEndY;
      //checkGame();
      break;
      case strawberry:
    if (strawberry.x < strawberryEndX - offset || strawberry.x > strawberryEndX + offset || strawberry.y < strawberryEndY - offset || strawberry.y > strawberryEndY + offset) {
      strawberry.x = strawberryStartX;
      strawberry.y = strawberryStartY;
      else {
      strawberry.x = strawberryEndX;
      strawberry.y = strawberryEndY;
      //checkGame();
      break;
      case napkin:
    if (napkin.x < napkinEndX - offset || napkin.x > napkinEndX + offset || napkin.y < napkinEndY - offset || napkin.y > napkinEndY + offset) {
      napkin.x = napkinStartX;
      napkin.y = napkinStartY;
      else {
      napkin.x = napkinEndX;
      napkin.y = napkinEndY;
      //checkGame();
      break;
      case bar:
    if (bar.x < barEndX - offset || bar.x > barEndX + offset || bar.y < barEndY - offset || bar.y > barEndY + offset) {
      bar.x = barStartX;
      bar.y = barStartY;
      else {
      bar.x = barEndX;
      bar.y = barEndY;
      //checkGame();
      break;
      case juice:
    if (juice.x < juiceEndX - offset || juice.x > juiceEndX + offset || juice.y < juiceEndY - offset || juice.y > juiceEndY + offset) {
      juice.x = juiceStartX;
      juice.y = juiceStartY;
      else {
      juice.x = juiceEndX;
      juice.y = juiceEndY;
      //checkGame();
      break;
      case foil:
    if (foil.x < foilEndX - offset || foil.x > foilEndX + offset || foil.y < foilEndY - offset || foil.y > foilEndY + offset) {
      foil.x = foilStartX;
      foil.y = foilStartY;
      else {
      foil.x = foilEndX;
      foil.y = foilEndY;
      //checkGame();
      break;
      case banana:
    if (banana.x < bananaEndX - offset || banana.x > bananaEndX + offset || banana.y < bananaEndY - offset || banana.y > bananaEndY + offset) {
      banana.x = bananaStartX;
      banana.y = bananaStartY;
      else {
      banana.x = bananaEndX;
      banana.y = bananaEndY;
      //checkGame();
      break;
      case bottle:
    if (bottle.x < bottleEndX - offset || bottle.x > bottleEndX + offset || bottle.y < bottleEndY - offset || bottle.y > bottleEndY + offset) {
      bottle.x = bottleStartX;
      bottle.y = bottleStartY;
      else {
      bottle.x = bottleEndX;
      bottle.y = bottleEndY;
      //checkGame();
      break;
      case waxbag:
    if (waxbag.x < waxbagEndX - offset || waxbag.x > waxbagEndX + offset || waxbag.y < waxbagEndY - offset || waxbag.y > waxbagEndY + offset) {
      waxbag.x = waxbagStartX;
      waxbag.y = waxbagStartY;
      else {
      waxbag.x = waxbagEndX;
      waxbag.y = waxbagEndY;
      //checkGame();
      break;
      case cup:
    if (cup.x < cupEndX - offset || cup.x > cupEndX + offset || cup.y < cupEndY - offset || cup.y > cupEndY + offset) {
      cup.x = cupStartX;
      cup.y = cupStartY;
      else {
      cup.x = cupEndX;
      cup.y = cupEndY;
      //checkGame();
      break;
      case yogurt:
    if (yogurt.x < yogurtEndX - offset || yogurt.x > yogurtEndX + offset || yogurt.y < yogurtEndY - offset || yogurt.y > yogurtEndY + offset) {
      yogurt.x = yogurtStartX;
      yogurt.y = yogurtStartY;
      else {
      waxbag.x = waxbagEndX;
      waxbag.y = waxbagEndY;
      //checkGame();

    Some questions:
    1. Can I specify more than one End x,y location for a draggable sprite?
    yes, use an if-else statement
    I'm creating a lesson to teach kindergartners how to sort lunchroom waste. If they have a napkin, for example, it could either go into the compost OR into the recycling. In cases like this where an item could really be placed into more than one bin, I want them to get it right if they do either of those things, rather than forcing them to choose which one.
    2. To make my project more "fun" for kids, I wanted to customize the cursor with a graphic of  hand. When I tried this in the flash file it works perfectly until I add the drag and drop functionality for the wasted items. Then the cursor will more around  but not pick up any items. Once I revert back to the standard pointer, the correct drag and drop functionality is restored.
    assign your cursor's mouseEnabled property to false:
    yourcursor.mouseEnabled=false;
    3. I have it set to snap back to the original location if learner attempts to drop the item on the wrong target. I want to be able to play a sound file when that happens, as well as play a sound file when it lands on the correct target, as well as shrink the item and change its opacity so that it appears invisible. I want to give the illusion of it being placed into the bin. I have no idea as to the proper way to code these events so that they happen.
    use the sound class to create a sound:
    // initialize your correct sound once with
    var correctSound:Sound=new CorrectSound();  // add an mp3 sound to your library and assign it class = CorrectSound
    // apply the play() method everytime you want your sound to play:
    correctSound.play();
    // change an object's opacity:
    someobject.alpha = .3;  // partially visible
    someobject.alpha = 1;  // fully visible
    someobject.visible=false;  // not visible, at all.
    // change an object's scale
    someobject.scaleX=someobject.scaleY=.5;  // shink width and height by 2
    someobject.scaleX=someobject.scaleY=1;  // resize to original
    4. I've watched dozens of hours of youtube tutorials before coming here. I'm a quick study, but am very new to action script. In one of the videos the developer showed referencing an external action script file which I don't think is an option in CC. The coding method he used seemed much more streamlined and "clean" than the chunks I'm working with now. Is there an easy way for me to code information about these objects  than the way I've got it here now? I hate starting new things with bad habits. The perils of self-teaching.
    you could google: 
    actionscript 3 class coding
    actionscript 3 object oriented programming
    p.s.  you can simplify and streamline your coding by learning about arrays and using hitTestObject.

Maybe you are looking for

  • PI 7.1 CTS+ - Manually deleted object in PRD system

    Hello, We have PI 7.1 with CTS+ configured. However, there was a condition that an object was deleted manually in PRD system not via CTS+. After this all the transports that were connected to that object and transported to PRD system were imported su

  • What's the best way to cleanly stop Goldengate?

    For routine maintenance/upgrades what's the best way to cleanly stop GoldenGate? I don't want to wait endlessly. I use this currently and seen no issues :- stop er *! kill er *! stop manager! Thanks, Shankar

  • No instance created after Web client process - SOAOrderBooking sample

    Hi All, I done all process listed in SOA Tutorial, but always I create a order in Web Client application no instance is created in BPELConsole. Any idea what is this? Afonso

  • Help downloaded game and need to find out how to add to iPod

    i downloaded the new ipod mini golf and i cant seem to find out how to add it to the thing please help.

  • RMAN BACKUP Warnings

    Hi, I have these warninigs : RMAN-06207: WARNING: 3 objects could not be deleted for DISK channel(s) due RMAN-06208: to mismatched status. Use CROSSCHECK command to fix status List of Mismatched objects ========================== Object Type Filename