View State question - changing states and custom states

Hi all,
I'm working on an application that lets a user register for an event. Each event has associated child information: conferences, tickets, etc. associated with it. What I'm trying to do is create some sort of checkbox list so that, when a user clicks on an event to add it to his registration, the associated child information appears in the display so he can choose all this information at once. I have the list working and I've been trying to use a custom ItemRenderer to pop in the extra info for the user to select when he clicks on an event. The problem I'm having is that, when the user goes to click on a child to add it to his registration, my state is changing back from "selected" to "normal" and the child information disappears. So I guess I have two questions. One, am I even remotely on the right track here? If not, can someone suggest a better approach? Two, if this is the right approach, how do I solve the "disappearing child" problem? I tried creating a custom state that would set everything to visible, but I can't seem to figure out how to get into it...I tried just putting a click event on it and just doing an Alert.show(currentState) to see if I was even getting into my custom state, but I just kept switching between "normal" and "selected."
Code:
ItemRenderer:
<s:ItemRenderer name="eventItemRenderer"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
focusEnabled="false" xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:registrationapi="services.registrationapi.*">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
//this gets my data to populate the dropDown list when the parent event is selected
protected function checkbox1_clickHandler(event:MouseEvent, selectedEventCode:String):void
showPrimaryConferences = true;
getEventConferencesResult.token = registrationAPI.getEventConferences(selectedEventCode.name);
protected function comboBox_creationCompleteHandler(event:FlexEvent):void
getEventConferencesResult.token = registrationAPI.getEventConferences(data.EventCode);
]]>
</fx:Script>
<s:states>
<s:State name="normal"/>
<s:State name="hovered"/>
<s:State name="selected"/>
</s:states>
<s:Rect top="0" left="0" right="0" bottom="0">
<s:fill>
<s:SolidColor id="backgroundColor" color="0xFFFFFF" />
</s:fill>
</s:Rect>
<!-- checkmark -->
<s:Path data="M 3.5 6.5 l 2 2 l 6 -7" includeIn="selected" right="2" verticalCenter="1">
<s:stroke>
<s:SolidColorStroke weight="2" caps="square" color="0x000000" />
</s:stroke>
</s:Path>
<fx:Declarations>
<s:CallResponder id="getEventConferencesResult"/>
<registrationapi:RegistrationAPI id="registrationAPI" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
</fx:Declarations>
<s:VGroup left="3" right="10" top="3" bottom="3">
<s:CheckBox name="{data.EventCode}" label="{data.EventTitle}" id="selectedEventCode" fontWeight="bold" click="checkbox1_clickHandler(event, selectedEventCode.name)" />
<s:Label text="{data.EventTitle}" id="selectedEventCodeLabel" fontWeight.selected="bold"  />
</s:VGroup>
</s:ItemRenderer>
Thanks in advance for any suggestions!
~ amanda

I simplified the problem to it's essence and came up with this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal"
    creationComplete="init()">
    <mx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            [Bindable]
            public var lProvider:ArrayCollection;
            private function init():void
                var la:Array = [{label: "Conference", checked: true},
                                {label: "Tickets", checked: false}];
                lProvider = new ArrayCollection(la);
        ]]>
    </mx:Script>
    <mx:List id="cList" width="200" dataProvider="{lProvider}" itemClick="lProvider.refresh()">
        <mx:itemRenderer>
            <mx:Component>
                <mx:HBox width="100%">
                    <mx:CheckBox selected="{data.checked}" click="data.checked = event.target.selected"/>
                    <mx:Label text="{data.label}"/>
                </mx:HBox>
            </mx:Component>
        </mx:itemRenderer>
    </mx:List>
    <mx:VBox width="600">
        <mx:Panel title="Conference component" width="100%" height="200"
                visible="{lProvider.getItemAt(0).checked}"
                includeInLayout="{lProvider.getItemAt(0).checked}"/>
        <mx:Panel title="Ticket component" width="100%" height="200"
                visible="{lProvider.getItemAt(1).checked}"
                includeInLayout="{lProvider.getItemAt(1).checked}"/>
    </mx:VBox>
</mx:Application>
Does this help?
Dany

