Dynamic AS State Creation with SetProperty not working...

I am trying to create a website that dynamically creates multiple states for content, download links, and contact info.  The reason I am using AS3 to create these states is because, in addition to reformatting/moving the UI/navigation elements, the states will also have content dynamically loaded at run-time from XML files (therefore cannot be hard-coded with MXML tags)
Before I focus on reading the XML files for adding children in each state, I want to get the basic UI buttons and elements to move into desired positions in the Canvas using SetProperty for x and y on three buttons (Services, Downloads, and Contact)
On initialization of the Application, I call the following:
import mx.states.*; import mx.controls.Button; // Define variables private var newState:State; private var setXPropServices:SetProperty; private var setYPropServices:SetProperty; private var setXPropDownloads:SetProperty; private var setYPropDownloads:SetProperty; private var setXPropContact:SetProperty; private var setYPropContact:SetProperty; private function createStates():void {                  // Create and add the view states to the states Array.                 states = new Array();                 states.push(serviceState());                 states.push(downloadState());                 states.push(contactState());                                 //Create Transitions for each state; this must be dynamically created to reflect all AddChild elements to fade-in                 // createTransitions();             } private function downloadState():State {                //Configure the bServices properties                 setXPropServices = new SetProperty();                 setXPropServices.name ="x";                 setXPropServices.value = bServices.width/4;                 setXPropServices.target = bServices;                 setYPropServices = new SetProperty();                 setYPropServices.name ="y";                 setYPropServices.value = cMain.height/4;                 setYPropServices.target = bServices;                                 //Configure the bDownloads properties                 setXPropDownloads = new SetProperty();                 setXPropDownloads.name ="x";                 setXPropDownloads.value = bDownloads.width/4;                 setXPropDownloads.target = bDownloads;                 setYPropDownloads = new SetProperty();                 setYPropDownloads.name ="y";                 setYPropDownloads.value = bDownloads.height/4;                 setYPropDownloads.target = bDownloads;                                 //Configure the bContact properties                 setXPropContact = new SetProperty();                 setXPropContact.name ="x";                 setXPropContact.value = bContact.width/4;                 setXPropContact.target = bContact;                 setYPropContact = new SetProperty();                 setYPropContact.name ="y";                 setYPropContact.value = cMain.height/2;                 setYPropContact.target = bContact;                 // Finally, push all the overrides and return the State to the caller                 newState = new State();                 newState.name = "downloads";                 newState.overrides.push(setXPropServices);                  newState.overrides.push(setYPropServices);                  newState.overrides.push(setXPropDownloads);                  newState.overrides.push(setYPropDownloads);                  newState.overrides.push(setXPropContact);                  newState.overrides.push(setYPropContact); } 
This is just one of the example functions.  You may notice I am doing a bit if "dynamic" layout based on determining size of Main and various components.
It compiles and runs okay, and I don't get an error when I click the the Downloads button (set to change state to "downloads" on click), so it is recognizing the states that were created... BUT all elements seem to go straight to 0 x and 0 y. (top left corner) instead of setting any of my specified values.
I tried changing the values to strings using the String() method, which does nothing.  I even tried setting specific constant numbers as values for X and Y, and it has no effect...
Any thoughts why it is, in fact, changing X and Y but is automatically moving them to 0, 0?

