Previous button of af:singleStepButtonBar in wizard yields validation error

Dear All,
In one of the JHeadstart generated wizard pages, we have included a af:selectOneChoice with required=true. When we navigate back to the previous wizard page (by clicking on the Previous button generated by the
af:singleStepButtonBar, the application correctly displays the previous page, but with an error message in the messages facet: "<fieldname> - Selection required".
This is clearly not the intended behaviour.
When we navigate back to a previous wizard page, no input or model validations should be executed and no messages should be displayed, only when navigating to the next page.
Any ideas on how we can achieve this, would be highly appreciated.
Regards,
Ibrahim

Hi Ibrahim,
This sounds like a JDeveloper/ADF issue that is not related to JHeadstart. Can you please ask this question at the JDeveloper forum at JDeveloper and ADF ? Thanks!
Regards,
Evert-Jan de Bruin
Jheadstart Team

Similar Messages

  • How can I disable the previous button in the first page and the next button in the last page?

    Hi all,
    I have created a new skin for a webhelp by modifying the layout and the buttons. However, I am not able to find a way where in we can
    disable the previous button ini the first page of the webhelp and hte the next page in the last page of the webhelp. If both the next and previous button is visibile in the first and last page, it is sort of misguiding the user.
    I am using Robohelp 9.
    Please advice.
    Thanks,
    Parag

    I think you are mixing Previous and Next in a browse sequence and the Previous and Next that you get in the browser itself.
    In a browse sequence, they are automatically disabled at the start and finish. When in the first topic in the sequence only Next will be enabled, when in the last topic only previous will be enabled.
    Previous and Next in the browser are working on the topics your user has viewed which is not the same thing.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How can i create an album with chose category list and next/previous button

    hello guys im working on a project for my uni i finished the whole website but one thing is missing
    i need to create a photo album with next and previous button, with choosing a category and inside each category i have like 5 pictures and i can change with the next/previous buttons to see another picture of the  same category.
    Please see the picture below to see what i mean.
    some told me it needs flash but i dont know how to work on it :S so plz if anyone can help me
    thank you

    Dear Mr. Murphy,
    thank you for your help.
    Actually i have tried to search for a tutorial and i found that one that was very helpful and gave me the half solution. the part i found and it worked with me is the part of the next and previous buttons and moving from an image to another.
    SO the part i still need is the list so when i click on a category i get the pictures of the chosen category, I had the idea of create a flash for each category alone and maybe i will be able to add them all together.
    But i guess it's too much work and there must be a way where i can make it all in one flash file.
    If you have any idea let me know please, thank you again for your help and i'm trying to search for the AS3 image gallery as you told me.
    Regards

  • How do I change the lable of next and previous button in GAF of FPM

    Hi Experts,
    How do I change the label of next and previous button in GAF application using FPM in each individual step?
    Thanks!

    Hello Anthony,
    as far as I am aware only the final step before the confirmation screen can be changed. Which you can do by clicking on it in the configuration view - click on the last but one step - and click on the next button - at the bottom of the screen you'll get a view where you can change the label of the step.
    There is some logic in this - in that it does make for a more consistent user experience across various apps.
    It's different to how we could do things in Java - but it's nice that there is a certain level of conformity across FPM apps.
    hope this helps,
    Cheers,
    Chris

  • Photo Gallery - Next or Previous Button

    Hi,
    I am new to Action Script and I have a small issue that I
    can't seem to figure out...
    Probably very easy for you guys... ;)
    (1)
    I have a Photo Gallery here, kinda like a Photo show and
    under the picture is a 'Next' and 'Previous' button.
    Now when the user will click on e.g. the 'Next' button I want
    the pic shown to change into the next picture.
    I have all my pics in a movieclip all with labels s1, s2, s3
    etc. ....
    I already have the code setup to go to the appropriate
    movieclip but I don't know how to tell Flash via Action Script to
    go to label "s" + 1.... meaning:
    if the picture with the label "s2" is shown right now and the
    user clicks on the 'Next' button Flash need to go to the mc with my
    pics in it and then to the label "s3" --> "s2" + 1
    How do I do that ?
    (2)
    Another thing I was thinking about:
    Let's say I have 7 pics in the photo gallery and user is
    seeing pic # 7 right now (label "s7") and he clicks the 'Next'
    button I need to tell Flash to jump to label "s1" (to the first
    pic) because there is no eigth picture...
    How is that done ?
    Note: I am using Flash 9 CS3 so either AS2 or AS3 is
    welcome...
    Any help is appreciated and I thank you in advance for that
    Mike

    quote:
    Originally posted by:
    CanonBoy
    if you go to here:
    http://www.sapphiremonkey.com/picDemo.zip
    you can download a simple Flash 8 document I made to show you
    the code.
    Kelly
    Kelly,
    thanx for your reply....
    I think we're very close but here's some more info - I
    probably should have stated that earlier... sorry ! ;)
    the thing is a little more complicated and I just wanna make
    sure I use ur code at the right spots:
    So here are the three main objects we're dealing with:
    (1) movieclip next_btn --> contains rollover and rollout
    effects for the Next button as well as an invisible button holding
    the action script for that button
    (2) movieclip 'rollover_mc' --> which will bring a nice
    rollover effect between the pics
    (3) movieclip 'pics_mc' --> contains my pictures in a
    simple timeline with labels s1, s2, s3 etc. and stop actions at
    each frame for each pic
    --> (1) and (2) are on the same level, (3) is nested
    inside of (2)
    when the user clicks (1) the 'Next' button (label: next_btn)
    the cursor in the timeline of (2) the 'rollover_mc' movieclip will
    proceed and produce nice rollover animation from one pic to the
    next pic, having (3) in the midst of the animation go from one pic
    to the next.... at least that's the idea.... ;)
    so the action script for the 'Next' button (label: next_btn)
    right now is:
    on(rollOver){
    gotoAndPlay("m1"); --> rollover effect for the next
    button
    on(releaseOutside, rollOut){ --> rollout effect of the
    next button
    gotoAndPlay("m2");
    on(release){
    this.pics_rollover_mc.gotoAndPlay("p1");
    --> p1 is the label of the frame where the cursor will
    jump to and start the rollover animation --> that works ;) haha
    while the animation is rolling over to the next pic and it is
    just covering the actual picture that was just shown, the cursor
    (runnning through the timeline in the (2) 'rollover_mc' movieclip)
    will hit a key frame with an action script in it...
    and in that action script I need to tell Flash to go to (3)
    the movieclip with my pics in it (label: pics_mc which is nested in
    that timeline) and go from let's say "s2" PLUS ONE to label "s3"
    (the next pic in the series)...
    right now the code in that keyframe is:
    this.pics_mc.gotoAndPlay("s2")
    which means it only shows (after the animation) Pic2 (label:
    s2)
    now the code that you gave does make sense to me but where do
    I need to put which parts ?
    here's your code again:
    stop();
    _global.n = 1;
    _root.next_mc.onRelease = function() {
    n = n+1;
    if (n == 5) {
    n = 1;
    _root.pics_mc.gotoAndStop("s"+n);
    For example, the establishing code for the variable n....
    where do I need to put this code so it is globally valid ?
    I pasted it into the action keyframe of my next_btn, so the
    code looked like this:
    on(rollOver){
    gotoAndPlay("m1");
    on(releaseOutside, rollOut){
    gotoAndPlay("m2");
    _global.n = 1;
    _root.next_btn.onRelease = function() {
    n = n+1;
    if (n == 5) {
    n = 1;
    _root.pics_mc.gotoAndStop("s"+n);
    and it gave me the following error message:
    **Error** Symbol=1.2 next_btn, layer=invisible_btn,
    frame=1:Line 7: Statement must appear within on handler
    _global.n = 1;
    **Error** Symbol=1.2 next_btn, layer=invisible_btn,
    frame=1:Line 8: Statement must appear within on handler
    _root.next_btn.onRelease = function()
    my (amateurish) opinion is that the part
    _root.pics_mc.gotoAndStop("s"+n); has to go into the action
    script keyframe that the cursor will hit when running through the
    timeline in the (2) rollover_mc movieclip
    therefore if u wanna start the animation when u click the
    button u would have to change your code that u paste into the
    next_btn keyframe:
    on(rollOver){
    gotoAndPlay("m1");
    on(releaseOutside, rollOut){
    gotoAndPlay("m2");
    _global.n = 1;
    _root.next_btn.onRelease = function() {
    n = n+1;
    if (n == 5) {
    n = 1;
    _root.pics_rollover_mc.gotoAndPlay("p1");
    I did that but it still gives me the above error message....
    Thanx for your help in advance ! ;)

  • Photo Gallery ....disable a previous button once it reaches img zero

    I have made a simple photo gallery that reads from external XML file. The gallery allows the user to see the next image by clicking the next button as well as the previous image by clicking the previous button.
    I need a bit of code that would disable the previous button when its at the first image, and disable the next image once the user is on the last image.
    This is what I have thus far:
    var xmlRequest:URLRequest = new URLRequest("wImgData.xml");
    var xmlLoader:URLLoader = new URLLoader(xmlRequest);
    var imgData:XML;
    var imageLoader:Loader;
    var rawImage:String;
    var rawH:String;
    var rawW:String;
    var imgNum:Number = 0;
    var checkSec:Timer = new Timer(1);
    var numberOfChildren:Number;
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoadedF);
    next_btn.addEventListener(MouseEvent.CLICK, nextImgF);
    prev_btn.addEventListener(MouseEvent.CLICK, prevImgF);
    master_mc.buttonMode = true;
    function xmlLoadedF(event:Event):void{
        checkSec.start();
        checkSec.addEventListener(TimerEvent.TIMER, checkerF);
        imgData = new XML(event.target.data);   
    function packagedF():void{
        checkSec.start();
        checkSec.removeEventListener(TimerEvent.TIMER, checkerF);
        rawImage = imgData.image[imgNum].imgURL;
        numberOfChildren = imgData.*.length();
        rawW = imgData.image[imgNum].imgW;
        rawH = imgData.image[imgNum].imgH;
        imageLoader = new Loader;
        imageLoader.load(new URLRequest(rawImage));
        master_mc.addChild(imageLoader);
        imageLoader.x = (stage.stageWidth - Number(rawW)) /2;
        imageLoader.y = (stage.stageHeight - Number(rawH)) /2;
    function checkerF(event:TimerEvent):void{
        if(imgNum == 0){
            packagedF();
        }else if(imgNum < numberOfChildren){
            imageLoader.unload();
            packagedF();
        }else{
            imageLoader.unload();
            imgNum = 0;
            packagedF();
    function nextImgF(event:MouseEvent):void{
        checkSec.addEventListener(TimerEvent.TIMER, checkerF);
        imgNum++;
    function prevImgF (event:MouseEvent):void{
        checkSec.addEventListener(TimerEvent.TIMER, checkerF);
        imgNum--;

    All you need to do is remove the listeners in the event handlers for the buttons. I'll use previous as an example.
    function prevImgF (event:MouseEvent):void{
        checkSec.addEventListener(TimerEvent.TIMER, checkerF);
        imgNum--;
         if(imgNum == 0){
              //at first
              prev_btn.removeEventListener(MouseEvent.CLICK, prevImgF);
    You'd do the same to the next button's listener when the imgNum == the number of images. You'll also need to add the previous listener back to the button when they press next.

  • Previous Button applying previous adjustments to multiple photos for some reason

    So yesterday I was editing tons of photos, using the Previous Button once at a time to add the previous photo's adjustments to the next selected photo and everything was a great.
    Today I hit Previous and the selected photo AND every photo after it gets adjusted.
    What could I have possibly hit to change the behavior of the button?
    Thanks!

    No, to the left of the Sync button is a button that says Previous. It's a pretty popular feature. If you only have one image selected it becomes an active clickable button and applies any adjustments from the last photo you messed with to the currently viewed photo. Sort of like a single one at a time sync. It randomly stopped behaving the way it's supposed to (after 48 hours or so of working the right way) and started working more like the Sync button and I'm trying to find out what could have changed and get it back to working right.

  • "Previous" Button has disappeared

    I'm on Windows XP Pro, 2 Gig RAM, Raid 1 (2 36GB Raptors), 500 GB in HD on two drives, Externals total 1 Tb. My Lightroom is the trial version downloaded last week (May 18th or thereabouts). I am a professional photographer. www.twmeyer.com.
    Here's my problem:
    the "previous" button is not showing up in the "Develop" module, and even though the help files say
    "In the Develop module, click the Previous button to the right of the toolbar, or choose Develop > Paste Settings From Previous.
    there is no "Previous" button, and the Help menu further states
    "When multiple photos are selected in the Filmstrip, the Previous button in the Develop module turns into the Sync button."
    But I can't tell how to select (aside from just clicking on an image), if multiples are selected, or how to de-select (aside from clicking on a different image). Just above the Filmstrip, in the area where the filter settings are, it is indicated that I am in a particular collection, that there are 709 photos in that collection and they are all selected: "709 photos / 709 selected".
    I suspect this "selection" is what's causing the problem, as in "When multiple photos are selected in the Filmstrip, the Previous button in the Develop module turns into the Sync button"... which is exactly what I'm looking at... The coveted "Previous" button is now the unattractive "Sync" button.
    Any other ideas?.
    I don't want to have to Cnrtl>Alt>V my way through hundreds... thousands of images. The advantage of the previous button is that each image is not exactly like the next, but the next is frequently very similar to the previous one (within a relatively contiguous set of moments), so I can correct the first in a series of images in a complex manner, move to the next image and click "Previous" and then apply the minor tweak necessary. This, rather than go through all the different settings on every image.
    Since it is, from one photo to the next, an incremental and shifting change (like getting closer to a window, or perhaps a cloud goes by that window, or moving deeper into a tungsten lit room) it doesn't make sense to apply any one set of corrections to all the photos in these "real world" images (not studio lit). I want to fluidly move through the collection bumping exposure on this one, apply those changes to the next image and maybe bump the WB on it, and so on.
    I want the "darned" :^) "Previous" button!... Help!... t

    and solved. It was some sort of locked on selection. I'm not sure the problem started, but it may be connected to the library being reconfigured. It (the Library) was on the C drive but the images were on an external that is turned on and off as needed. This may have caused some conflict that I haven't the tech-head to noodle out.
    I just got another 500G External drive that I plan to dedicate to the Lightroom Library and all new images for editing. Does this mean I have to delete and re-import again? or can I move it from my C drive otherwise, somehow? I plan to generate sidecars with all new imports, hoping that I will then be able to move the images to other externals (and optical disks) for archiving, and carry them to my studio computer with LR data intact. This archiving and pass through will be of both original NEF files and derivative PSDs and JPGs. Workable?
    I will be getting (and reading) Martin Evening's Lightroom Book before taking any more significant actions. It was in his PDF download (and from Ellis V) that I discovered the idea of locating the Library in an external or secondary HD, rather than in the default location on my precious C drive.
    Thanks again for all who tipped in on this issue and who might address these secondary issues (or should they be another thread?)... t

  • "Previous" button suggestion.

    (Yes, I will post this in the 'official' suggestions form... just thought that I would mention it here also.)
    Since we often work in studio, the photos tend to develop similarly, but not exactly the same. The photos tend to 'trend' in one direction, and then start changing in a different direction, with small changes of develop settings taking place from one photo to the next.
    We could use the "Copy" and "paste" function from one photo to the next, but when working through photos, the "Previous" button is much more convenient. What "Previous" does is copy ALL of the develop settings from the previously selected photo to the currently selected photo... but it is an "all or nothing" situation.
    The problem is that "Previous" copies thing like "Spot Removal", "Brush Tool", "Cropping", etc that are not necessarily items that you would want to carry over from one photo to the next, since they don't really match up between images.
    It would be great if there was a way to setup the "Previous" button just like the "Copy" button, where only specific items are transferred from one photo to the next when pressing "Previous". Maybe pressing "CTRL-Previous" could bring up a setup menu?
    It is a minor thing , but it would greatly simplify the workflow.

    GAP -
    Using SYNC is waaay to much work when going from photo to photo. SYNC is good for base adjustments, like color balance, base sharpening, etc.
    IMHO, SYNC is only really useful if you have to make a similar adjustment to many photos, based on a specific parameter. For example, if you want to apply additional noise reduction to all the photos shot at ISO 1600 with a specific camera, SYNC is the correct tool.
    But when you have to fine tune many photos in a series, going to the next photo and pressing "Previous" to get you in the general ballpark is often the best choice, since if the photos are similar the adjustments will probably be similar, except for special stuff like brushes, spotting and cropping.
    Adding a 'carry over' menu to "Previous" shouldn't be that hard, and it would certainly increase the usefulness of that function.

  • Next / Previous button throwing an error. Please help

    I wrote this next previous button code and it is throwing an
    error. I don't understand why or what I am missing.
    I want it to show 4 records for a page. Here is my code and
    the error.
    Code:
    <cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
    <cfquery name="feat" datasource="#sitedatasource#"
    username="#siteUserID#" password="#sitePassword#" maxRows=4>
    SELECT feature.title AS ViewField1, feature.MYFile AS
    ViewField2, feature.ID AS ID
    FROM feature
    </cfquery>
    <cflock timeout="2" scope="application"
    type="READONLY">
    <cfset application.feat=feat>
    </cflock>
    <cfset MaxRows_feat=4>
    <cfset
    StartRow_feat=Min((PageNum_feat-1)*MaxRows_feat+1,Max(feat.RecordCount,1))>
    <cfset
    EndRow_feat=Min(StartRow_feat+MaxRows_feat-1,feat.RecordCount)>
    <cfset
    TotalPages_feat=Ceiling(feat.RecordCount/MaxRows_feat)>
    <cfset QueryString_feat=Iif(CGI.QUERY_STRING NEQ
    "",DE("&"&CGI.QUERY_STRING),DE(""))>
    <cfset
    tempPos=ListContainsNoCase(QueryString_feat,"PageNum_feat=","&")>
    <cfif tempPos NEQ 0>
    <cfset
    QueryString_feat=ListDeleteAt(QueryString_feat,tempPos,"&")>
    </cfif>
    <cflock timeout="2" scope="application"
    type="READONLY"><cfoutput query="feat"
    maxrows="4">#ViewField1#</cfoutput></cflock>
    <cfif PageNum_feat GT 1>
    <a
    href="#CurrentPage#?PageNum_feat=#Max(DecrementValue(PageNum_feat),1)##QueryString_feat#"
    onmouseout="MM_swapImgRestore()"
    onmouseover="MM_swapImage('Previous','','../img/previous-over.gif',1)"><img
    src="../img/previous.gif" alt="Previous Records" name="Previous"
    width="96" height="27" border="0" id="Previous" /></a>
    <cfif PageNum_feat LT TotalPages_feat>
    <a
    href="#CurrentPage#?PageNum_feat=#Min(IncrementValue(PageNum_feat),TotalPages_feat)##Quer yString_feat#"
    onmouseout="MM_swapImgRestore()"
    onmouseover="MM_swapImage('next','','../img/next-over.gif',1)"><img
    src="../img/next.gif" alt="Next Record" name="next" width="96"
    height="27" border="0" id="next" /></a>
    The Error:
    Variable PAGENUM_FEAT is undefined.
    The error occurred in
    C:\Websites\x9vdzd\feature\featured.cfm: line 8
    6 : </cfquery>
    7 : <cfset MaxRows_feat=4>
    8 : <cfset
    StartRow_feat=Min((PageNum_feat-1)*MaxRows_feat+1,Max(feat.RecordCount,1))>
    9 : <cfset
    EndRow_feat=Min(StartRow_feat+MaxRows_feat-1,feat.RecordCount)>
    10 : <cfset
    TotalPages_feat=Ceiling(feat.RecordCount/MaxRows_feat)>
    I thought I had it defined! What am I missing?
    Thanks
    Phoenix

    that is strange... it should work fine - it does in my tests.
    here is somewhat updated & modified code to try. i have
    included
    comments to try and explain what is being done.
    basic logic is as follows:
    -form is submitted
    -check if file has been selected
    -try uploading new file
    -if new file upload succeeds, delete old file if it exists
    (as part of
    updating existing record, as new records obviously would not
    have any
    old image)
    -update/insert record data as necessary
    here's the code:
    <cfif isdefined("form.feat_OK")><!--- form submitted
    --->
    <!--- set file uploading vars --->
    <cfparam name="fileuploaded" type="boolean"
    default="false">
    <cfparam name="uploadedfile" default="">
    <cfset pathToFile = "c:\websites\x9vdzd\img\feature\">
    <!--- --->
    <cfif len(trim(form.MYFile))><!--- if a file has
    been selected --->
    <!--- try uploading new file --->
    <cftry>
    <cffile Action="upload" filefield="MYFile"
    accept="image/gif,
    image/jpg, image/jpeg, image/pjpeg"
    destination="#pathToFile" nameconflict="MAKEUNIQUE">
    <cfset fileuploaded = true>
    <cfset uploadedfile = cffile.serverfile>
    <cfcatch type="any">
    <!--- if upload did not suceed, reset file uploading vars
    --->
    <cfset fileuploaded = false>
    <cfset uploadedfile = "">
    <!--- this can be further enhanced by setting some var to
    hold error
    message and return it to user --->
    </cfcatch>
    </cftry>
    </cfif>
    <cfif form.id gt 0><!--- we are updating an
    existing record --->
    <!--- if new file upload was successful and the feature
    has an image
    associated with it - delete old image --->
    <cfif fileuploaded is true AND
    len(trim(form.oldimage))>
    <cfif FileExists(pathToFile & form.oldimage)>
    <cffile action="delete" file="#pathToFile &
    form.oldimage#">
    </cfif>
    </cfif>
    <cfquery datasource="#sitedatasource#"
    username="#siteUserID#"
    password="#sitePassword#">
    UPDATE feature
    SET
    feature.title=<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.title#">,
    feature.Body=<cfqueryparam cfsqltype="cf_sql_longvarchar"
    value="#form.PDSeditor#">,
    feature.MYFile=<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#uploadedfile#" null="#NOT fileuploaded#">
    WHERE ID = <cfqueryparam value="#form.ID#"
    cfsqlType="CF_SQL_INTEGER">
    </cfquery>
    <cfelse><!--- we are inserting a new record --->
    <cfquery datasource="#sitedatasource#"
    username="#siteUserID#"
    password="#sitePassword#">
    INSERT INTO feature
    (title, body, MYFile)
    VALUES
    (<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.title#">,
    <cfqueryparam cfsqltype="cf_sql_longvarchar"
    value="#form.PDSeditor#">,
    <cfqueryparam cfsqltype="cf_sql_varchar"
    value="#uploadedfile#"
    null="#NOT fileuploaded#">)
    </cfquery>
    </cfif>
    <!--- relocate user to previous page after insert/update
    --->
    <cflocation url="feature-manager.cfm">
    </cfif>
    hth
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Next previous button in gallery

    Hi guys, been a while, hope everyone is well.  I am having a problem implementing a next/previous button on an image once it has been enlarged in my gallery.  I have done it in pure as3 but all tutorials seem to use the timeline.  I will post my code underneath so you can see what I am up too.  The next/previous button should I think be added to the modelClicked function.
    From what I understand, I will get a next/previous button and turn them into a button object.  I will then delete them from my stage and instantiate them within the class below.  I would then add them to the modelClicked function with events tied to them.  What should I then do in these events to make it fit in with the code below?
    Any advise appreciated,
    Cheers
    Nick
    package classes.models
        import flash.display.Bitmap;
        import flash.display.Loader;
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import flash.geom.Rectangle;
        import flash.events.MouseEvent;
        import flash.events.Event;
        import flash.net.URLRequest;
        import eu.flashlabs.ui.BasicButton;
        import classes.ui.StateClip;
        import classes.ui.Placeholder;
        import classes.utils.URLUtil;
        import classes.vo.ModelsStates;
        import fl.containers.ScrollPane;
        import fl.controls.ProgressBar;
        import com.greensock.TweenLite;
        public class IndividualModel extends StateClip
            // CONSTANTS
            private static const PADDING_TOP:Number= 28;
            private static const PADDING_LEFT:Number= 50;
            private static const COLS:int= 4;
            private static const ROWS:int= 8;
            private static const GAP_HORIZONTAL:Number= 5;
            private static const GAP_VERTICAL:Number= 5;
            // MEMBER VARIABLES
            private var _data:XML;
            public function get data():XML
                return _data;
            public function set data(value:XML):void
                setData(value);
            private var items:Array;
            private var backBtn:BasicButton;
            private var itemsHolder:MovieClip;
            private var loadIndex:int;
            private var sp:ScrollPane;
            private var clonedBitmap:Bitmap;
            private var originalBitmap:Bitmap;
            private var rect:Rectangle;
            private var screen:Sprite = new Sprite();
            public function IndividualModel()
                super();
                items = [];
                addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
            private function addedToStageHandler(event:Event):void
                initChildren();
            private function initChildren():void
                itemsHolder = new MovieClip();
                addChild(itemsHolder);
                sp = getChildByName("mc_pane") as ScrollPane;
                backBtn = getChildByName("btn_back") as BasicButton;
                backBtn.addEventListener(MouseEvent.CLICK, backBtn_clickHandler);
                screen.graphics.beginFill(0x111111, .75);
                screen.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
                screen.graphics.endFill();
            public function destroy():void
                clearItems();
            // PUBLIC INTERFACE
            // LAYOUT
            private function clearItems():void
                while (items.length > 0)
                    var item:ModelsItem = items.pop() as ModelsItem;
                    itemsHolder.removeChild(item);
                    item.destroy();
            private function populateItems():void
                for (var i:int = 0; i < Math.min(COLS * ROWS, data.picture.length()); i++)
                    var item:ModelsItem = new ModelsItem();
                    item.data = data.picture[i];
                    item.x = PADDING_LEFT + (i % COLS) * (ModelsItem.ITEM_WIDTH + GAP_HORIZONTAL);
                    item.y = PADDING_TOP + Math.floor(i / COLS) * (ModelsItem.ITEM_HEIGHT + GAP_VERTICAL);
                    /*item.addEventListener(MouseEvent.CLICK, modelClicked);*/
                    itemsHolder.addChild(item);
                    /*item.mouseEnabled = false;*/
                    sp.source = itemsHolder;
                    items.push(item);
                sp.verticalScrollPolicy = "on";
                sp.horizontalScrollPolicy = "off";
                sp.update();
            // PICTURE LOADING
            private function loadNextPicture():void
                if (loadIndex < items.length)
                    var loader:Loader = new Loader();
                    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadNextPicture_completeHandler);
                    var item:ModelsItem = items[loadIndex] as ModelsItem;
                    loader.load(new URLRequest(URLUtil.getURL([email protected]())));
                    /*item.mouseEnabled = true;*/
            private function loadNextPicture_completeHandler(event:Event):void
                event.target.removeEventListener(Event.COMPLETE, loadNextPicture_completeHandler);
                ModelsItem(items[loadIndex]).bitmap = event.target.content as Bitmap;
                ModelsItem(items[loadIndex]).addEventListener(MouseEvent.CLICK, modelClicked);
                loadIndex++;
                loadNextPicture();
            // EVENT HANDLERS
            private function backBtn_clickHandler(event:MouseEvent):void
                state = ModelsStates.HIDDEN;
            private function modelClicked(e:MouseEvent):void
                stage.addChild(screen);
                var item:ModelsItem = e.currentTarget as ModelsItem;
                originalBitmap = item.bitmap;
                clonedBitmap = new Bitmap(originalBitmap.bitmapData.clone());
                stage.addChild(clonedBitmap);
                rect = originalBitmap.getBounds(stage);
                clonedBitmap.x = rect.x;
                clonedBitmap.y = rect.y;
                clonedBitmap.width = rect.width;
                clonedBitmap.height = rect.height;
                clonedBitmap.smoothing = true;
                TweenLite.to(clonedBitmap, 1, { x: (stage.stageWidth - originalBitmap.width) / 4, y: (stage.stageHeight - originalBitmap.height) / 6, onComplete:zoomInFinished, scaleX: 1, scaleY: 1 });
            private function zoomInFinished():void
                trace("Zoom In Finished");
                stage.addEventListener(MouseEvent.CLICK, mouseClicked);
            private function mouseClicked(e:MouseEvent):void
                TweenLite.to(clonedBitmap, 1, { x: rect.x, y: rect.y, onComplete:zoomOutFinished, width: rect.width, height: rect.height});
                stage.removeEventListener(MouseEvent.CLICK, mouseClicked);
            private function zoomOutFinished():void
                trace("Mouse Clicked");
                stage.removeChild(screen);
                stage.removeChild(clonedBitmap);
            // GETTERS & SETTERS
            private function setData(value:XML):void
                _data = value;
                clearItems();
                populateItems();
                loadIndex = 0;
                loadNextPicture();
                state = ModelsStates.SHOWN;
            // UTILS
            override protected function animateInComplete():void
                super.animateInComplete();
                switch (state)
                    case ModelsStates.SHOWN :
                        break;
                    case ModelsStates.HIDDEN :
                        break;

    I don't actually know how you're loading your data.  It's also very difficult to figure out what's happening in your code, since you're extending Classes you don't show. What I can tell you is that you need to store the data about iterating each collection at the level where it's needed. You may want to look at the composite pattern http://www.as3dp.com/2007/05/composite-pattern-book-part-1/ .
    In my opinion, the biggest problem you have is poor separation of concerns--you call things Models that are clearly Views, and because you are storing relevant data in Views rather than simply using your Views to represent data, you're making the task of representing and iterating through your data much harder than it needs to be.
    The ideal structure would be a data structure that has data for each thumbnail in some sort of collection, like an Array or Vector. This data structure would only be responsible for storing the data and maintaining a pointer to the currently selected thumbnail.  When the pointer changes, the data object dispatches a change event, so Views that care about this pointer can update. Each piece of data could then have a member variable that is one of these collections that manages the correct pointer.  That's where the composite pattern comes in.
    Now, the task of building your Views becomes much easier. You have one View that gets a collection and shows all the thumbnails and one View that gets a specific thumbnail, mix and match as needed. The Views, again watch the change event and do whatever they need to do when the pointer changes.
    At this point, who sets the pointer ceases to matter. It can be inside one of your Views or outside any of your Views--when the pointer changes, the View that is watching that particular collection will update, and if the result of that update is that a nested View then watches a different collection, that's ok--it still follows the same principles.

  • How to make next and previous button function

    Hello
    Can anybody help me with how to achieve next and previous button function such as the one at www.bestbuy.com?
    I would appreciate any help or suggestion.
    Thank you!

    if you're not familiar with flash it might be easiest to place your initial "page" in frame 1, the 2nd (or next) page in frame 2, the 3rd/next page in frame 3 etc.
    place your previous and next buttons in their own layer that spans the main timeline (which will have as many frames as you have "pages").  give them instance names (say prevBtn and nextBtn).
    you can then use the following code placed in frame 1:
    var tl:MovieClip=this
    prevBtn.onRelease=function(){
    tl.prevFrame();
    nextBtn.onRelease=function(){
    tl.nextFrame();

  • Help..on Next n Previous Button

    hi..can anyone help me...on the "Next" and " previous" button...
    whe i click next or previous, i can view the next n previous picture...
    my picture name is not is sequence(some of the filename missing)...
    now i kept it in a masterList array the filename..so that when i can call it..
    the file name been keept as
    0001.gif
    0002.gif
    0010.gif
    2004.gif
    now im the actionPerforme, i need to code where when i click the button next or previous, it able to view...
    this is the code that i try but i dont have any idea how to view the image..
      else if (e.getSource() == jbtNext)
                   // for loop to read the picture location
                   for(int c=1; c<masterList.length; c++)
                        File f = new File ("D:/nita/eclipse workspace/bufferedReader/image" + c + ".gif");
                        //load
                        try
                                  BufferedImage bufferImage1 =ImageIO.read(f);
                                  //display
                                  //currentIndex = (currentIndex + 1) % totalNumImage;  //check the non-negative
                                  //jlblImageViewer1.setIcon(imageIcon1[currentIndex]);
                                  //JLabel label = new JLabel(new ImageIcon(image_or_url));
                             //imageIcon1 = ImageIO.read(new File("D:/nita/eclipse workspace/bufferedReader/image" + c + ".gif"));
                        catch (IOException eee)
                             }  this code for the masterList[]
           // null value been assign to masterList
              for (int a=0; a<masterList.length; a++)
                   masterList[a] = null;
              //2nd array list -- listOfFiles               
              File folder = new File("D:/nita/eclipse workspace/bufferedReader/image");
             File[] listOfFiles = folder.listFiles();
             for (int u=0; u<listOfFiles.length; u++)
             //for the listOfFiles get the filename
             String aaa = listOfFiles[u].getName();
             char[] bbb =   aaa.toCharArray(); // turn the name to char
             //assign 0-3 index
             char first = bbb[0];
             char second = bbb[1];
             char third = bbb[2];
             char fourth = bbb[3];
             //convert form char to string         
             String s1=String.valueOf(first);
             String s2=String.valueOf(second);
             String s3=String.valueOf(third);
             String s4=String.valueOf(fourth);
             //put all the value of s1-s4 in xxx
             String y = new String (s1 + s2 + s3 + s4 );
                   //validation for the first letter (only digit allow)
                   if (Character.isLetter(first))
                   else
                             int yInt = Integer.parseInt(y);   //convert to integer
                             //  the int will be your index for the list
                             masterList[yInt] = aaa;
              }//end of FOR loop
             //put everything back to masterList ... did not display the null value...
              for (int h=0; h<masterList.length; h++)
                    if (masterList[h] != null)
                         System.out.println(masterList[h]);
                 }  hope someone can help me

    Increment or decrement the index of the array and load the image from the indexed file.
    When you post a code, use code tag pair. Click the CODE icon on the taskbar.

  • Next and previous button

    Hi,
    Just got back from the APEX class. Very new at this.
    I just created two button called PREVIOUS AND NEXT. When I press PREVIOUS or NEXT button I want it to go to previous or next record within the same form page.
    What do I have to do to make it functional in APEX. I mean, what code,processes is needed and how to do it.
    I would appreciate it if someone has done it and maybe show me the code/process of how to do it. Maybe they can share their application on apex.oracle.com.
    Please let me know.
    Appreciate a lot
    Munish
    Edited by: user4848861 on Sep 4, 2009 8:37 AM

    Hi,
    When I first come to a page, I show an interactive report. Interactive report has an edit button.
    When user clicks on the edit button, it goes to a form where user can edit the record.
    Once the user edits the record, they want to go to the next or previous record. What needs to be done on next and previous button to accomplish that.
    For eg. If I am on record 1, when I press NEXT I should go to record 2.

  • Next and Previous button on detail page

    I am new to Apex development and have a need to develop an application that has 2 pages. The first page displays a list of employees for instance and allows the user to sort the list on difference columns e.g., first name, last name, salary etc. The user then clicks on a employee and navigates to a second page which shows the details of the employee that the user can update and save. The second page should also include Next and Previous buttons which show the details of the next or previous employee from the SORTED list on the first page so that the user can avoid constantly switching between the two pages. How do I implement this? I thought of using collections but I don't know how to populate the collection when the user navigates out of the first page and how to reference the collection on the second page. Note that in the real application there could be a large number of rows on the first page (a few thousand) and response time is critical. Any help would be much appreciated. I am using Apex 2.2.
    Thanks
    Sadanand

    Thanks Anton. And apologies for the delay in responding to your message. I will give it a try soon.
    On a related note and as alternate implementation (i.e. not using collections), is it possible to have a tabular form (showing only one row) on the second page using the same query and filter/sort conditions as the first page with an additional feature that the first time the page is displayed, the record selected on the first page is the one shown in the tabular form? I can then use the default Next and Prev buttons of tabular forms to navigate through the records in exactly same order as the first page (assuming ofcourse that new rows have not been added by an external process in the meantime). I hope I am clear in my description.
    Thanks for your help.
    Regards
    Sadanand

Maybe you are looking for

  • [SOLVED] ATI Catalyst / Xorg issue with Multihead (3monitor)

    i'm having problems for a long time, with different versions of the ATI Catalyst driver and Xorg, right now i'm using this versions, catalyst-hook 11.2-2 catalyst-utils 11.2-1 lib32-catalyst-utils 11.2-1 xorg-server 1.9.4.901-1 xorg-server-common 1.9

  • Does Adobe Reader support 64-bit IE versions?

    When opening a pdf from 64 bit IE, the links in the pdf document don't work. I've had to use the 32 bit IE 9 client and then the links work fine.  Is there any way getting around having to use two versions of IE?

  • Hierarchical table in Adobe

    Hi All,           I want to know is there any work around to create a Hierarchical table in Adobe Interactive Forms?I need 2 levels of hierarchy(means 2 master columns in a single table) regards Sumit

  • Business Intelligence BlockMixedArchitectureInstall Error

    Hi, when installing the SSDTBIVS2012 Business Intelligence Studio I always get a very useless "BlockMixedArchitectureInstall" error that tells me I should add some functionality to my SQL-Server instance, but does not tell me at all what functions an

  • Photoshop + Premiere Elements 11 not launching/registering/opening?

    Dear Community, I have researched the above topic in many forums but could not find any solution? Bought the elements PSE & PRE on CD, have the serial numbers. I am running Windows 8 (64bit) and have installed both PSE and PRE on Program Files (x86).