1 Reply Latest reply on Mar 27, 2008 6:39 PM by bitwyse

    Am I being redundant?

    mattcom Level 1
      Ok, I'm building an app for work (I work for a staffing agency) to keep track of candidates for hire for a particular client.
      The main app involves the tracking of the candidate including:
      First Name - text field - validated A-Za-z
      Last Name - text field - validated A-Za-z
      Sourcer (who contacted them) [dynamic field stored in a sourcer table] - ComboBox
      Source (publication they learned about the position) [dynamic field stored in a source table] - ComboBox
      Test Date - Date field
      Test Result (whether they tested, canceled, or no-call-no-showed) [dynamic field stored in a testresult table] - ComboBox
      Test Score - text field - validated Integer
      Interview Date - Date field
      Recruiter (aka Interviewer) [dynamic field stored in a recruiter table] - ComboBox
      Interview Result (whether they interviewed, canceled, or no-call-no-showed) [dynamic field stored in a interviewresult table] - ComboBox
      Denial Reason (if they were denied, why?) [dynamic field stored in a denialreason table] - ComboBox
      Interview Score [static, 1-5 scale] ComboBox
      Interview Notes - Text Area field
      Start Date - Date field
      EOC Date (End of Contract) - Date field
      EOC Reason (why there was an EOC) [dynamic field stored in a eocreason table] - ComboBox
      I know the dynamic ComboBoxes can be created static very easy, but these are areas that will need to be changed and added to. Is this being overly cautious? Should I go static?

      If I should stay dynamic can anyone point me to a book, tutorial, blog, forum, or anything else that talks about relational databases or tables for Flex and Ruby... I already know how to do all this in Ruby/HTML/CSS but I'm starting to like Flex.
        • 1. Re: Am I being redundant?
          bitwyse Level 1
          Always go dynamic in my opinion. The easiest way to do that would be to use either a web service or an http service that returns your data in xml. The result of that call would be either an XMLListCollection or an ArrayCollection that you can bind as your combo box' dataProvider.

          You could use a labelFunction for your combo box to display specific data in the combo box.

          Here is some sample code I have used in an application I built . . .

          <mx:ComboBox id = "selectedProject"
          dataProvider="{model.getProjectControls.arrayOfProjectControlVOs}" <<== my array collection returned from my web service
          labelFunction = "getProjectLabelData" <<== This pulls the project # and project name to display in the combo box

          private function getProjectLabelData( item : Object ):String

          if( item == null )
          return "";
          return item.PCProjectID + " - " + item.PCDescription;

          Hope this helps!