ADF FACES - JAVA SCRIPT-LINKS

Hi all

I am facing the following problem using ADF Faces and with Java script

What I need to do... i read a string in a 'list' in a JSP page that is in the sesion (I did), then I need to print as many links with the name of the list items.
For example, if my list have the values {'value1', 'Value2', "Value3"} I have to print the following links

VALUE1
VALUE2
VALUE3, which are the names to read from the list

But I can not

I did the following... within the JSP

< % @ page import="mx.com.uaem.htb.sspoc.portal.Util"% >
< % @ page import="java.util.List"% >
< % @ page import="java.util.ArrayList"% >
< %
System.out.println ("Dentro JSP");
List < String > myList = (list) Util.getSessionMapValue ("myListRef");
for (int i = 0; i < myList.size (); i ++) {}
System.out.println (myList.get (i));
% >
< % - Código HTML-% >
< af:commandLink text = "< = i % value % >"
action = "#{mostrarResultado1.mostrarReferencia}" / >

< af:commandLink text = ' value #{i} ".
action = "#{mostrarResultado1.mostrarReferencia}" / >
< %} % > This IS THE END OF THE LOOP

Here, I'm just trying to print the value of the 'I' variable (0,1,2)
And I got 3 links (as expected), but I don't see the value of the variable i

The problem here is that I don't see in the adf faces tag (for example the < ad: commandLink...) a variable that has been declared in the block of <>% Java, I mean... I don't see the i and the myList.

Can someone help me?
I tried many options... but I can't


Thanks in advance

Use the af:foreach tag - you shouldn't write Java scriptlets in your JSF.
http://www.Oracle.com/technology/products/jdev/htdocs/partners/AddIns/Exchange/JSF/doc/tagdoc/core/foreach.html

Tags: Java

