UIX & Javascript

I've often noticed that Javascript errors occur fairly often when IE loads the HTML generated by UIX pages (Mozilla rarely has that problem). In particular, I've been having a problem with a delete button on a form which generates this Javascript error:
"Error: 'type' is null or not an object"I debugged the JS error and it turns out the problem is in the _multiValidate function (see below -> line marked with "*******" )
Does anyone have any idea how to debug such a problem? Of course I can start removing chunks of code till it doesn't happen and add things back bit by bit but I'm hoping there's a better way to debug this with JDev.
function _multiValidate(
a0,
a1
var a2="";
if(a1&&!_recentValidation(true))
var a3=_getValidations(a0);
if(a3)
var a4=true;
for(var a5=0;a5<a1.length;a5+=4)
var a6=a0[a1[a5+1]];
******* var a7=a6.type;
if(!a7&&a6.length)
if(a6[0].type!="radio")
a6=a6[0];
var a8=a1[a5+3];
var a9=_getValue(a6);
if(!(a8&&(a9=="")))
var a10=_getValidationError(a6,a1[a5],
a3);
if(a10)
if(a4)
if(a6.focus&&(a6.type!='hidden'))
a6.focus();
if(a6.type=="text")
a6.select();
a4=false;
var a11=_getErrorString(a6,
a1[a5+2],
a10);
a2+='\n'+a11;
_recordValidation((a2.length>0),0);
return a2;
}