Similar Messages

  • Impacts in COPA of changing material and customer master data

    Dear experts,
    In my company we are considering following scenario:
    Currently mySAPerp 6.0 is implemented for all modules for the mother company.
    We have developed a new global template where there are significant changes versus the existing system, especially in the SD processes. Material and customer master also change significantly in terms of content in the tables/fields and/or values in the fields.
    The idea was to build the template from scratch in a new machine and roll-out all group affiliates, but now we are considering the possibility of making an evolutionary of the current system and try to stretch it to the processes defined in the global template.
    The scenario we want to analyze is: Keeping same organizational structure in terms of Company code, CO area and Operating Concern in existing SAP client and make an evolutionary of the existing settings to the global template processes.
    The doubts we are having are the following:
    Changing material & customer master data: Impact in COPA
    Option 1: Material master data and customer master data codes are maintained but content in the tables/fields is changed substantially, both in terms of logical content of specific fields and/or the values in the specific fields. We have following examples of changes.
    Case 1: source field in material master changes logical content. E.g. Material master field MVGR1 is currently used for product series (design line) and the content changes to be the Market Segment. The product series will be moved to a classification field. At least 5 other fields are affected by this. How can data in terms of COPA line items be converted so that they are aligned at time of reporting?
    Case 2: the source field is not changed so that the logical content of the field remains but the values change, i.e. for the same concept there will be different codifications. How can data in terms of COPA line items be converted so that they are aligned at time of reporting?
    Case 3: Characteristics where currently the source material master field is a Z field and the derivation is via table look up and where the Z field changes to a classification field. How can you convert the existing COPA line items to ensure that attributes are aligned? Should new characteristics be created or just change the derivation logic of the characteristic?
    Option 2: Material master data and customer data codes are re-created (codification of records is changed), meaning that new material and customer codes will exist and content in tables/fields is changed (as in option 1)
    Case: material and customer codes are changed. How can data in terms of COPA line items be converted so that they are aligned at time of reporting?
    Iu2019ve never phased a similar scenario and I fear that maintaining operating concern while changing source master data and also SD flows (we have new billing types, item categories, sales doc. Types, order reasons) may lead to inconsistencies and problems in COPA.
    I would like to ask you experts if you have come across a similar scenario and if from your experience, it is something feasible to do or there are many risks involved. What can be the impact of this scenario in existing Operating Concern for both option 1 and 2 and what would be the key activities to perform to adapt the existing operating concern. What will be the impact of the needed conversions on P&L reporting?
    Sorry for the long story. I hope you can help me out.
    Thanks and Regards,
    Eric

    Hi,
       First i think you will need to test if it works for new COPA documents created via billing.
      If it works fine then the issue is if you wish to apply these changes to the historical data already posted.
      Normally there are transactions like KE4S where you can repost the billing document to COPA
      However this may not be viable for bulk postings
      You can perform realignment (KEND) but this only works at the PA segment level (table CE4XXXX)
    regards
    Waman

  • Dunning Letters and Customer Statements

    Hi All
    Our client does not want to send dunning letters and statements on
    backdated invoices for a particular site or sites.
    Please any clue on how to go about it?
    Thanks in advance.
    Ify

    Hi Chery,
    Thanks for your update, Yes I have reviewed the note
    I am stuck with How to create the xdodelivery.cfg file per Oracle XML Publisher Administration
    Also can you please let me know the process of sending dunning letters automatically to the customers, As there is no standard process. I know we have to customize the process by creating bursting program and add to the request set, but I am nor aware of the process. I have seup the process till running the IEX: Send Dunnings for Delinquent Customers programm and displaying the reminders of the customers which have setup in the XML publisher
    Can you please let me know how to send dunning letters automatically to the customers
    Regards
    Vasu

  • Profit and Loss Statement vs Budget Profit and Loss Statement

    I run the P&L and the P&L Budget report for April 2010.
    On the P&L Report :
      Total Sales = R2 043 208.70
    on the P&L Budget Report :
      Total Sales = R2 043 208.70
       Budget Total Sales = R 2042 123.70
    Why will there be a difference in the Budget report for Total Sales vs Budget Total sales?
    All the accounts are marked as relevant to budget.
    Please help
    Thank you in advance
    Janice

    Hi Janice,
    Total Sales = R2 043 208.70 => your actual sales
    Budget Total Sales = R 2042 123.70 => budgeted sales
    This means that your sales  (R2 043 208.70) actually meet minimum budgeted sales (R 2042 123.70)
    Cheers

  • Conceptual question on Products and Customer Hierarchies

    I am wondering why it was first necessary to create Business Partner Hierarchies and Product Category Hierarchies in a different framework than Org Management.
    I understand Org Management, but I donu2019t see the need to recreate, for example, your customeru2019s hierarchy in BP hierarchy builder if you can do all in Org Management.
    The only current advantage I see is the fact that you can link conditions to Product Groups, and to different nodes in the BP hierarchy.
    But why was this not originally done as an enhancement to Org Management?

    By same I meant exactly the same. And that snippet-
    providing Child extends Parent - won't compileI know the snippet won't compile.
    Ah, I see. Child is less general than parent,
    therefore the one on the left is NOT more general,
    therefore it's incorrect. Makes sense.
    Inheritance is so screwy. Polymorphism is much easier
    to understand when a class implements an interface
    than when it extends another class, in my opinion.
    I wish there was a way to state the declaration in a
    sentence type structure, as I find those easy to
    understand.
    Maybe in the case of
    Parent p = new Child();one could say
    something like, "a new specialization of Parent is
    Child, p."How about "A parent, specifically a child, called p". (throws ClumsyClassnameException)
    How about the old examples?
    class Animal {}
    class Dog extends Animal {}
    Animal rover = new Dog();"I need an animal, called Rover. Specifically, I need a Dog"

  • User saves query view (web) with changed layout and opens default layout...

    Hi Guru's,
    We are implementing the new (7.0) web template and the portal. One of my users is experiencing the following:
    He runs a webquery, changes the layout in the desired format and does a save as in both My Portfolio/Bex Portfolio.
    When he opens this "changed" view (both My Portfolio, Bex Portfolio) the default format/layout is openened.
    When i open the view he created in Bex Portfolio i do see the changed format/layout ...
    We put an authorization trace on his uid -> no result. Went through the loggings both on ABAP as well as Java stack -> no result.
    Has anyone an idea what is happening.
    Regards,
    René

    Second attempt.
    Has anyone a clue or experienced the same?
    I am not able to reproduce the issue with a copy user with same authorisation.
    The issue also appears if more (mine) authorisation is granted to the user. I am not experiencing this issue
    Regards,
    René

  • Comparator question - changing Equals and HashCode too?

    Hi all I have an object test - this contains 2 variables:
    Int a; and Int b;Then there is a method called test() which returns a double and looks like this:
    public Double test()
    return a * (1d / b);
    }I have implemented the compareTo method do the "compareTo" test using the call to test() not on the fields directly e.g.
    this.test().compareTo(anotherObject.test()) instead of
    if (this.a != null && anotherDateInterval.a != null)
                compareTo = this.a.compareTo(anotherDateInterval.a);
            }Because I using the test() in the compareTo do I need to change the equals and hashcode method as well to reflect the use of test()?
    e.g.
    public boolean equals(Object obj)
       if (test() == null)
                if (other.test() != null)
                    return false;
            else if (!test().equals(other.test()))
                return false;
    }

    That depends if there are any class invarients that can be depended upon.
    The basic rule is that if .equals() returns true, then .compareTo() must return 0, but not necessarily the other way around. As long as this holds true, you don't really have to change .equals() or .hashCode(). If you're still using the identity equals method, then you probably don't have to worry about it. If you've overridden .equals() to be dependent upon a and b in some way, you probably do have to change the way .equals() works to make sure that .equals() doesn't return true if .compareTo() doesn't return 0.
    - Adam

  • Customer Statement with Consolidating BP

    If Invoice is posted to Customer who is attached to a Consolidating BP, posting of Invoice is posted to Consolidating BP only and Customer Statement does not show this Invoice for the specific Customer BP except appear in the name of Consolidating BP even if the link to Consolidating BP is removed subsequently.  New posting of Invoice to Customer after removing Consolidating BP will be posted to specific Customer but not reflected in Consolidating BP.  This has been acknowledged by SAP as a limitation as most payments received is usually payable to Consolidating BP for all related Customers.
    Kedalene Chong

    Hi Peter
    I think there is some misunderstanding as this message is different from the one about Currency.
    We need to be able to print Customer Statement by both Consolidate BP and specific Customers related to the same Consolidate BP.  Please refer to SAP Message 690264/2007
    Kedalene Chong

  • Customer statements do not tie to to other transactions

    Hi,
    The Customer Statements (ZFCS), Customer Balances (F.23), Customer Line Item display (FBL5N) and Aging Report (Z_AGING) should all tie. They do in PRD now. A document number with a Invoice reference does not show up in ZFCS. This is a partial payment. This Invoice reference doenot have an original document. The other documents do tie.
    The impact is that the customer statement balance is overstated. Please advice how to get thatdocument number in Customer Statements.
    Regards,
    Lohitha

    Hi,
    The Customer Statements (ZFCS), Customer Balances (F.23), Customer Line Item display (FBL5N) and Aging Report (Z_AGING) should all tie. They do in PRD now. A document number with a Invoice reference does not show up in ZFCS. This is a partial payment. This Invoice reference doenot have an original document. The other documents do tie.
    The impact is that the customer statement balance is overstated. Please advice how to get thatdocument number in Customer Statements.
    Regards,
    Lohitha

  • LabVIEW and custom controls

    Hi all,
    I'm an italian PhD student working with Polytechnic of Bari.
    I'd like to submit to this forum a question about LabVIEW and custom controls in form of ActiveX components.
    Some introductory word about my problem will be helpful: in the past few months here at Polytechnic of Bari my colleagues and I developed some useful ActiveX controls with custom functionalities to use in LabVIEW.
    For example we developed a "contraves", an
    "endless knob" and a useful counter with a scale very similar to that of standard gazometers or energy counters.
    However we are experimenting some difficulties with the integration of these controls in LabVIEW; the controls are correctly imported in our VIs with using the ActiveX Container but...
    in the block diagram they appear as ActiveX references and we must use property nodes to access even their most useful property (value).
    Please, do someone of you know if (and eventually how) is it possible to integrate more deeply the controls in the LabVIEW environment?
    Do someone of you know if it exist an hypothetical "Custom Controls SDK" for LabVIEW more advanced of that integrated in LabVIEW 6.0?
    Any hint would be appreciated.

    > Please can you specify in more detail how I can obtain the ActiveX
    > refnum input automatically wired to a constant (I have observed this
    > behaviour with the 3D-Graph control as you suggested). I haven't found
    > any reference in the LabVIEW on-line help about the topic "merge-VI".
    >
    The first step is to build a VI that contains the panel and diagram
    elements that you want to drop all at once. In your case, drop the
    ActiveX control at a good size, and on the diagram, you can wire it to
    helper VIs, property nodes, etc. The VI's icon and name are important
    as that is what will show up in the palette menu representing your
    control. The connector pane isn't used.
    With the VI constructed, you want to add it to the palette menu. In the
    Tools menu, Advanced, there is an item about half way down for
    Customizing the Palette menu. You will need to build a New Palette Set
    using the ring and name it whatever you like. You can now add your VI
    wherever you like. Most likely you will want to right click to add a
    new subMenu in the Controls palette and place it in a new .mnu file. In
    the subMenu, right click to add Control. The file dialog will open
    allowing you to select a control file to add to the palette. By
    changing the filter from .ctl to all, you can insert VIs into the
    controls palette.
    All VIs inserted into the Control palette will act as merge VIs, meaning
    that when dragged to a panel, the panel elements will be merged into the
    destination panel, and the diagram elements will be merged into the
    destination diagram.
    For others that want to have these on the Functions palette rather than
    the Controls, you add the VI to the Functions palette, then popup on the
    palette item and check the menu item to make it a Merge VI.
    When it comes time to distribute, you will want to give out your .mnu
    file and the VI of course. Easiest is to place both of them in
    user.lib. If you want the items to go at the top level of the palettes,
    then you can add them to add-ons inside of vi.lib, but this causes more
    upgrade challenges.
    Hope that helps.
    Greg McKaskle

  • Controls, Skins, CSS and Custom "psuedoclass" (beyond :hover, :pressed...)

    Hi All,
    If you haven't experienced control skinning via css, read about it here: http://forums.sun.com/thread.jspa?threadID=5357325&tstart=0 (thanks to tamerkarakan).
    Turns out Control has some stateful information stored in it such as hover, pressed, focused. When these are TRUE you can associated a style with that stateful presence of your Control.
    The CSS to turn MyControl from RED to GREEN when hover is (programaticaly) set to true would look something like:
    "com.myjavafxapp.control.MyControl" {
    fill: RED;
    "com.myjavafxapp.control.MyControl":hover {
    fill: GREEN;
    }What I would like to know is can I add my own "hover" equivalent? If I create a control that has stateful setting of "state"="Low:Medium:High" and I want these represented in the CSS by "Yellow, Orange, Red" how can this be done? Ideally all styling logic should be outside the control in JavaFX CSS. What I would really like to see from a CSS perspective is this....
    "com.myjavafxapp.control.MyControl" {
    "com.myjavafxapp.control.MyControl":state=low {
    fill: YELLOW;
    "com.myjavafxapp.control.MyControl":state=med {
    fill: ORANGE;
    "com.myjavafxapp.control.MyControl":state=high {
    fill: RED;
    }Can this be done?
    Cheers

    Thanks topley, that's what the fan's want alright.
    According to that I need...
    "com.myjavafxapp.control.MyControl":${state == LOW} {
    fill: YELLOW;
    "com.myjavafxapp.control.MyControl":${state == MED} {
    fill: ORAGE;
    "com.myjavafxapp.control.MyControl":${state == HIGH} {
    fill: RED;
    }But this css syntax is NOT supported in JavaFX :'( and neither is :state==High or :state=High eta. I tried adding state as a boolean and just :state {} but this gives the following exception....
    com.sun.stylesheet.UnsupportedPropertyException: java.lang.IllegalArgumentException: state
    at com.sun.stylesheet.javafx.FXObjectStyleSupport.addPseudoclassListener(FXObjectStyleSupport.java:430)
    at com.sun.stylesheet.styleable.DefaultStyleable.addPseudoclassListener(DefaultStyleable.java:184)
    at com.sun.stylesheet.PropertyManager.addPseudoclassListener(PropertyManager.java:447)
    at com.sun.stylesheet.Rule.applyTo(Rule.java:226)
    at com.sun.stylesheet.Stylesheet.applyTo(Stylesheet.java:277)
    at com.sun.stylesheet.Stylesheet.applyTo(Stylesheet.java:282)
    at com.sun.stylesheet.Stylesheet.applyTo(Stylesheet.java:257)
    at javafx.scene.Scene.applyStylesheets$impl(Scene.fx:235)
    at javafx.scene.Scene.applyStylesheets(Scene.fx:43)
    at javafx.scene.Scene.userInit$(Scene.fx:220)
    at javafx.scene.Scene.initialize$(Scene.fx:43)
    Things would probably be a little easier for me to work out if I could look at the source of Control and determine how hover, pressed and focused are implemented... even if I am limited to just discrete Boolean values for now.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • When creating a custom SearchPlugin, is it possible to add more code such as uppercase conversion of the SearchText and IF statements that change the URL depending on what is typed?

    When creating a custom SearchPlugin, is it possible to add more code such as uppercase conversion of the searchTerms and IF statements that change the URL depending on the searchTerms? Every time I try to add something firefox doesn't want to add it as a search plugin. I need to create a more powerful search tool for personal use.

    I've found some external software applications that will do it, so that leads me to believe its not possible within ID CC.

  • Gmail question.  I'm getting an error message that states my username or password are incorrect.  I haven't changed anything and the gmail is working fine on the mac book.  The mail function worked yesterday on the iphone but not today - any solutions??

    Gmail question.  I'm getting an error message that states my username or password are incorrect.  I haven't changed anything and the gmail is working fine on the mac book.  The mail function worked yesterday on the iphone but not today - any solutions??

    Try Restarting / rebooting  your Mac before doing anything more drastic..
    S.

  • Customer Statement and DI API Invoices

    Hi,
    We are running SAP Business One 2007A PL5.
    We have a number of invoices that have been created by the DI API used by the Radio Beacon/SAP interface.  These invoices are not appearing on the customer statement.
    The only noticable difference in the OINV table is that these invoices have a data source of 'O'.
    It seems the statement is not recognising invoices with a data source of 'O'.
    Has anyone else experienced this issue or have a fix for it?
    Also, we have some invoices that have 'A' for Auto Summary... out of interest, what is this exactly?
    Thanks,
    Michael

    Hi Michael,
    I am not sure what the issue is, however, there has been quite some changes to the ageing and reconciliation functionality from version 2005 SP01 to 2007, the main change between these 2 versions is actually the ageing and the reconciliation functionality. So there might be something missing in the Invoices. Also, PL5 is a pretty early version of 2007.
    Question 1 - are they appearing on the Customer Account Balance as it is opened from the BP Master Data?
    For the data source 'A', I think it stands for the 'Document Generation Wizard'.
    Thanks,
    Jesper

  • Customer Statement showing Debits (Incoming Payments) and Credits (A/R Invo

    Hi All,
    I wish to generate  a Customer Statement showing Debits (Incoming Payments) and Credits (A/R Invoices) in separate columns.
    I also wish to include an ageing report as a footer. Has any one tried this before? And which tables can give me the data fields that I need??
    Warm Regards,
    Robinson.

    Hi Robinson,
    We can do it by using the formula fields. try this senario
    1. F_038 Is the default Amount field given by the SAP which we can't Change this value this one is hard coded.
    In general tab Link this field with F_004
    2. create one formula field (i.e. ex: F_001) in repetitive area and assign this Formula in it
    Amount(F_038)
    3. Create another Formula field (i.e. ex: F_002) in repetitive area and assign this formula in it
    F_001*(-1)   in general tab link this field to the F_003
    4. Create another Formula field (i.e. Ex: F_003) in he repetitive area and assign this formula in it
    F_001<0
    5. Create another Formula field (i.e. Ex: F_004) in he repetitive area and assign this formula in it
    F_001>0
    Now you can print the debit and credit amounts separately on the PLD

Maybe you are looking for