How ItemRenderer change for DataGrid column based on the value of this column?

Hello! I am trying to create a DataGrid that has a component Button to register when the value of this column is 'Open', then a label saying full when the value of this column is "Full". But Im having a hell of a time he find.

Here's my MXML with 2 different inline installation of components for different rendering engines point 2:

<? XML version = "1.0" encoding = "utf-8"? >
"" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >

< mx:Component id = "RegFull" >
< mx:VBox horizontalAlign = "center" verticalAlign = "middle" >
< mx:Label id = 'Full text' text = "Full" / >
< / mx:VBox >
< / mx:Component >

< mx:Component id = "RegButton" >
< mx:VBox horizontalAlign = "center" verticalAlign = "middle" >
< mx:Button label = "Save" / >
< / mx:VBox >
< / mx:Component >

< mx:DataGrid id = "scGrid" width = "100%" height = "100%" number of lines = "4" >

< mx:dataProvider >
< mx:Object label = "Status" data = 'Open' / >
< mx:Object label = "Status" data = "Full" / >
< mx:Object label = "Status" data = 'Open' / >
< mx:Object label = "Status" data = "Full" / >
< mx:Object label = "Status" data = 'Open' / >
< mx:Object label = "Status" data = "Full" / >
< / mx:dataProvider >

< mx:columns >
< mx:DataGridColumn id = "RegCol" headerText = "Reg" dataField = "data" / >
< / mx:columns >

< / mx:DataGrid >
< / mx:Application >

How can I dynamically use the right of itemrenderer based on the value of the field? THANKS FOR ANY HELP PROVIDED!

The best
Stephen

You can have more than 1 column renderer engine. There are two ways to do this. One way would be to use States. A State for each possible value in the data. Since you either want a button (data == 'open') or a label (data == 'Full') by using the States wouldn't be a bad choice.

Alternatively, you can use a canvas instead of a VBox. Make a label and a button with horizontalCenter = "0" "0" = red to make them each other. Make it visible according to the data value:






where dataField is the value of the property dataField on this converter DataGridColumn.

Tags: Flex