I've had this problem too, the javascript error was not occuring when running in jdeveloper or standalone OC4J but only when deployed to the Application Server. It turns out (in my case at least) to be related to this:
Javascript Compression May Cause Errors in ADF UIX
http://www.oracle.com/technology/products/jdev/htdocs/10.1.2.1.0/readme.html#uix2
The solution was to change the rules in the Web Cache component of the App Server not to compress .js files.
IE behaves very strangely if the javascript files are compressed. The UIX pages dynamically create a javascript validation function (based on the current page state) and assign it to a variable:
var fl = _multiValidate(form,[0,"InputField1",0,1,0,"InputField1",0 ..... etc.
This function then called from within /app/cabo/jsLibs/Common2_2_16.js on submit to perform validation. With the compression, IE appears to be holding the value of the variable (i.e. the validation function) in memory and reusing it for the same page, even though the page state may have changed. If you put some alerts in the _multiValidate function you can see what's happening.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • UIX Javascript Error with Date Picker

    Hi all,
    I am using JDeveloper 10.1.2.1.0 with JHeadstart 10.1.2.2.32 to create UIX pages. I have a page with a filter by search field. If I select the date picker on this page in IE version 6 or 7, I get the following javascript error:
    Error: 'length' is null or not an object
    I have found this in the Common2_2_20.js, which is part of the jslibs
    function _accumulateNumber(
    a0,
    a1
    var a2=a0.currIndex;
    var a3=a2;
    var a4=a0.parseString;
    ***var a5=a4.length;***
    if(a5>a3+a1)
    a5=a3+a1;
    var a6=0;
    while(a3<a5)
    var a7=parseDigit(a4.charAt(a3));
    if(!isNaN(a7))
    a6*=10;
    a6+=a7;
    a3++;
    else
    break;
    if(a2!=a3)
    a0.currIndex=a3;
    return a6;
    else
    return(void 0);
    }With Firefox 1.5.0.4, I can get the date selector window to open, but when I select a date value, I get this javascript error:
    a0.select() is not a function
    I have found this in the Common2_2_20.js also. Here is the code where the error is occuring.
    function _dfsv(
    a0,
    a1
    if((a0==(void 0))||(a1==(void 0)))
    return;
    a1+=_getTimePortion(a0);
    var a2=new Date(a1);
    var a3=_getDateFieldFormat(a0);
    var a4=a0.value;
    var a1=a3.format(a2);
    if(a0.value!=a1)
    if(a0.onchange!=(void 0))
    if(_agent.isIE)
    a0.onpropertychange=function()
    var a5=window.event;
    if(a5.propertyName=='value')
    a0.onpropertychange=function(){};
    a0.onchange(a5);
    a0.value=a1;
    else
    a0.value=a1;
    var a5=new Object();
    a5.type='change';
    a5.target=a0;
    a0.onchange(a5);
    else
    a0.value=a1;
    ***a0.select();****
    a0.focus();
    }I am able to use the date picker on other pages and even different parts of this page. The date search field is of type dateField.and is part of a switcher. Does anyone have any ideas as to why this is occuring or how I can work around it? Thanks in advance. I really appreciate all of your help.
    Susan

    Thanks for the reply. As a matter of fact, in my case the error happens in a UIX page generated by JHeadstart. I did some JavaScript debugging using the FireBug Firefox entension and I found that it is some JHeadstart JavaScript that causes this problem.
    The JHeadstart JavaScript passes on an array of input elements to the AFD JavaScript function and the problem arises when the select() method is called on the array, rather than an input element in the array.
    I will try to solve my issue by modifying the JHeadstart JavaScript code. Please see the JHeadstart forum somewhere in the near future for my post(s) about this :-)
    Thanks, Wouter

  • Struts/UIX/JavaScript Child Windows

    I have seen an example of using JavaScript to execute a Struts action mapping that is implemented using UIX. I would like to know if this will work in UIX.
    HC_doOpenRemote('<html:rewrite forward="item"/>');
    This function would be a simple JavaScript function that would cause a child window to be opened and cause the forward to the Struts action item to be executed resulting in the page being displayed.
    Is this possible in UIX? If so, please outline the steps to do it.
    By the way I got this example out of the book Struts In Action by Ted Husted.

    Thanks Adam for the example. The "event" part of the code helped me to do what I needed. (By the way, if there is a more direct way to do this let me know.)
    The issue for me is that the server does not know when a child window page is opened and this causes the blackhole as far as Struts is concerned. Working with Struts events is important because it provides easy integration with BC4J through the BC4JRequestProcessor.
    So your example suggested that I should implement an UIX page that strictly handles events that are recieved from a page that is opening the child window.
    Each event is named differently and makes a call to a Struts event. (The UIX event handler is the only place that UIX can deal with Struts events.)
    Here is some example code:
    The main.uix page has the following links:
    <link text="Open UIX page (events only), transfer control through Struts event. #1">
    <!-- Let's send a request to open a window with an initial event -->
    <boundAttribute name="onClick">
    <concat>
    <fixed text="openWindow(self, '"/>
    <ctrl:pageURL name="/pages/transferwindow" event="GoToRealPage1"/>
    <fixed text="');return false"/>
    </concat>
    </boundAttribute>
    </link>
    <link text="Open UIX page (events only), transfer control through Struts event. #2">
    <!-- Let's send a request to open a window with an initial event -->
    <boundAttribute name="onClick">
    <concat>
    <fixed text="openWindow(self, '"/>
    <ctrl:pageURL name="/pages/transferwindow" event="GoToRealPage2"/>
    <fixed text="');return false"/>
    </concat>
    </boundAttribute>
    </link>
    The transfer.uix page only handles UIX events passed in from JavaScript:
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    xmlns:struts="http://xmlns.oracle.com/uix/struts">
    <content>
    <!--
    This is a UIX page that is used only to transfer control to a Struts
    event. This is important to Struts/UIX applications that use child
    windows since the Struts controller is on the server side and child
    windows are launched on the client side.
    -->
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    <event name="GoToRealPage1">
    <struts:action path="/realchild1.do"/>
    </event>
    <event name="GoToRealPage2">
    <struts:action path="/realchild2.do"/>
    </event>
    </handlers>
    </page>
    And then the struts-config.xml:
    <action path="/realchild1"
    type="org.apache.struts.actions.ForwardAction"
    parameter="/pages/realwindow1.uix">
    </action>
    <action path="/realchild2"
    type="org.apache.struts.actions.ForwardAction"
    parameter="/pages/realwindow2.uix">
    </action>

  • UIX date field search javascript problem

    Hallo,
    I've found problem during setting criteria for date in search region.
    Calendar does not apear because of javascript error in Common_2_2_20.js line 5527 "a4 has no properties".
    It can be reproduced in jhsdemo (choose Arthur Miller, login, advanced search, "Order" tab, filter by any date and press calendar button).
    Do You have any workaround for that?
    Regards,
    Kuba

    Kuba,
    The Javascript file you mention is a UIX Javascript library, so this sounds like a JDeveloper/ADF issue that is not related to JHeadstart. To simplify the test case, you could create a simple drag-and-drop ADF application without JHeadstart and see if the same problem occurs there. Can you please log a TAR at MetaLink ( http://metalink.oracle.com/ ), or ask this question at the JDeveloper forum at http://otn.oracle.com/discussionforums/jdev.html ?
    Thanks,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Uix 2.2.8 multi monitor related bug

    Hi,
    I have a multi monitor system, on the seconnd screen, there is the browser , showing a page which has a Date Picker and a LOV. If I click on one of the icons, the window opens, and then all of a sudden jumps to the first screen with IE, with Mozilla it already opens on the first one. Same screen would be nice though.
    Bye Jan

    Hello Jan,
    In the UIX javascript code the newly opened window's coordinates are checked to make sure it is not partially off the screen. If so, the window's coordinates are adjusted to put it on the screen.
    I think there is a bug in IE which doesn't treat the multi-monitors as a single monitor, or something like that. Unfortunately, I doubt we can do anything about this.
    Are you saying it works in Mozilla, correct?
    Thanks,
    Jeanne

  • ADF UIX - confirm delete via javascript

    Hi <once again>
    I have an UIX web page with a delete button as follows:
    <submitButton text="Delete" model="${bindings.Delete}" id="Delete1" event="action" onClick="javascript:confirmDelete()"/>
    When the user clicks the button the following javaScript fires:
    <script>
    <contents>
    function confirmDelete()
    return confirm("Okay to delete record?");
    </contents>
    </script>
    It's my understanding if the user clicks the delete button, then clicks the "cancel" button in the javascript confirmation, the function should return false and the delete operation will not occur.
    However in testing this, clicking on either option in the javascript confirmation results in the delete executing.
    What am I doing wrong?
    My environment is JDev 9.0.5.2.
    Cheers,
    CM.

    Hi Rade,
    just extend your event handler for the "Delete" event:
        <event name="action" source="Delete0">
          <compound>
            <invoke method="doIt" javaType="oracle.jbo.uicli.binding.JUCtrlActionBinding" instance="${bindings.Delete}"/>
            <invoke method="doIt" javaType="oracle.jbo.uicli.binding.JUCtrlActionBinding" instance="${bindings.Commit}"/>
          </compound>
        </event>Regards,
    Georg

  • Javascript Error with UIX Page

    Hi all,
    I am using JHeadstart 10.1.2.2.32 with JDeveloper 10.1.2.1.0 to develop UIX pages. I have run into the following problem with one of my UIX pages. We have a page with a table view which uses sortable headers. In certain situations when using the sortable headers in IE 6.0.2900.2180, a javascript error appears. This does not occur using Firefox.
    It says:
    Line: 2894
    Char: 1
    Error: 'type' is null or not an object
    Code: 0
    URL: (the URL of the page)
    I have figured out that the error is occuring in the Common2_2_20.js file on the following line, which is part of the function _multivalidate:
    var a7 = a6.type; The error only occurs in the following situation. If the user has just logged into the system and certain rows in the table are read-only and others are editable. If you click on any of the sortable headers, it will sort fine the first time. However, if you click on the sortable header again, the javascript error appears. It only happens if you click on the sortable headers twice in a row.
    I have tried taking out the line of code, but then I can not sort the headers at all.
    I read in the forum that the error can occur because of the way IE handles the compression of javascript files. We changed the setting on the app server to not compress javascript files. I then undeployed and redeployed the application. However the same error is still occuring.
    If you need any more information, please let me know. Thanks in advance.
    Susan

    We found out that we had a custom script on the page that was interfering with script in the Common2_2_20.js. By moving the script to the end of our page, it solved our problem.
    Susan

  • ADF UIX and Javascript

    Hello,
    I am new in ADF UIX...
    I have a table in ADF UIX and I would like to use some my javascript functions. I know I have to set: <table proxied="true">....</table> but where I can write my functions, in an included file ? I mean, how does the interaction between the XML configuration file and javascript work ?
    Thank in advance,
    Henry

    Hi Rade Todorovich,
    As mentioned previously, if you had placed the javascript as indexed child of head element it would be fine.
    <Head> is named child of <metaContainer> which inturn is named child of <document> element. The example below should make it clear.
    This is how the UIX document would be
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="test">
    <contents>
    <!-- case 1 -->
    <script source="./cabo/js/test.js"/>
    <script>
    <contents>
    function theFunction()
    alert('the function');
    </contents>
    </script>
    </contents>
    </head>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <form name="form0">
    <!-- case 2 -->
    <contents>
    <script>
    <contents>
    function hi()
    alert('hi');
    </contents>
    </script>
    <button text="call-hi" name="fn" onClick="return hi();"/>
    <button text="call-theFunction" name="fn1" onClick="return theFunction();"/>
    </contents>
    </form>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    There are two usages:
    Case 1
    In your html it would just appear the way you would normally write a JS function with in the head
    <html>
    <head>
    <title></title>
    <META>
    <script language="javascript" src="./cabo/js/test.js">
    <!-- case 1-->
    <scirpt language="javascript">
    theFunction()
    </script>
    </head>
    <!-- case 2 -->
    <form ....>
    </form>
    <script language="javascript">
    function hi()
    alert('hi');
    </script>
    </html>
    Case 2
    As such <script> element can occur in HTML document.
    as mentioned in http://www.w3.org/TR/html401/interact/scripts.html#h-18.2.1
    In the same way UIX also allows the use of script element with in its <body> element.
    With case 2 you can see the way the script gets inlined in the HTML document. Please run the UIX and view source for the rendered page. It should become obvious.
    Thanks,
    Vijay Venkataraman

  • UIX Tip - maybe of use to somebody - confirm Delete operation with Javascript popup

    It was easier than I thought it would be to convert my Javascript Delete Confirmation message that I had developed for my JSP over to UIX:
    By default UIX would generally do something along the lines of:
    <submitButton text="Delete" ctrl:event="delete" />
    which generates the following html:
    <a href="# onclick="submitForm('viewForm',1,{'event':'delete');return false">
    If you want to popup a Javascript window asking the user to confirm the operation you can do:
    <submitButton text="Delete" ctrl:event="delete">
    <boundAttribute name="onClick">
    <fixed javaType="string">javascript:if (confirm("WARNING: You will not be able to revert this operation. This operation will also fail if there are dependant objects!")){return true;}else{return false;}</fixed>
    </boundAttribute>
    </submitButton>
    this will generate the following html:
    <a href="#" onclick="return _chain('javascript:if (confirm(&quot;WARNING: You will not be able to revert this operation.  This operation will also fail if there are dependant objects!&quot;)){return true;}else{return false;}','submitForm(\'viewForm\',1,{\'event\':\'delete\'});return false',this,event,true)">
    Matt.

    This is a totally supported technique, and a good one.
    To pick at nits, you don't need to start "onClick" handlers with "javascript:". Save yourself a whopping
    11 bytes by trimming that off. With a bit of slyness, you could boil this down to:
    <boundAttribute name="onClick">
       <fixed javaType="string">return confirm("WARNING: You will not be able to revert this operation.  This
    operation will also fail if there are dependant objects!");</fixed>
    </boundAttribute>... or, just extract that into a script, like:
      <script><contents>function makeSure()
      return confirm("WARNING: You will not be able to revert this operation.  This operation will also fail
    if there are dependant objects!");
    }</contents></script>
      <submit text="Delete" ctrl:event="delete" onClick="return makeSure()"/>

  • Still getting Javascript error with new version of UIX

    I'm facing some problem after changing my UIX framework version (2.2.3030829.1626).
    Currently I'm using UIX version (2.2.3030829.1626) . Paging with table is not working with new frame work .
    It is giving me javacript error "object doesn't support property or method" when clicking 'Next' .
    It's working fine with old version.
    We had used proper cabo directory. These files are in sync with the version of the runtime
    Here is our finding
    I found a error in _updateFormActions() function from MarlinCoreb2.js file.
    In this function it is giving error at
    if(a8!=a6)
    a7.action=a6 line (line # 1841,1842). If I comment out this two lines page is
    working properly without any javascript error.
    This problem is a bit tricky....
    Because it seems to be a problem with the UIX framework that only occurs on some versions of the Internet Explorer. On some version (IE 6.0.2600.0000) it works fine
    and it also works on the Mozilla Firefox browser.
    Can any one advice on the same?
    Thanks in advance
    Anindya

    I answered this question on a different thread.
    Do NOT post the same question multiple times. If you require more complete or prompt assistance than you receive on these forums, contact Oracle Support.
    -brian

  • Javascript error with new UIX framework

    Hi,
    I'm facing some problem after changing my UIX framework version (2.2.3030829.1626).
    Currently I'm using UIX version (2.2.3030829.1626) . Paging with table is not working with new frame work .
    It is giving me javacript error "object doesn't support property or method" when clicking 'Next' .
    It's working fine with old version.
    Any help is much appreciated.
    Thanks and Regards,
    Anindya

    Thanks Brian for your prompt reply
    We had used proper cabo directory. To confirm it we have done it once again.But we're still getting the same error.
    here is our finding
    I found a error in _updateFormActions() function from MarlinCoreb2.js file. 
    In this function it is giving error at
    if(a8!=a6)
    a7.action=a6 line (line # 1841,1842). If I comment out this two lines page is
    working properly without any javascript error.
    This problem is a bit tricky....
    Because it seems to be a problem with the UIX framework that only occurs on some versions of the Internet Explorer. On some version (IE 6.0.2600.0000) it works fine
    and it also works on the Mozilla Firefox browser.
    can you please advice is there any solution
    Thanks in advance
    Anindya

  • Javascript problems using HttpUnit while testing UIX pages

    Hello JDeveloper Team
    Need urgent help about testing my web pages written in UIX. I tried to use HttpUnit but I got Javascript errors. What is wrong with it ?
    I also used HtmlUnit. It works well but writing code to check the html page that is produced from a UIX is a stomachache. I mean all the ids , names of components are so absurd words. A submit button for example is a link with an image inside it but has no name or id. So there is no way to reach it with a method of HtmlUnit library.
    Can you please advice me a methodology to test my uix pages? Or is there any tool or application for this purpose ? It could be licensed . My company needs such a tool. I also tried AppPerfect but it does not support UIX.
    I need your valuable opinions. An answer that is quick would be appreciated.
    Thanks

    if you want an ID in the html, you can set it in the UIX file and it will appear
    in the html

  • Calling javascript function within a uix event

    JDeveloper Version: 9.0.3
    Technology: UIX
    Goal: To gracefully log out of a database connection, invalidate session, and close browser.
    Currently I have a logout.uix page that contains a cancel and logout button. The cancel button redirects the user to the calling page. The logout button fires a logout event that in turn calls a servlet method that closes the user's database connection and invalidates the session.
    Question: Upon returning to the logout.uix page, how do I call the self.close() javascript function that will force the user to close the browser?
    Thanks in advance for any assistance you can provide.
    OraTeam

    yes, I think it can be achieved. Something like this should suffice
    <button text="Log Out" onClick="script that closes the window" >
                            <primaryClientAction>
                            <fireAction event="YourEvent goeshere" formSubmitted="true">
                              <parameters>
                                <parameter key="Session" value="closeSession"/>
                              </parameters>
                            </fireAction>
                          </primaryClientAction>
                        </button>in the event handler you should register the event that you would specify above.
    <handlers>
        <event name="YourEvent goeshere" >
          <method class="com.test.ConnectionInvalidate" method="closeConnection" />
        </event>
      </handlers>In your class the method would be like this
    public class ConnectionInvalidate {
    public static EventResult closeConnection( BajaContext context,
                                                    Page page,
                                                    PageEvent event )
                                                    throws Throwable
    //from the event get the parameters. (if required)
    // code here for the close of connection
    }When you click the button called "Log Out" the event is fired which closes the connection and javascript is also called which closes the window. Both will happen simultaneously.
    hope this helps.
    regards,
    raj

  • Javascript triggering a uix event

    I'm using the <uix:body onUnload="javascript commands">
    Is there a way for javascript to trigger a uix <event> in this situation?
    Thanks, Steve

    I have a suggestion on how to call a close event back to the server side. The code looks like this:
    alert('Logging User Off');
    window.open('/url.for.logoff.processing.htm?paramForSessionId"+sessionID+"', 'LogOff', 'top=7000,left=7000');
    alert('User Logged Off');
    Does anyone know how to get the information needed for the window.open command?
    Thanks, Steve

  • Include custom javascript and css in uix page

    Hello
    I got a UIX page based on the pageLayout template and i wanted to include some custom things (css, js) inside the resulting html header like this:
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="mypage"/>
    <html:link rel="stylesheet" type="text/css" href="http://someotherserver.com/generateStyle?pCSSType=loc"/>
    <html:link rel="stylesheet" type="text/css" href="http://someotherserver.com/generateStyle?pCSSType=sys"/>
    <script source="customScript.js"><contents><!-- --></contents></script>
    </metaContainer>
    <contents>
    <body>
    Unfortunatly only ONE thing from within "metaContainer" gets included in the final html file. Is there a way to include everything from within "metacontainer"?
    Thanks for your help,
    Philipp Stecher

    I think metacontainer is a named child, and like all named children it can only have one node.
    Does this work?
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="mypage">
    <contents>
    <html:link rel="stylesheet" type="text/css" href="http://someotherserver.com/generateStyle?pCSSType=loc"/>
    <html:link rel="stylesheet" type="text/css" href="http://someotherserver.com/generateStyle?pCSSType=sys"/>
    <script source="customScript.js"><contents><!-- --></contents></script>
    </contents>
    </head>
    </metaContainer>

Maybe you are looking for

  • Step by Step for FICO(GL,Assets and CO) Extraction

    Hi gurus, I am trying to see if i can get a step by step extraction process for FICO extraction cos am abt to start a project to extract and load GL,Asset and Controlling data into a BW system.I am thinking I shd be able to get a lot of the reports n

  • ERROR: ORACLE prepare error: ORA-00936: missing expression

    Hello, I am required to run "pass-through" Oracle SQL, to extract data from tables into SAS for processing and manipulation. My code (attached) reads and writes (executes) but with zero records to test first. I cannot get past the Prepare Error. The

  • Urgently Required

    Hi i am new to OA Framework without any knowledege of it and i have a task to do. Please help me out. I have a date field in my page and when i select a date it must be validated and check whether it is between sysdate + 30 or sysdate - 30. The page

  • Deploying the whole J2ME Project created in EclipseMe...??

    Hi, I have a full mobile application which I developed in EclipseMe.. now someone else is buying the project... is there an easy way I can transfer the whole project to his pc so that he doesn't have to re-setup all the IDE properties, plugins, refac

  • BEx variables doesn't seem to work in Crystal 2008

    Hi all, I've made my first steps into Crystal 2008 on top of SAP BI. I have made a simple query in BEx QD with 2 user-input variables: Fiscal Year and Cost Center. In Crystal (with BW MDX) I've made a report on the basis of the BEx query. After selec