sorry, having trouble with this interface for inserting code...
import mx.states.*;
import mx.controls.Button;
// Define variables
private var newState:State;
private var setXPropServices:SetProperty;
private var setYPropServices:SetProperty;
private var setXPropDownloads:SetProperty;
private var setYPropDownloads:SetProperty;
private var setXPropContact:SetProperty;
private var setYPropContact:SetProperty;
private function createStates():void {
// Create and add the view states to the states Array.
states = new Array();
states.push(serviceState());
states.push(downloadState());               
states.push(contactState());
private function downloadState():State {
     //Configure the bServices properties
     setXPropServices = new SetProperty();
     setXPropServices.name ="x";               
     setXPropServices.value = bServices.width/4;               
     setXPropServices.target = bServices;
     setYPropServices = new SetProperty();
     setYPropServices.name ="y";
     setYPropServices.value = cMain.height/4;
     setYPropServices.target = bServices;               
     //Configure the bDownloads properties               
     setXPropDownloads = new SetProperty();               
     setXPropDownloads.name ="x";
     setXPropDownloads.value = bDownloads.width/4;
     setXPropDownloads.target = bDownloads;
     setYPropDownloads = new SetProperty();
     setYPropDownloads.name ="y";               
     setYPropDownloads.value = bDownloads.height/4;               
     setYPropDownloads.target = bDownloads;                               
     //Configure the bContact properties
     setXPropContact = new SetProperty();
     setXPropContact.name ="x";
     setXPropContact.value = bContact.width/4;
     setXPropContact.target = bContact;               
     setYPropContact = new SetProperty();               
     setYPropContact.name ="y";
     setYPropContact.value = cMain.height/2;
     setYPropContact.target = bContact;
     // Finally, push all the overrides and return the State to the caller
     newState = new State();               
     newState.name = "downloads";               
     newState.overrides.push(setXPropServices);           
     newState.overrides.push(setYPropServices);           
     newState.overrides.push(setXPropDownloads);           
     newState.overrides.push(setYPropDownloads);           
     newState.overrides.push(setXPropContact);           
     newState.overrides.push(setYPropContact);
Hopefully this works better

Similar Messages

  • Axis bank net secure with webpin not working on ipad2

    Hi,
    Axis bank net secure with webpin not working on ipad2
    Lt me know how to proceed

    Try using their App:
    https://itunes.apple.com/in/app/axis-bank-mobile-application/id517266358?mt=8

  • Since installing Yosemite, Airplay with Freebox not working

    Since installing Yosemite, Airplay with Freebox not working
    With Maverick Airplay working well

    If you haven't done so already, try resetting the printing system.
    OS X Mavericks: Reset the printing system  also Yosemite
    Try deleting the printer and scanner and add them back.
    Also try Applications/Image Capture to see if it can find the printer and scanner.

  • Wifi connection with 4s not working after installing new software ios6

    wifi connection with 4s not working after installing ios 6.

    Go to Settings > WiFi > Select your network and hit the right arrow to "Forget Network"
    Then go to Settings > General > Reset Network Settings  and try connecting again when the phone restarts.

  • I'm having constant problems with pages not working. I.E.: I cannot fill in writeable fields, click on buttons... or anything... nothing on the page works. And, this is not exclusive to a particular site. I can, however, work well in Explorer.

    For the last few weeks I have had constant problems with pages not working. I.E.: I cannot fill in writeable fields, click on buttons... or anything... nothing on the page works. And, this is not exclusive to a particular site. It does seem to be a browser issue, because I can work well in Explorer.

    Both the Yahoo! Toolbar extension and the Babylon extension have been reported to cause an issue like that. Disable or uninstall those add-ons.
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Applications associated with workstations not working

    Hello,
    I have onld zen 7.x, on netware.
    Applications associated with workstations not working or appearing in one container. Not sure if it every worked. Apps work fine with users.
    I am in a bind, since I need to get the app out in the workstation space.
    It maybe rights or simple install error with the ZEN from the begining.
    thanks for any help or ideas.. Yes I know I need to get to Zen 11.
    Phil

    PhilJannusch,
    > Applications associated with workstations not working or appearing in
    > one container. Not sure if it every worked. Apps work fine with users.
    >
    > I am in a bind, since I need to get the app out in the workstation
    > space.
    Please tell us more as "not working" can mean a lot of things. So:
    Are they user or workstation associated?
    Are those for whick they do not work (users or workstations) all in the
    same container?
    In what way do they not work?
    Any errors?
    Anders Gustafsson (NKP)
    The Aaland Islands (N60 E20)
    Have an idea for a product enhancement? Please visit:
    http://www.novell.com/rms

  • I am getting frustrated with Apple not working with Flash player on some of my favorite web sites. Is there any alternative that will work on I-pad instead of flash?

    I am getting frustrated with Apple not working with Flash Player on some of my favorite web sites! Is there another alternative to watching these site options on my I-pad?

    Flash is not, and probably never will be, supported on the iPad : http://www.apple.com/hotnews/thoughts-on-flash/ . Plus it would be up to Adobe to make a version of their flash player that works on iOS devices - something which they have never managed to do and which they have now given up on trying to do.
    Browser apps such as Skyfire, iSwifter and Puffin 'work' on some sites, but judging by their reviews not all sites. Also some websites, especially news sites, have their own apps in the App Store, so your could try checking there for your sites (and there is the built-in YouTube app).

  • My orignal computer that I sync my iPhone 4 with does not work...can I sync it with a new computer?

    My original computer that I set up my iPhone 4 with
    Does not work.....can I use a new computer to sync
    The phone....how do I do this and is there a risk of
    Of losing any apps, music etc

    Try this:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive

  • Dynamic rooting (User Record) setting is not working in Nakisa OrgChart SP3

    Dear All
    The Dynamic rooting setting is not working in the Nakisa OrgChart SP3.
    It is giving an error message - "Cannot find the root of your orgchart. The orgchart box may have been deleted or incorrectly specified, or no valid org structure can be found for the selected effective date. Please change the root of the chart or select another effective date."
    We followed the same steps as given in the Admin guide of SP3 (P.no. 109 - shown below)
    In Orgchart --> General Settings:
    * Select the Org chart root value source.
    User Record: Retrieves the record specified in the next step from the employee data element.
    *Do one of the following to define the org chart root:
    If User Record was selected in the previous step, select the field containing the ID of the required organizational object in the employee data element from the User record field drop-down list. For example, if you wish to root the org chart at the org unit of the logged-in user, select the field containing the org unit ID. Hence, we have selected the Org unit ID.
    Note:
    We had enabled single sign-on with logon tickets
    Retained the standard settings in Security Settings --> Employee Source
    Had provided full authorization to the roles
    If we use the "OrgChart Root" option available in 'Orgchart root value source', the org structure gets displayed correctly from the root object defined.
    As this is an standard functionality, Kindly guide us in resolving the issue.
    Regards
    Ravindra

    Ravindra.
    You don't have to and shouldn't always include the username and password parameters for the SAP Connection string.  When you omit them it will use the user's login credentials.
    Remember though that:
    The SAPRoleMappingConnection will need them included in order to get the details for the user in the first place.
    Without the username and password specified in a connection string you can't click the option to test the connection and result in a successful connection.  Remember unable to connect does not necessarily equate to wrongly configured.
    I've filtered the log file for errors and the following entries were flagged up:
    26 Jun 2012 10:00:06 ERROR com.nakisa.Logger  - com.nakisa.framework.utility.Files : deleteFile : java.io.IOException: Unable to delete file: E:\usr\sap\D15\J00\j2ee\cluster\apps\Nakisa\OrgChart\servlet_jsp\OrgChart\root\.system\Admin_Config\__000__THY_SAP_Live_RFC_01\AppResources\attr.txt
    26 Jun 2012 13:13:52 ERROR com.nakisa.Logger  - com.nakisa.framework.utility.Files : deleteFile : java.io.IOException: Unable to delete file: E:\usr\sap\D15\J00\j2ee\cluster\apps\Nakisa\OrgChart\servlet_jsp\OrgChart\root\.system\Admin_Config\__000__THY_SAP_Live_RFC_01\AppResources\attr.txt
    26 Jun 2012 13:43:49 ERROR com.nakisa.Logger  - java.lang.reflect.InvocationTargetException
    26 Jun 2012 13:55:09 ERROR com.nakisa.Logger  - com.nakisa.framework.utility.Files : deleteFile : java.io.IOException: Unable to delete file: E:\usr\sap\D15\J00\j2ee\cluster\apps\Nakisa\OrgChart\servlet_jsp\OrgChart\root\.system\Admin_Config\__000__THY_SAP_Live_RFC_01\AppResources\attr.txt
    26 Jun 2012 14:32:03 ERROR com.nakisa.Logger  - com.nakisa.framework.utility.Files : deleteFile : java.io.IOException: Unable to delete file: E:\usr\sap\D15\J00\j2ee\cluster\apps\Nakisa\OrgChart\servlet_jsp\OrgChart\root\.system\Admin_Config\__000__THY_SAP_Live_RFC_01\AppResources\attr.txt
    26 Jun 2012 15:47:44 ERROR com.nakisa.Logger  - BAPI_SAP_OTFProcessor_LinkedDataElement : The dataelement ( SAPPositionVacancyDataElement ) is not defined.
    26 Jun 2012 15:47:44 ERROR com.nakisa.Logger  - BAPI_SAP_OTFProcessor_LinkedDataElement : while trying to invoke the method com.nakisa.framework.data.Command.getType() of an object loaded from local variable 'p_cmd'
    26 Jun 2012 15:47:44 ERROR com.nakisa.Logger  - com.nakisa.framework.webelement.charting.data.ChartingData : createNodesFromData : Notes Error: NullPointerException
    26 Jun 2012 15:47:44 ERROR com.nakisa.Logger  - BAPI_SAP_OTFProcessor_LinkedDataElement : The dataelement ( SAPPositionVacancyDataElement ) is not defined.
    26 Jun 2012 15:47:44 ERROR com.nakisa.Logger  - BAPI_SAP_OTFProcessor_LinkedDataElement : while trying to invoke the method com.nakisa.framework.data.Command.getType() of an object loaded from local variable 'p_cmd'
    26 Jun 2012 15:47:44 ERROR com.nakisa.Logger  - com.nakisa.framework.webelement.charting.data.ChartingData : createNodesFromData : Notes Error: NullPointerException
    26 Jun 2012 15:47:48 ERROR com.nakisa.Logger  - com.nakisa.framework.webelement.charting.data.ChartingData : createNodesFromData : Notes Error: NullPointerException
    26 Jun 2012 15:47:55 ERROR com.nakisa.Logger  - BAPI_SAP_OTFProcessor_LinkedDataElement : The dataelement ( SAPPositionVacancyDataElement ) is not defined.
    26 Jun 2012 15:47:55 ERROR com.nakisa.Logger  - BAPI_SAP_OTFProcessor_LinkedDataElement : while trying to invoke the method com.nakisa.framework.data.Command.getType() of an object loaded from local variable 'p_cmd'
    26 Jun 2012 15:47:55 ERROR com.nakisa.Logger  - com.nakisa.framework.webelement.charting.data.ChartingData : createNodesFromData : Notes Error: NullPointerException
    At the very least it looks like SAPPositionVacancyDataElement is missing and whilst the other errors around it are unfamiliar I wonder if it might be a good first step to see if you can track down the reference to and existence of this data element?  That being said it looks like your last test occurred well over an hour after this (so you may have already resolved it) and resulted in nothing but information messages.  If that is the case it might be worth "rolling" your log file or manually trimming it to the right time frame when posting it?  Otherwise it can be misleading as people could flag up issues you have already resolved.
    So assuming you haven't tried Luke's suggestion (which should only take a couple of minutes to do) I think you should go back and do so right away .
    Regards,
    Stephen.

  • Crystal Report formula with datediff not working as expected

    We need a Crystal Report formula to display the number of seconds the oldest arriving call has been waiting.  Across multiple resources that can each have an "oldest call".  The database stores a datetime value for the time the oldest call arrived.  If there are no waiting calls, then this field is NULL.  (MSSQL database).  It seemed reasonable to implement this in a formula that 1) discovers the minimum of "oldest call" timestamps in the selected records, and 2) to use "datediff" to produce the difference (in seconds) between the "oldest call" timestamp and current time.
    The first attempt at this relied on "implied" iteration that could be done within a formula.  Something like:
    data: OLDESTARRIVALTIME
           null
           '2014-06-14 08:08:08.000'
           null
          '2014-06-14 08:07:55.000'
           null
    whilereadingrecords;
    datetimevar minArrival;
    if isNull({SVCCLASSMEASURES_VW.OLDESTARRIVALTIME}) = False
                   and minArrival < {SVCCLASSMEASURES_VW.OLDESTARRIVALTIME} then
         minArrival := {SVCCLASSMEASURES_VW.OLDESTARRIVALTIME};
    DateDiff("s", minArrival, {SVCCLASSMEASURES_VW.UTCDATE})
    We tried storing the values of OLDESTARRIVALTIME in an array.  We could see it iterating, but the values in the array only contained
    the column value from the first record.
    This was to solve the problem of screening null values and producing the minimum of the set.
    Since that didn't work (and the web articles seemed to imply this would iterate over all the records, we tried another approach.  This
    time we set NULL timestamps in the table to a timestamp far in the future, so that we could directly apply "minimum" to produce
    the correct "begin" for datediff.
    data: OLDESTARRIVALTIME
              '2030-01-01 00:00:00.000'
              '2014-06-14 08:08:08.000'
              '2030-01-01 00:00:00.000'
              '2014-06-14 08:07:55.000'
              '2030-01-01 00:00:00.000'
    datetimevar minArrival = minimum({SVCCLASSMEASURES_VW.OLDESTARRIVALTIME});
    datetimevar minUTC = minimum({SVCCLASSMEASURES_VW.UTCDATE});
    if minArrival < minUTC then
         DateDiff("s", minArrival, minUTC)
    else
         0
    (minUTC would be current time in UTC)
    So, to start things off, the last formula produces negative numbers!  They hover in negative seconds within a negative minute (-33, -45, etc.).
    That's inconceivable, considering the test for minArrival < minUTC.  Both of the fields are "datetime".
    As it turns out, in the near term, it's most important to get the second formula working.  And, of course, insights into getting the first
    formula to work are welcome as well!
    Have we run into some weird behavior of the "DateDiff" function?
    Thanks!

    If DateDiff is always returning a negative number you could try swapping the dates around in the call to DateDiff - it should look like this:
         DateDiff("s", minUTC, minArrival)    
    Or you could use the Absolute Value of the calculation:
         Abs(DateDiff("s", minUTC, minArrival) )
    As for your first formula, you need to initialize the variable to a value prior to using it in the comparison.  If you don't, its value is null and comparing it against a value won't work.  (See What is Null and Why is it Important for Crystal Reports | SAP BI BLOG for a blog that I wrote about working with nulls in Crystal.)
    You should change your existing formula to something like this:
    whilereadingrecords;
    datetimevar minArrival;
    if OnFirstRecord then minArrival := DateTime(2013, 1, 1, 0, 0, 0);
    if not isNull({SVCCLASSMEASURES_VW.OLDESTARRIVALTIME})
                   and minArrival > {SVCCLASSMEASURES_VW.OLDESTARRIVALTIME} then
         minArrival := {SVCCLASSMEASURES_VW.OLDESTARRIVALTIME};
    Note how I changed the If statement.  Also, you want to replace minArrival with the field value if the field is less than the current value of minArrival - so you need to use ">" instead of "<" in the comparison.  Place this formula in the details section.  It will now show anything because of the semi-colon on the end.  This will ensure that it gets evaluated for every record.
    Now, create a second formula that looks like this:
    whileReadingRecords;
    datetimevar minArrival;
    DateDiff("s", minArrival, {SVCCLASSMEASURES_VW.UTCDATE})
    Place this formula in a footer section - it will not work in a header section.  If you need it in a header section you might be able to take the "whilereadingrecords" off of both formulas and use the "Maximum()" summary function to get the correct value.
    -Dell

  • Document update with DocumentDefinition not working

    Hi
    I would like to be able to update a PublicObject with new attributes and also reset the class name to which the object belongs.
    I have written a small test program (see below) which compiles fine and, according to the APIs should work updating a PublicObject.
    (Note that I haven't included the lines where I create a LibraryService and librarySession, but I am doing all that in an earlier part of the code. As input parameters (apart from username and pasword to start the session) I am supplying a path and filename for an existing document in IFS for which I want to do the update.)
    Here is the code (note everything below is between try {  } catch { } statements but this is not shown here):
    // First I set the Folder Object to the location the PublicObject resides in, then cast a Document Object from the existing file, where m_session is my librarysession.
    FolderPathResolver fpr = new FolderPathResolver(m_session);
    fpr.setRelativePath(destinationpath);
    Folder f = fpr.getCurrentDirectory();
    Document currentDoc = (Document) f.findPublicObjectByPath(filename);
    // Now I am creating a DocumentDefinition, set the class and an attribute and try to update the document with these new values. The class METADATA exists and is a subclass of DOCUMENT.
    String description = "This is a new description";
    DocumentDefinition newDocDef = new DocumentDefinition(m_session);
    newDocDef.setClassname("METADATA");
    newDocDef.setAttribute("DESCRIPTION",AttributeValue.newAttributeValue(description));
    currentDoc.update(newDocDef);
    When I run this, nothing happens, i.e. the file in question retains its old class association and the description is not changed.
    It would be greatly appreciated if someone could help and point out what is wrong with my code as having the ability to update documents is central to what we want to do.
    Thanks very much.
    Hugo

    I had the same problem and solved it by doing this 2 stepa:
    1. Run report CRMOST_CREATE_PACKAGE, because after upgrade, package $WS_BOL_GEN is missing.
    2. Run report CRMOST_GENERATION to generate webservice again.
    Regards.

  • PHP email form with Validation - not working

    Hello;
    I am new to using php. I usually use coldfusion or asp but this site requires me to write in php. I have a form I am trying to get to work and right now.. it doesn't do anyhting but remember what you put in the fields. It doesn't want to send, and it won't execute the validation script for the fields that are required. Can anyone help me make this work? I'm confused and a definate newbie to PHP.
    Here is my code:
    <?php    
                  $PHP_SELF = $_SERVER['PHP_SELF'];   
                  $errName    = "";   
                  $errEmail    = "";
                  $errPhone    = "";        
                  if(isset($_POST['submit'])) {        
                          if($_POST["ac"]=="login"){            
                        $FORMOK = TRUE;    // $FORMOK acts as a flag. If you enter any of the conditionals below,                             // it gets set to FALSE, and the e-mail will not be sent.
                        // First Name           
                        if(preg_match("/^[a-zA-Z -]+$/", $_POST["name"]) === 0) {               
                            $errName = '<div class="errtext">Please enter you name.</div>';               
                            $FORMOK = FALSE;           
                        // Email           
                    if(preg_match("/^[a-zA-Z]\w+(\.\w+)*\@\w+(\.[0-9a-zA-Z]+)*\.[a-zA-Z]{2,4}$/", $_POST["email"]) === 0) {                                                    $errEmail = '<div class="errtext">Please enter a valid email.</div>';               
                            $FORMOK = FALSE;           
                        // Phone           
                        if(preg_match("/^[a-zA-Z -]+$/", $_POST["phone"]) === 0) {               
                            $errPhone = '<div class="errtext">Please enter your phone number.</div>';               
                            $FORMOK = FALSE;           
                        if($FORMOK) {               
                                $to = "[email protected]";  
                                $subject = "my. - Contact Form";                  
                                $name_field = $_POST['name'];               
                                $email_field = $_POST['email'];               
                                $phone_field = $_POST['phone'];
                                $city_field = $_POST['city'];
                                $state_field = $_POST['state'];               
                                $message = $_POST['comment'];                
                                $message = "               
                                Name: $name_field               
                                Email: $email_field
                                Phone: $phone_field   
                                City: $city_field   
                                State: $state_field               
                                Message: $message";                
                                $headers  = 'MIME-Version: 1.0' . "\r\n";               
                                $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";                
                                // Additional headers               
                                $headers .= 'To: <[email protected]>' . "\r\n";               
                                $headers .= '[From] <$email_field>' . "\r\n";                
                                // Mail it               
                                mail($to, $subject, $message, $headers);                
                                header("Location: thankyou.php")
                                // I have no idea what these next 3 lines are for. You may just want to get rid of them.                   
    ini_set("sendmail_from","[Send from]");
    ini_set("SMTP","[mail server]");
    mail($to, $subject, $message, $headers);
                                } else {               
                                echo "Error!";              
                        ?>
    <form method="post" action="<?php $PHP_SELF ?>" id="commentForm">
    <input name="name" size="40" value="<?php echo $_POST["name"]; ?>" type="text">
                         <?php  if(isset($errName)) echo $errName; ?>
    <input name="email" size="40" value="<?php echo $_POST["email"]; ?>"  type="text">
            <?php  if(isset($errEmail)) echo $errEmail; ?>
    <input name="phone" size="40" value="<?php echo $_POST["phone"]; ?>" type="text" id="phone">
            <?php  if(isset($errPhone)) echo $errPhone; ?>
    <input name="city" size="40" value="<?php echo $_POST["city"]; ?>" type="text" id="city">
    <input name="state" size="40" value="<?php echo $_POST["state"]; ?>" type="text" id="state">
    <textarea name="comment" cols="30" rows="10" id="comment"><?php echo $_POST["comment"]; ?></textarea>
    <input type="submit" value="Submit" name="submit" class="contact-submit" />
    </form>
    It seems pretty simple.. but it's not working at all. I would also like this page to submit to it's self, and when it actually does send an email, to just make the form disappear and replace it with the thank you text instead of sending you to another page. I also do not need to use an smtp server, it goes directly to the network server when sent.
    I'm really sorry to ask all of this, I'm trying to learn this language and need to make this work.
    Thank you for anyones help in advance.

    .oO(BarryGBrown)
    > I have a php file which generates an email from a form
    in a website I have
    >designed. I just want to make some areas of the final
    generated email in bold
    >text. I know if people have plain text only selected in
    their email client they
    >won't see the bold text, but at least it will reach a
    certain percentage of
    >users.
    You can't do bold text in a normal email. Plain text is just
    that -
    plain text. For anything more you need HTML. _If_ you should
    need it.
    Usually plain text serves pretty well and is the most
    efficient way.
    > the line in question is -
    >
    > $body ="Booking request details from website:\n\n";
    >
    > I have tried putting  and ,
    syntax is used in some forum software, but besides that it
    has
    no meaning whatsoever.
    >inside the inverted commas, outside
    >etc, plus tried different declarations within the
    <head>, nothing works! What
    >am I doing wrong?
    You would have to create an entire HTML email with all the
    required
    headers and boundaries. Quite difficult to do by hand with
    PHP's mail()
    function.
    > I am a beginner with this php stuff, please be kind!
    Then you should start simple with plain text. There are some
    classes out
    there which make it easy to generate text and HTML emails
    (phpmailer for
    example), but you should be familiar with PHP coding if you
    want to use
    them.
    Micha

  • Outer join (with (+)) does not work

    I started with a working SQL statement:
    SELECT DISTINCT username, r.granted_role
    FROM dba_users u, dba_sys_privs s, dba_tab_privs t, dba_role_privs r
    WHERE u.username = s.grantee
    AND u.username = t.grantee
    AND u.username = r.grantee
    ORDER BY username, r.granted_role;
    Fine, now I want to add two columns which indicate which of the users have SYSDBA and SYSOPER privileges.
    As in another post told this can be achieved by:
    SELECT * FROM V$PWFILE_USERS;
    When I want to merge these two SQL statements I need an outer join but the following does not work:
    SELECT DISTINCT u.username, r.granted_role, v.SYSDB, v.SYSOP
    FROM dba_users u, dba_sys_privs s, dba_tab_privs t, dba_role_privs r, V$PWFILE_USERS v
    WHERE u.username = s.grantee
    AND u.username = t.grantee
    AND u.username = r.grantee
    AND u.username = v.username(+)
    ORDER BY u.username, r.granted_role;
    I got an error message:
    SELECT DISTINCT u.username, r.granted_role, v.SYSDB, v.SYSOP
    ERROR at line 1:
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'V'
    Why?

    Run this
    SELECT DISTINCT u.username, r.granted_role, v.SYSDBA, v.SYSOPER
               FROM dba_users u,
                    dba_sys_privs s,
                    dba_tab_privs t,
                    dba_role_privs r,
                    v$pwfile_users v
              WHERE u.username = s.grantee
                AND u.username = t.grantee
                AND u.username = r.grantee
                AND u.username = v.username(+)
           ORDER BY u.username, r.granted_role;- - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com

  • JSF : Dynamic link generated by commandLink does not work

    In the following code, without <f:verbatim>, it is giving "Duplicate ID in the view" Exception. But with <f:verbatim>, the links generated by commandLink does not work. Please help me to solve this problem.
    Thank you in advance.
    Regards
    Abdul
    <%-- jsf:pagecode language="java" location="/src/pagecode/eservice/DisplayMoreEServices.java" --%><%-- /jsf:pagecode --%>
    <%@ include file="/includes/g_common_include.jsp" %>
    <%@page import="java.util.Map"%>
    <%@page import="bh.com.cio.egov.EGOVConstants"%>
    <%@page import="javax.portlet.PortletSession"%>
    <%@page language="java"%>
    <%
         PortletSession ses = renderRequest.getPortletSession();
         Map eServiceCatMap = (Map) ses.getAttribute(EGOVConstants.REQ_ESERVICE_LIST_BY_CAT);
         renderRequest.setAttribute(EGOVConstants.REQ_ESERVICE_LIST_BY_CAT,eServiceCatMap);
    %>
    <%@page import="bh.com.cio.egov.vo.EServiceVO"%>
    <f:view>
         <script type="text/javascript">          
              function blinkThis(id, color, timeout)
                   var idElem = document.getElementById(id);
                   if(idElem)
                        idElem.getElementsByTagName('span')[0].style.color = color;
                        setTimeout('switchColor(\'' + id + '\', \'#8A7C5B\', ' + timeout + ')', timeout);
              function switchColor(id, color, timeout)
                   var idElem = document.getElementById(id);
                   if(idElem)
                        idElem.getElementsByTagName('span')[0].style.color = color;
                        setTimeout('blinkThis(\'' + id + '\', \'#FF3030\', ' + timeout + ')', timeout);
         </script>
    <f:loadBundle basename="nls.egovresource" var="nls"/>
    <hx:scriptCollector id="scriptCollector1">
         <h:form id="form2">     
    <f:verbatim>
              <div class="header-top">
                   <h:outputText value='#{nls["eservice_label_title"]}'></h:outputText>
              </div>
              <c:forEach items="${requestScope.REQ_ESERVICE_LIST_BY_CAT}" var="categoryVOs" varStatus="catIndex">
                   <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                             <td> </td>
                             <td class="gray1" height="30px">
                                       <c:out value="${categoryVOs.value.category.categoryName}" escapeXml="false"></c:out>
                             </td>                
                        </tr>
                        <tr>
                             <td width="2">
                                  <div align="right">           
                                       <img src='<%= imageRootDir + "dot.png"%>' width="4" height="1" />
                                  </div>
                             </td>
                             <td width="100%" >
                                  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                                       <c:forEach items="${categoryVOs.value.eservice}" var="service" varStatus="serviceIndex">
                                       <%
                                            EServiceVO serviceObj = (EServiceVO) pageContext.getAttribute("service");
                                            String action = null;
                                            int serviceId= -1;
                                            if(serviceObj!=null)
                                                 action = serviceObj.getServiceAction();
                                                 serviceId = serviceObj.getServiceId();
                                            if(action!=null && action.startsWith("$"))
                                       %>
                                       <c:set var="jstl_to_jsf_serviceName" value="${service.serviceName}" scope="request"/>
                                       <c:set var="jstl_to_jsf_url_en" value="${service.serviceAction}" scope="request"/>
                                       <c:set var="jstl_to_jsf_url_ar" value="${service.serviceActionAr}" scope="request"/>
                                       <tr>
                                            <td height="17">                         
                                                 <table width="100%" border="0" cellspacing="0" cellpadding="0">                              
                                                      <tr>
                                                           <td width="95%" id="extMoreCell_${catIndex.index}_${serviceIndex.index}">                                                                      
                                                                <img src='<%= imageRootDir +"arrow1.png"%>' width="15" height="16" border="0"/>
                                                                <h:commandLink styleClass="links menu-txt" action="#{pc_EServiceView.doExternalLinkAction}">
                                            <h:outputText value="#{jstl_to_jsf_serviceName}" styleClass="menu-txt"/>
                                                 <f:param name="PARAM_ESERVICE_URL_EN" value="#{jstl_to_jsf_url_en}"></f:param>
                                                 <f:param name="PARAM_ESERVICE_URL_AR" value="#{jstl_to_jsf_url_ar}"></f:param>
                                                 <f:param name="JSP_ACTION" value="ACT_EXTERNAL_ESERVICE"></f:param>
                                            </h:commandLink>
                                                           </td>
                                                      </tr>                                             
                                                 </table>
                                                 <script type="text/javascript">
                                                      <c:if test="${service.serviceId eq '53'}">
                                                           blinkThis('extMoreCell_7_3', '#FF3030', 1000);
                                                      </c:if>                                        
                                                      <c:if test="${service.serviceId eq '54'}">
                                                           blinkThis('extMoreCell_7_4', '#FF3030', 1000);
                                                      </c:if>     
                                                      <c:if test="${service.serviceId eq '55'}">
                                                           blinkThis('extMoreCell_7_5', '#FF3030', 1000);
                                                      </c:if>          
                                                      <c:if test="${service.serviceId eq '56'}">
                                                           blinkThis('extMoreCell_0_8', '#FF3030', 1000);
                                                      </c:if>     
                                                      <c:if test="${service.serviceId eq '57'}">
                                                           blinkThis('extMoreCell_8_8', '#FF3030', 1000);
                                                      </c:if>     
                                                      <c:if test="${service.serviceId eq '59'}">
                                                           blinkThis('extMoreCell_1_8', '#FF3030', 1000);
                                                      </c:if>     
                                                      <c:if test="${service.serviceId eq '58'}">
                                                           blinkThis('extMoreCell_5_6', '#FF3030', 1000);
                                                      </c:if>     
                                                           <c:if test="${service.serviceId eq '28'}">
                                                           blinkThis('extMoreCell_1_4', '#FF3030', 1000);
                                                      </c:if>     
                                                           <c:if test="${service.serviceId eq '20'}">
                                                           blinkThis('extMoreCell_5_3', '#FF3030', 1000);
                                                      </c:if>     
                                                           <c:if test="${service.serviceId eq '60'}">
                                                           blinkThis('extMoreCell_7_6', '#FF3030', 1000);
                                                      </c:if>     
                                                 </script>
                                            </td>
                                       </tr>
                                       <tr>
                                            <td bgcolor="#FAF9FA" background='<%= imageRootDir + "line-bg-eservices.png"%>'><img src='<%= imageRootDir +"line-bg-eservices.png"%>' width="2" height="1" border="0"/></td>
                                       </tr>     
                                       <%}
                                       else if(action!=null)
                                       %>                                                                                               
                                       <c:set var="jstl_to_jsf_serviceName" value="${service.serviceName}" scope="request"/>
                                       <wps:urlGeneration contentNode="${service.serviceAction}" allowRelativeURL="false" keepNavigationalState="true">
                                       <%
                                       //String urlC = "http://"+renderRequest.getServerName()+":"+renderRequest.getServerPort()+wpsURL;
                                       String urlC = "" + wpsURL;
                                       %>
                                       <c:set var="url" value="<%=urlC%>" scope="request"/>
                                  </wps:urlGeneration>
                                       <tr>
                                            <td height="17">                         
                                                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                      <tr>
                                                           <td id="intMoreCell_${catIndex.index}_${serviceIndex.index}">
                                                           <img src='<%= imageRootDir +"arrow1.png"%>' width="15" height="16" border="0"/>     
                                                           <hx:outputLinkEx styleClass="links menu-txt" value="#{url}">
                                                                <h:outputText value="#{jstl_to_jsf_serviceName}" styleClass="menu-txt"></h:outputText>
                                                           </hx:outputLinkEx>
                                                           </td>
                                                      </tr>                                                                                                                             
                                                 </table>
                                            </td>
                                       </tr>
                                       <tr>
                                            <td bgcolor="#FAF9FA" background='<%= imageRootDir + "line-bg-eservices.png"%>' ><img src='<%= imageRootDir +"line-bg-eservices.png"%>' width="2" height="1" border="0"/></td>
                                       </tr>     
                                       <%
                                            %>               
                                       </c:forEach>                                             
                                  </table>
                             </td>
                        </tr>
                   </table>                                                                                                                                                                     
              </c:forEach>
              </br>
              <h:messages styleClass="messages" id="messages1"></h:messages>
              </f:verbatim>     
              </h:form>
         </hx:scriptCollector>
    </f:view>

    1) Throw your code away and use h:dataTable instead of c:forEach to render a table of dynamic size.
    or:
    2) Hand-assign every UIInput and UICommand element inside the loop an unique ID. E.g. "commandLinkId" + loopIndex

  • Read Only Display of Radio group and Text area with counter not working

    Hello,
    I am using Apex 3.2, with 10g for the database
    I have this form, with fields that will set to read only when status = 'closed'
    All of the fields display as read only except for 2. I cannot figure out why this is not working correctly.
    1st field is Issues that is a text area with character counter, with a sql query behind it, that is set to null unless the query is pulling in the data.
    2nd field is Status which is a radio group that will not display as read only when status = 'closed'
    I have other fields on the form with the same format and they change to read only when the status = 'closed', I have even copied the pl/sql expression from one field to these fields and it still doesn't work correctly. I have also tried javascript for an on load event, which works, but once I click on the save button, it disables all of the page items, which works correctly, but I purposely forget to enter information, to make sure the validations are firing correctly, which it does, but the script disables everything, not allowing me to correct the errors. The javascript is firing on the on page load event.
    Any help on this is greatly appreciated.
    Mary

    Dung,
    That API seems to have a bug, it returns true/false/null, so you could use 'return not nvl(htmldb_util.current_user_in_group(p_group_name => 'APP Admin'),false)' to get a false value.
    Unfortunately there's another problem: using the read-only attributes for checkbox or radiogroup item makes them hidden. My suggestion would be to create another item that has disabled="disabled" in the HTML Form Element attribute in the item definition and display that item or the non-disabled item alternately, using conditions based on the current_user_in_group logic.
    Scott

Maybe you are looking for