Similar Questions

  • How to change a region title based on the input parameter?

    Hi all

    I need to change the title of the dynamic region based on the value of a selection list in another region.

    Can someone help me in this?

    Kind regards
    Santini.

    Hello

    You can use & P1_ITEM_NAME. (including the & and the.) the title of region - this string will be replaced by the value of the item page called P1_ITEM_NAME, then change the name according to your order of the day of the page

    Andy

  • ADF Table cell color based on the value of this field

    Dear all,
    I want to create a table for our new application that contains a table that is used to represent the data in a table or matrix format.
    and each cell of the table should be filled with a color of three colors, based on the value belongs to who will for example: (1-8-> green, 9-20 - yellow etc.).
    I don't know how to implement this. Help, please...

    Rognard

    Please post in the subforum that is appropriate for your question.

    http://forums.Oracle.com/forums/Ann.jspa?annID=599

    This blocking thread

  • How to search for a document based on the contents of the document

    on windows xp, I could search a document based on a combination of search criteria, including part of the name of the document or a word or phrase in a document. How is a search based on the content on Windows 7?

    In general, you can simply type the content in the search box and it will find.  It highlights the content that it matched in the search results (kind of like an online search).  Here's an example where I typed the word "liberation".

    You can also combine this with the file name searches.  For example, you can type *.xls release to find all the Excel files with the word "release" in them.  If your sentence content includes spaces, put double quotes around it 'product release 12' for example.

  • How to create a Top 10 based on the values in a database?

    I have a database table that stores scores for events, like a rating system.

    Users choose an event they want to score, enter their score/side and insert it into the database table.

    It gives me in my table:

    User - rating - event

    Football - 5 - Joe Public

    Football - 4.5 - Jane Public

    Tennis - 3 - Joe Public

    .. and so on.

    I want to do two things.  First of all, I need to calculate the average in each event, which is fairly easy, even if I don't quite have my head around the GROUP BY clause, which, as I understand it, only allows me to use a database field?

    Secondly, I would like to display dynamically from the database, the list of top 10 events based on the results of the average rating.

    How easy is it for reach?  I use the ASP/VBScript and MSSQL database.

    Appreciate all advice offered.  Thank you.
    Concerning
    Nath.

    > the GROUP BY clause that, if I understand correctly,

    > only allows me to use a database field?

    Lol you can include as many values in the group by clause as you want. The output will be a line for each combination of group.

    > Then, I want to display dynamically from the database, a list

    > the top 10 of the events based on the results of the average rating.

    In MSSQL, you use the rating feature:

    thin-SQL-Server http://www.databasejournal.com/features/MSSQL/article.php/3661461/new-ranking-functions-Wi - 2005.htm

  • How do I delete an article based on the value of another field


    I have a pdf form that I added to the text fields. My challenge is that of the financial section of the form, if the value of a specific field is empty or null, I blank block of signature financial review.  I've been trying to find a way to cover the area of signature with a white box or have a text box with signature block text appear or disappear depending on whether the value is zero or empty.

    If seen many answers on how to make the field itself disappear based on value, but I did find something that causes another field or shape appear or disappear depending on the value of another field.

    Please try the following script,

    var signid = true;

    If (this.getField("finan").value! = 0) signid = true;

    of another signid = false;

    If (SignID) this.getField("signaturefield").display = display.visible;

    else this.getField("signaturefield").display = display.hidden;

    Please let me know if it solves the problem.

  • How can I add Auto text based on the value in the numeric field?

    Need help... I'm trying to add the auto text to a text based on a value in a numeric field. I want my text fields (summary box) to say 'Success' if (box score) value is equal to 10 and say "is not good" If the value is less than 10. My digital field is calculated by selecting drop-down lists.

    Thanks in advance for your help.

    Ed Watson

    Here is a link to the document that I created...

    https://files.Acrobat.com/?TrackingID=KGLIT#folder/c3106c32-2e69-4a5f-8ef2-94d25623dbfb

    Try this:

    If (NumericField1.rawValue< 10)="">

    TextField1.rawValue = "does not."

    }

    else {}

    TextField1.rawValue = "passed."

    }

  • How to change section order with based on the path of sidecar.xml

    I see that the < entry > tag controls where an article appears in the folio:

    "The order of the < entry > sections determines the order of the items in your folio when you create your folio or when you update it."

    But does that mean that I must move the entire section of an article to another location in the code, or enter a number somewhere?


    Thank you

    Beth

    You must move the section of the article in its entirety in the XML document to the location where you want in the order of folio.

    Neil

  • How to format a single cell based on the value in another cell?

    IM using JDEV 11.1.2.4 and had the following use cases.

    based on a threshold value in a column of my line, I want to show a different value in the color red.

    How to get there?

    Hello

    This could be a possible solution using inlineStyle and a simple logic of EL

    inlineStyle = ' #{rank. " TRESHOLD > 10? "{" color: #990000 ': "color: #000000 '} '.

    ID = "ot1" / >

    Marc

  • How to enable / disable certain fields based on the value of the checkbox

    This is probably a stupid question, but I was not able to find the trivial solution (I'm fairly new to the user's BlackBerry interface)

    Example scenario:

    Screen of the user interface with two components

    box: "Run daily.

    time field: ' to hh: mm ".

    If the check box is enabled, the hour field must be activated. If the check box is not selected, the time field should be disabled.

    I wasn't able to find a simple solution. The solution is to remove all components and re-create it with different style (Field.NON_FOCUSABLE |) Field.READONLY), but there are significant drawbacks:

    1. It's pretty messy keep the current value (if the user has modified the time field and click twice on the box, I would like to have the same value and the field must be dirty)
    2. She becomes more messy when you have more complicated logic (panels inside panels that should be enabled / disabled based on all parent checkboxes)

    Any ideas?

    Thanks in advance!

    The way I handled it was to the custom methods in areas that allow me to set the disabled and then state substitute TouchEvent, NavigationMovement and NavigationClick methods to search for this variable and simply return true if it is defined. This will take care of the FieldChanged States and targeted to make them unable to be activated.

  • How can I display more fields based on the value of another field in conjunction with the visibility of the others?

    I have 17 text fields 'questions' and have hidden buttons for each I would appear once the administrator puts in a "password" at the bottom of the page.

    For the "password", I created a text field to enter this password and a "Log In" button.

    I want to be able to do is for the user to put in the 'password' and the 'Log In' button contains the script necessary to display these fields. 17 text fields show only one at a time, so I want the action of the 'Log In' button to show only the hidden buttons corresponding to the current visible areas.

    Here is my code. What happens is little matter what I do, it says the password is incorrect and mask "publient1" which has never been specified in the code in a variable.

    Initially, I had the first "else if" statement as the first "If" statement, but the results are the same in any event.

    var res = this.getField("resolution");
    var password = this.getField("password");
    var res1 = this.getField("add-res1");
    var res2 = this.getField("add-res2");
    var res3 = this.getField("add-res3");
    var res4 = this.getField("add-res4");
    var res5 = this.getField("add-res5");
    var res6 = this.getField("add-res6");
    var res7 = this.getField("add-res7");
    var res8 = this.getField("add-res8");
    var res9 = this.getField("add-res9");
    var res10 = this.getField("add-res10");
    var res11 = this.getField("add-res11");
    var res12 = this.getField("add-res12");
    var res13 = this.getField("add-res13");
    var res14 = this.getField("add-res14");
    var res15 = this.getField("add-res15");
    var res16 = this.getField("add-res16");
    var res17 = this.getField("add-res17");
    var issue1 = this.getField("issue1");
    var issue2 = this.getField("issue2");
    var issue3 = this.getField("issue3");
    var issue4 = this.getField("issue4");
    var issue5 = this.getField("issue5");
    var issue6 = this.getField("issue6");
    var issue7 = this.getField("issue7");
    var issue8 = this.getField("issue8");
    var issue9 = this.getField("issue9");
    var issue10 = this.getField("issue10");
    var issue11 = this.getField("issue11");
    var issue12 = this.getField("issue12");
    var issue13 = this.getField("issue13");
    var issue14 = this.getField("issue14");
    var issue15 = this.getField("issue15");
    var issue16 = this.getField("issue16");
    var issue17 = this.getField("issue17");
    var iv1 = issue1.display = display.visible;
    var iv2 = issue2.display = display.visible;
    var iv3 = issue3.display = display.visible;
    var iv4 = issue4.display = display.visible;
    var iv5 = issue5.display = display.visible;
    var iv6 = issue6.display = display.visible;
    var iv7 = issue7.display = display.visible;
    var iv8 = issue8.display = display.visible;
    var iv9 = issue9.display = display.visible;
    var iv10 = issue10.display = display.visible;
    var iv11 = issue11.display = display.visible;
    var iv12 = issue12.display = display.visible;
    var iv13 = issue13.display = display.visible;
    var iv14 = issue14.display = display.visible;
    var iv15 = issue15.display = display.visible;
    var iv16 = issue16.display = display.visible;
    var iv17 = issue17.display = display.visible;
    var ih1 = issue1.display = display.hidden;
    var ih2 = issue2.display = display.hidden;
    var ih3 = issue3.display = display.hidden;
    var ih4 = issue4.display = display.hidden;
    var ih5 = issue5.display = display.hidden;
    var ih6 = issue6.display = display.hidden;
    var ih7 = issue7.display = display.hidden;
    var ih8 = issue8.display = display.hidden;
    var ih9 = issue9.display = display.hidden;
    var ih10 = issue10.display = display.hidden;
    var ih11 = issue11.display = display.hidden;
    var ih12 = issue12.display = display.hidden;
    var ih13 = issue13.display = display.hidden;
    var ih14 = issue14.display = display.hidden;
    var ih15 = issue15.display = display.hidden;
    var ih16 = issue16.display = display.hidden;
    var ih17 = issue17.display = display.hidden;
    if(password.value == "") {
        res.display = display.hidden;
        res1.display = display.hidden;
     res2.display = display.hidden;
     res3.display = display.hidden;
     res4.display = display.hidden;
     res5.display = display.hidden;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden; 
    }
    else if(password.value == "firefly" && iv1 && ih2 && ih3 && ih4 && ih5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.hidden;
     res3.display = display.hidden;
     res4.display = display.hidden;
     res5.display = display.hidden;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && ih3 && ih4 && ih5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.hidden;
     res4.display = display.hidden;
     res5.display = display.hidden;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && ih4 && ih5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.hidden;
     res5.display = display.hidden;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && ih5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.hidden;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && ih6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && ih7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && ih8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && ih9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && ih10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && ih11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && ih12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && ih13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.noPrint;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && ih14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.noPrint;
     res13.display = display.noPrint;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && iv14 && ih15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.noPrint;
     res13.display = display.noPrint;
     res14.display = display.noPrint;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && iv14 && iv15 && ih16 && ih17) {
        res.display = display.visible;
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.noPrint;
     res13.display = display.noPrint;
     res14.display = display.noPrint;
     res15.display = display.noPrint;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && iv14 && iv15 && iv16 && ih17) {
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.noPrint;
     res13.display = display.noPrint;
     res14.display = display.noPrint;
     res15.display = display.noPrint;
     res16.display = display.noPrint;
     res17.display = display.hidden;
    }
    else if(password.value == "firefly" && iv1 && iv2 && iv3 && iv4 && iv5 && iv6 && iv7 && iv8 && iv9 && iv10 && iv11 && iv12 && iv13 && iv14 && iv15 && iv16 && iv17) {
        res1.display = display.noPrint;
     res2.display = display.noPrint;
     res3.display = display.noPrint;
     res4.display = display.noPrint;
     res5.display = display.noPrint;
     res6.display = display.noPrint;
     res7.display = display.noPrint;
     res8.display = display.noPrint;
     res9.display = display.noPrint;
     res10.display = display.noPrint;
     res11.display = display.noPrint;
     res12.display = display.noPrint;
     res13.display = display.noPrint;
     res14.display = display.noPrint;
     res15.display = display.noPrint;
     res16.display = display.noPrint;
     res17.display = display.noPrint;
    }
    else {
        app.alert("The wrong password was entered. Please enter the correct password.")
        iv1;
        res1.display = display.hidden;
     res2.display = display.hidden;
     res3.display = display.hidden;
     res4.display = display.hidden;
     res5.display = display.hidden;
     res6.display = display.hidden;
     res7.display = display.hidden;
     res8.display = display.hidden;
     res9.display = display.hidden;
     res10.display = display.hidden;
     res11.display = display.hidden;
     res12.display = display.hidden;
     res13.display = display.hidden;
     res14.display = display.hidden;
     res15.display = display.hidden;
     res16.display = display.hidden;
     res17.display = display.hidden;
    }
    

    These lines in your code does not make sense (and the rest of the code is dependent on them):

    iv1 var = issue1.display = display.visible;

    I think what you mean probably to do is the following:

    iv1 var = (issue1.display == display.visible);

    This sentence of yours shows a lack of understanding of the JS operators:

    I also tried several operators equal sign for password.value, including a single equal sign, through three equal signs.

    You should do some research and find out what the differences are between '=', 'is' and ' ='. '. They are essential to your code.

  • Name of the dynamic property of object in the table based on the value of a variable

    I have two paintings of custom class objects

    var obj1:Object1
    var obj2:Object2
    
    var array1:Array = [obj1[0], obj1[1], ...]
    var array2:Array = [obj2[0], obj2[1], ...]
    

    Object1 has a property named. Name while Object2 has a property named. Title.

    Now I have a common function including cab accepts an array (array1 or array2) and the name of property the object ("Name" or "Title") as input and needs to access this name of the property of the objects in the array:

    function myFunction(arr:Array, fieldName:String)
    {
        arr[0].fieldName  = "xxx";
    }
    

    the problem I have this achievement does not because the code in the function assumes that the property of that object in the table is actually a string "fieldName" while I want to dynamically determine the names of the fields based on the value of this variable, but cannot understand the syntax to do!

    Don't know if I'm clear - hope that makes sense... ;-) Thank you

    Hey p3pp3r,

    I think I understood you. Try the following and see if you get good results:

    function myFunction(arr:Array, fieldName:String)
    {
        arr[0][fieldName]  = "xxx";
    }
    

    Let me know how it turns out. Good luck!

  • change the color of line based on the value of column 5 Apex in the classic report

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Hello

    I know this question has been asked several times here, but I'm working on 5 Apex and need to know the correct way to do it in this version.

    I need to change the color of the text of the entire line (no background color) based on the value in one of the columns of the classic report. I have just two conditions, if the value of column = Yes, color should be red, otherwise it must be green.

    I am new to jscript and css, so appreciate if someone can tell me the solution with steps.

    I have already checked this link that changes the value of the column, need to do something similar to the whole line.

    https://tylermuth.WordPress.com/2007/12/01/conditional-column-formatting-in-apex/

    Hi coolmaddy007-Oracle,.

    Here's an example set up on the apex.oracle.com according to the specifications you gave: https://apex.oracle.com/pls/apex/f?p=35467:1

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Here is how it is done:

    Create a dynamic action with the following specifications:

    Name: Give the appropriate name

    Event: After refresh

    Selection type: region

    Region: select your region classic report

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: Yes

    Code:

    $('td[headers="JOB"]').each(function() {
      if ( $(this).text() === 'MANAGER' ) {
        $(this).closest('tr').find('td').css({"color":"red"});
      }
      if ( $(this).text() === 'SALESMAN' ) {
        $(this).closest('tr').find('td').css({"color":"green"});
      }
      if ( $(this).text() === 'CLERK' ) {
        $(this).closest('tr').find('td').css({"color":"blue"});
      }
    });
    

    NOTE: Download the selector appropriate for your knowledge $('td[headers="JOB"]') case using firebug/browser development tools.

    Items concerned: leave blank.

    PS: Changed the example to change the color of text instead of the background color.

    I hope this helps!

    Kind regards

    Kiran

  • How to highlight the line of the ADF table based on the value of the column?

    Hi all

    I use jdev 10.1.3.4. I want to highlight a table row or a cell based on the value of the column.

    Lets say, I have a table emp with column empid, empname and sal. I want to emphasize the lines that have sal = 10000.

    How can I achieve this? Please help me with this.

    Thank you
    Abhijit

    Hello

    You want to highlight the lines? or set a different color for the lines? If it's the second, you can set the inline style based on the salary. (+ Edit: well, never mind, both are same :)) +)

    Something like

    
    

    If you want the entire line to be a different color, you have 2 options.

    1. define the same style inline for all columns in the table (good if you want to do only for a single table).
    2. create a style class and apply the styleclass based on the value of sal (preferably if you want the same behavior in all of your application).

    Arun-

    Published by: joel Ramamoorthy, October 23, 2009 16:56

  • How to get the total number of occurrences based on the value of a column.

    Hi all

    It is the first time I'll ask the question here on your forum, but since then followed several threads. I guess it's now my turn to ask a question. Anyway here's the thing, I have a query that should return to count the number of rows based on the value of HOUSING. Something like this:

    -----
    WIPDATAVALUE          SLOT             N            M
    1-2                   TRALTEST43S1     1            3
    1-2                   TRALTEST43S1     2            3
    3                     TRALTEST43S1     3            3
    4-6                   TRALTEST43S2     1            4
    4-6                   TRALTEST43S2     2            4
    4-6                   TRALTEST43S2     3            4
    7                     TRALTEST43S2     4            4
    -----

    As you can see above, on the TRALTEST43S1 of the SLOT, there are three occurrences, so M (Total number of occurrences) must be three and this column N he's counting. It is the same with the TRALTEST43S2 of the SLOT. It's the query I have so far:
    SELECT DISTINCT
    WIPDATAVALUE, SLOT
    , LEVEL AS n
    , m 
    FROM
    (
      SELECT
        WIPDATAVALUE
        , SLOT
        , (dulo - una) + 1 AS m 
      FROM
      (
        SELECT 
          WIPDATAVALUE
          , SLOT
          , CASE WHEN INSTR(wipdatavalue, '-') = 0 THEN wipdatavalue ELSE SUBSTR(wipdatavalue, 1, INSTR(wipdatavalue, '-')-1) END AS una
          , CASE WHEN INSTR(wipdatavalue, '-') = 0 THEN wipdatavalue ELSE SUBSTR(wipdatavalue, INSTR(wipdatavalue, '-') + 1) END AS dulo
        FROM trprinting
        WHERE (containername = :lotID OR SLOT= :lotID) AND WIPDATAVALUE LIKE :wip
      )
    ) CONNECT BY LEVEL <= m
    ORDER BY wipdatavalue;
    And it leads to something like this:
    -----
    WIPDATAVALUE          SLOT             N            M
    1-2                   TRALTEST43S1     1            2
    1-2                   TRALTEST43S1     2            2
    3                     TRALTEST43S1     1            1
    4-6                   TRALTEST43S2     1            3
    4-6                   TRALTEST43S2     2            3
    4-6                   TRALTEST43S2     3            3
    7                     TRALTEST43S2     1            1
    -----

    I think that my current query based results M and N on WIPDATAVALUE and not HOUSING that's why I get the wrong result. I also tried to use WITH instruction and it works well, but unfortunately, our system cannot accept the subquery factoring.

    I know that you guys will be of help because you are all awesome. Thank you all

    Published by: 1001275 on April 19, 2013 20:07

    Published by: 1001275 on April 19, 2013 20:18

    Hello

    1001275 wrote:
    Hi sb92075,

    You are right that it is available with this version. But our system doesn't put queries that use subquery factoring.

    What system are you talking about? If you really have something that prevents you from using all the features of Oacle, you should seriously think about fixing it.

    Any other ideas on how we can do this without help WITH clause?

    Yes; If a WITH clause is referenced that once, it can be re-written as a point of view online:

    SELECT       wipdatavalue
    ,       slot
    ,       ROW_NUMBER () OVER ( PARTITION BY  slot
                                 ORDER BY          low_number
                        )                    AS m
    ,       COUNT (*)     OVER ( PARTITION BY  slot )     AS n
    FROM       (     -- Begin in-line view (got_numbers)
                SELECT     wipdatavalue
              ,     slot
              ,     TO_NUMBER ( SUBSTR ( wipdatavalue
                                        , 1
                                   , INSTR ( wipdatavalue || '-'
                                               , '-'
                                        ) - 1
                                   )
                            )          AS low_number
              ,     TO_NUMBER ( SUBSTR ( wipdatavalue
                                        , 1 + INSTR ( wipdatavalue
                                                       , '-'
                                                )
                                   )
                            )          AS high_number
              FROM     trprinting
           )     -- End  in-line view got_numbers
    CONNECT BY     LEVEL               <= high_number + 1 - low_number
         AND     low_number          = PRIOR low_number
         AND     PRIOR SYS_GUID ()      IS NOT NULL
    ORDER BY  low_number
    ,            m
    ;
    

Maybe you are looking for