Similar Questions

  • Safari and all browsers not opening not Java Script links - looks like App problem

    I have 3 ipads and 1 iphone...  A few days ago all except 1 of the iPad and my iphone started showing the same questions...

    In safari, or even with chrome on each of the devices involved, links to Java scripts more open.  It freezes and unresponsive, then crashes.

    It is the case of the bar by clicking on a link in google search (and it's OK if I load desktop application mode) and even emails with links to a Web site.

    Since 3 devices present the problem and is not 1 I guess it has to do with a bad application or the app update (although never had something like this happen before an application.)  The 9.2.1 software on the devices was fine until a few days ago, when this happened

    However, with many applications on devices, I don't know what app or update is causing the problem.  I tried to limit without a bit of luck.

    I have classes compensation tent soft reboot of data backed up and all that, but the problem does not go far.  Even with all of the dragged close apps, it STILL happens. So maybe it's an application that loads anything at startup.

    Because I don't see other instances of something like this that make SMEs also guess that's an app.  Does anyone have any suggestions... On the app store - anyone know if there are diagnostic tools to find an app that can cause a problem?

    Thank you!

    Mike

    Hi MikeAbramsNY,

    Thank you for using communities Support from Apple! I'm sorry to hear that you have this Javascript problem with your devices. If you have a current backup of your data, you can try to restore one of the devices assigned to factory settings and stable in this default state to see if the problem persists. If so, you can find the following article useful:

    Use iTunes on your Mac or PC to restore your iPhone, iPad or iPod settings - Apple Support

    Concerning

  • The use of Java Script in pages ADF Faces jspx?

    I want to call an Applet in a jspx using Java Script...
    How can I do this? :)

    Hello

    You can use the tag place if you're on JDeveloper 11.1.1.2.0

    Arun-

  • get links to java-script

    Hi, I have a page with inlineframe jspx, in this context, I have put the page html with java-script that is in the application. Java-script I need get links jspx page (need the data of iterator to obtain the data in the table on my page jspx). How can I send links to my java script?

    Hello

    Given the domain browser security, JavaScript in an inline frame cannot access objects JS of the hosting page if the content of the online setting belongs to the same domain. If this is the case, try calling AdfPage.PAGE.findComponentByAbsoluteId ("id_of_af:document_component"); as shown below. Make sure that the af:document component has a tag set and configured with a managed bean method af:serverListener.

    var document = AdfPage.PAGE.findComponentByAbsoluteId("id_of_af:document_component");
    

    Then call

    //issue imemediate call to server
    AdfCustomEvent.queue(document, "serverListenerTypeName",{} ,true);                        
    

    The listening port of the server code, then accesses the layer of binding BindingContext.getCurrent ()--> getCurrentBindingEntries() and returns the value of JavaScript

    var script = "myJsUpdateFunctionToAccessInlineFrame(... whatever you got from the binding layer ...);";
    FacesContext fctx = FacesContext.getCurrentInstance();
    ExtendedRenderKitService erks = null;
    erks = Service.getRenderKitService(fctx, ExtendedRenderKitService.class);  erks.addScript(fctx, script);
    

    So basically recover you from JS in ADF Faces using a server listener and then use JS to a bean managed to call a JS function to callback in the inline frame

    Frank

  • How can I link to pages in a selection tree / index level 2 with java script popup?

    I can do something unique popup level using the java script below (#1) and selections link to pages but to change a tree of selection index popup level 2 as below (#2), I can't seem to understand how to link to the pages. Any help much appreciated. Thank you

    1

    var itemIndex = app.popUpMenu("INTRODUCTION", "ALPHABET", "GRAMMAR", "NUMBERS", "DATES & TIME", "GETTING TO KNOW PEOPLE", "PHRASES FOR LEARNING", "DIRECTIONS & TRANSPORTATION", "DESCRIBING THE TRAIL", "DO'S & DON'TS", "EQUIPMENT", "FOOD", "INTRODUCING A VILLAGE", "CULTURE AND ETHNIC GROUPS", "HANDICRAFTS", "TEMPLES & MONKS", "AGRICULTURE", "ANIMAL HUSBANDRY", "SCHOOL & EDUCATION", "LEADING A TREK", "NATIONAL PROTECTED AREAS", "IDENTIFYING WILDLIFE", "PLANTS & FORESTS", "BOATS", "CAVES ", "HEALTH AND SAFETY"() "

    switch (itemIndex) {

    case 'INTRODUCTION' :

    this.pageNum = 1

    breaking

    case "ALPHABET" :

    this.pageNum = 2

    breaking

    case 'GRAMMAR' :

    this.pageNum = 5

    breaking

    case "NUMBERS" :

    this.pageNum = 30

    breaking

    case 'DATE & TIME' :

    this.pageNum = 35

    breaking

    case "GET to KNOW the PEOPLE" :

    this.pageNum = 42

    breaking

    case "PHRASES FOR LEARNING" :

    this.pageNum = 56

    breaking

    case 'DIRECTIONS & TRANSPORT' :

    this.pageNum = 59

    breaking

    case "DESCRIBING THE TRAIL" :

    this.pageNum = 63

    breaking

    case 'Things to do and not to do' :

    this.pageNum = 68

    breaking

    case "EQUIPMENT" :

    this.pageNum = 74

    breaking

    case 'FOOD' :

    this.pageNum = 83

    breaking

    case "INTRODUCE a VILLAGE" :

    this.pageNum = 96

    breaking

    case 'CULTURE AND ETHNIC GROUPS' :

    this.pageNum = 105

    breaking

    case "CRAFTS" :

    this.pageNum = 120

    breaking

    case "The TEMPLES and the MONKS" :

    this.pageNum = 126

    breaking

    case 'AGRICULTURE' :

    this.pageNum = 131

    breaking

    case "FARMING" :

    this.pageNum = 140

    breaking

    case "SCHOOL & EDUCATION" :

    this.pageNum = 145

    breaking

    case "LEADING a TREK" :

    this.pageNum = 151

    breaking

    case 'NATIONAL PROTECTED AREAS' :

    this.pageNum = 155

    breaking

    case "IDENTIFICATION of WILDLIFE" :

    this.pageNum = 161

    breaking

    case "PLANTS & FOREST" :

    this.pageNum = 169

    breaking

    case 'BOATS' :

    this.pageNum = 175

    breaking

    case "CELLARS" :

    this.pageNum = 178

    breaking

    case 'HEALTH AND SAFETY' :

    this.pageNum = 182

    breaking

    }

    2

    var aINTRODUCTION = ['INTRODUCTION', 'How to use this book', 'Format'];

    var aALPHABET is ["ALPHABET", 'Vowels', 'Sounds consonants'];.

    var itemIndex = app.popUpMenu (aINTRODUCTION aALPHABET);


    Thank you.


    It works exactly the same... itemIndex will bear the name of the selected

    order of the day.

  • ADF page with java script disabled in the browser?

    Can a web page developed by ADF with Jdeveloper render in the browser with JavaScript disabled? It does not fror me. Is there an alternative? Please answer.

    Raphael is exact - ADF Faces requires JavaScript.

    John

  • what it means when a pop up keeps saying: java script is empty.

    Not only that, a popup keeps me blocked when I try to share on facebook games. I don't think it all started until I downloaded ie9.

    When started.and down blocking a message: java script Sub. Not nessasarily at the same time.

    But these are the 2 problems im having right now. And blocking is Drivin' me crazy. Can someone tell me what to do?

    Hi pcannie,

     

    a. don't you face this problem with only this particular site or facing this problem with Web sites that require authentication (e.g. secure sites)?

    b. check if the Java script is enabled or not. If it is activated, and again, if you have the number, and then reregister jscript.dll

    Command: regsvr32 jscript.dll

    If the problem persists, uninstall and reinstall Java.

    Try to reset the settings of the internet browser by default explore and check.
    For more information please visit the link below.
    How to reset Internet Explorer settings
    http://Windows.Microsoft.com/en-us/Windows7/reset-Internet-Explorer-settings

    Important: Reset Internet Explorer to its default configuration. This step will disable also any add-ons, plug-ins or toolbars that are installed. Although this solution is fast, it also means that, if you want to use one of these modules in the future, they must be reinstalled.

  • Problem to find the Position of the cursor by using Java Script for an input TextField

    Hello

    I have a problem to find the position of the cursor in a field inputText component.

    The following code of java script to achieve. The same functionality works fine if I run in a simple html page. But when it is used the same javascript inside the jsff does not the position of the cursor.
    var adfComponent = AdfPage.PAGE.findComponentByAbsoluteId("r1:1:it3");
    var adfComponentClientId = adfComponent.getClientId();
    var div = document.getElementById(adfComponentClientId + '::content');
    div.focus();
    var docSelectionRange = document.selection.createRange();
    
    docSelectionRange.moveStart ('character', -div.value.length);
    
    var iCaretPos = docSelectionRange.text.length;
    
    alert("iCaretPos --> "+iCaretPos);  ---> This statement always returning '0'. Instead, i want the cursor position inside the text box.
    Please let me know what I'm missing.

    For your reference, sending the sample page html that works fine with the same kind of code.
    <html>
     
     <body style="font-family: tahoma; font-size: 8pt;">
     
      <script language="JavaScript">
     
       /*
       **  Returns the caret (cursor) position of the specified text field.
       **  Return value range is 0-oField.length.
       */
       function doGetCaretPosition (oField) {
     
         var iCaretPos = 0;
              alert(oField);
         if (document.selection) { 
     
           // Set focus on the element
           oField.focus ();
     
           // To get cursor position, get empty selection range
           var oSel = document.selection.createRange ();
     
           // Move selection start to 0 position
           oSel.moveStart ('character', -oField.value.length);
     
           // The caret position is selection length
           iCaretPos = oSel.text.length;
         }
     
         // Firefox support
         else if (oField.selectionStart || oField.selectionStart == '0')
           iCaretPos = oField.selectionStart;
     
         // Return results
         return (iCaretPos);
       } 
      
     
     
      </script>
     
      <form name="blah">
     
       Text Field: <input type="text" name="nameEdit" value="">
       <input type="button" value="Get Caret" onClick="document.getElementById('where').value=doGetCaretPosition (document.forms[0].elements[0]);">
    <input id="where">
      
     
      </form>
     
     </body>
     
    </html>
    Thank you and best regards,
    Kiran kristelle

    Published by: Kiran kristelle on February 6, 2012 12:00

    ... had the chance to look at the source code of the sample. ADF Faces renders text as HTMLTextArea fields when the value of the rows property. The JavaScript code used in the example of client works differently for FF and IE if the input is a text box. This could be a problem in IE or just used JavaScript code. The rows back to a single line (remove) property makes the text as HTML input feldworking with the JavaScript for IE and FF.

    Frank

  • ADF Faces 11, add where clause to the detail view in the master/detail relationship

    Hello

    I have two display objects only read connected by a link in a relationship master detail.

    They are displayed in a treetable in the form.

    I have a method on the java object impl view master class, I use to add custom where claused based on entries different user and then run the query.

    Works well, master and detail is interview properly.

    But I also want to further filter the detail view (view from destination in the display link). However, as soon as I add whereclause in the detail view against the master
    relationship of detail seems to have disappeared and are no detail record. I also tried to add a view criteria but with the same result.

    Your comments will be appreciated.

    ADF FACES 11g release 1.


    Jan

    You can get the ViewLinkAccessor, then the ViewObject and try to apply the ViewCriteria, followed by executeQuery... what you are already doing.
    Better to paste your code here...

  • ADF Faces 10g: setting up emulate IE7 mode in IE8 using meta tag

    I have problems setting up the metatag for the IE7 Mode. I have to add the meta tag just after the head tag but afh:head tag generates its own metatag as well as another code.

    JSP code:
    < afh:head title = 'Forms' >
    * < meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE7" / > *.
    < / afh:head >

    released on the duration of HTML:
    Forms < head > < title > < / title > < name meta = "generator" content = "Oracle ADF Faces" > < link rel = "stylesheet" charset = "UTF - 8" type = "text/css" href="/IE8Test-ViewController-context-root/adf/styles/cache/oracle-desktop-10_1_3_4_0-en-ie.css;jsessionid=abc" > < script > var AdfWindowOpenError =' a window blocker was detected in your browser.» Popups blockers interfere with the operation of this application. Please disable your Blocker for popups or allow popups from this site.'; < /script > < script src = "/ IE8Test-ViewController-context-root/adf/jsLibs/Common101_3_4_0.js; jsessionid = f860a28964c33a5fae90eeaf3726da48b147854ee2ad990a4ba70279b67ea0dd" > < / script > < script _defaultTZ() > < /script >
    * < meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE7" / > *.
    < / head >

    Copy the following code will not work my page in IE7 mode.

    However, if I change the code of
    < head title = 'Forms' >
    < meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE7" / >
    < / head >

    It will work in IE7 to IE8 mode.


    1. is there something I can do to replace the code generated by my own meta tag if I use afh:head tag?
    2. If I use head html, what effects it will have on my code? I noticed that the fonts do not work properly, I think it's due to the links generated for skin is are more referenced.

    Any suggestion is recommended.

    Thank you
    Wes

    Hello

    Here's an example I wrote for 11g, which however also will work with 10g

    http://blogs.Oracle.com/jdevotnharvest/2011/04/running_adf_faces_applications_with_ie_9_in_ie_8_compatibility_mode.html

    Frank

  • V21 Firefox cannot find the files if file *.htm used "style windows" path slashes to the java scripts (on Unix, hosting with apache)

    Hello. I find a strange behavior of Firefox v21. If the 'windows' path used *.htm file slashes to the java scripts (on Unix, hosting with apache). Firefox says 404, but other browsers (such as Opera, Chrome, IE10) works properly with this.

    You should use slashes in links so that they work properly in Firefox, otherwise Firefox will escape them that 5% C as you can see if you would them hover in the case of a real link (this is obviously not possible in this case).

  • Enable Java script is checked, but the site says that it is not authorized

    After getting the following message when you try to log in my Bank I checked FireFox\Tools\Options\Content and found that the box to enable java script has BEEN verified. FireFox is acting as if she is not allowed. How to solve this?

    Well, it is finally resolved. Thank you all for the help. A technician from one of my brokerage sites, which had a link blackened think there might be an announcement on. He clearly had me on history and cookies. then led me to a link to reset FireFox. After resetting everything works AND I have not lost all bookmarks or log in information. It's a relief to have FireFox again.

    I especially thank Cor - el and the great search engine in the FireFox support site. I'm pretty sure I'm going to need you all again some time; but for now I can just go on my work.

  • Java will not add/remove programs uninstall. When running java get error (java script false) when trying to uninstall get error message (error application of transformations

    When running java get error (java script false) when trying to uninstall get error message (error application of transformations. Went to sunmicro systems, but can not find help. Also having problems with script errors. I'm debugging the scripts not controlled. Using windows xp IE8.

    I think I need some type of uninstaller or need assistance.

    TYVM

    Connie Pitre

    E-mail address is removed from the privacy *.

    Hello

    Try the methods provided below and check if the problem persists.

    Method 1:

    Try the steps in the link below of the Java Support to solve the problem with the error application transforms during the uninstalling of Java.

    Error application of transformations

    http://Java.com/en/download/help/error_applying_transforms.XML

    Method 2:

    To fix problems with the Script in Internet Explorer error click the link below.

    How to resolve script errors in Internet Explorer on Windows computers

    http://support.Microsoft.com/kb/308260

  • How to fix java script errors

    Java script error messages / hoe to fix?

    Java script error messages / hoe to fix?

    See if this tutorial may be of no help to you:

    How to fix JavaScript errors
    http://www.ehow.com/how_5579654_fix-Java-script-errors.html

    Here is the link to google where you can find many articles about it:
    http://www.Google.ca/HWS/search?hl=en&client=Dell-row&channel=CA-PSP&IBD=0071218&q=how+to+repair+Java+script+errors&submit=Google+search For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • I don't know how to turn on java script

    Hi How is everyone, I tried and tried to watch movie trailers on you tube and various other things about the internet.when a pop up came he said I needed to download a later version of adobe flash player. I bought it and now when I try to watch the movie trilers a pop up says that my "java script" turned off.when I searched and found the file for java script I could not access the folder and it said there was an error trying to open it.i have almost given up and I need help.can someone help me please

    Hi hopsntreegs,

    Thank you for taking the time to post.

    To enable JavaScript in Internet Explorer:

    ·         Open Internet Explorer

    ·         Select the Tools drop-down

    ·         Select Internet Options

    ·         Click the Security tab

    ·         Select the Internet world

    ·         Select custom level

    ·         Search for Active Scripting and ensure that enable is marked

    ·         Locate the Scripting of Java applets and be sure to check what is marked

    You can watch clips now? If this is not the case, can you answer a few questions for us?

    1. what browser do you use?

    2. what site are these clips, you can link us or it's youtube?

    3. What is the exact message, can you maybe take a screenshot?

    Please let us know.

    Thank you

    Keith
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for