Bean value to amx:verbatim to make HTML dynamic ADF Mobile

Hi guys,
As using <amx:verbatim> to insert HTML directly in AMX page for ADF Mobile.
<amx:verbatim id="v1">
      #{PolicySummaryBean.currentSVG1}
    <![CDATA[
#{PolicySummaryBean.currentSVG2}
]]>
    </amx:verbatim>
Btw I tried to using bean value as EL to produces HTML from bean and seems didn't work
How to make it possible ?
Thanks

Hi,
don't think it will execute EL this way. However,you should be able to execute JavaScript (what you should keep in mind though is that any DOM manipulation on AMX page rendering is a risk and can put you into trouble). What is the HTML you want to insert (and to what extend do you control the metadata tags added to the AMX page this way? Wouldn't it be possible to add the content using AMX components?
Frank

Similar Messages

  • About amx:verbatim

    Hello all,
    I'm currently trying to use the amx:verbatim tag to embed arbitrary HTML in my amx page. Here is my code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <amx:view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:amx="http://xmlns.oracle.com/adf/mf/amx"
    xmlns:dvtm="http://xmlns.oracle.com/adf/mf/amx/dvt">
    <amx:panelPage id="pp1">
    <amx:verbatim id="v1">
    <div id="d1" width="100px" height="100px" style="background-color:#FFFFFF; ">
    <p id="p1">111111111111111111111111111111111111111111</p>
    </div>
    </amx:verbatim>
    <amx:facet name="header">
    <amx:outputText value="Header" id="ot1"/>
    </amx:facet>
    <amx:facet name="primary">
    <amx:commandButton id="back" action="__back"/>
    </amx:facet>
    <amx:facet name="secondary">
    </amx:facet>
    <amx:verbatim id="v3">
    <div id="d2" width="100px" height="100px" style="background-color:#FFFFFF; ">
    <p id="p2">222222222222222222222222222222222222</p>
    </div>
    </amx:verbatim>
    <amx:commandButton text="makeAlert" id="cb1" actionListener="#{pageflowScope.InjectionBean.injectJS}"/>
    <amx:verbatim id="v2">
    <div id="d3" width="100px" height="100px" style="background-color:#FFFFFF; ">
    <p id="p3">3333333333333333333333333333333333333333</p>
    </div>
    </amx:verbatim>
    </amx:panelPage>
    </amx:view>
    But neither a single div or paragraph is being rendered. At least not in the visible are of my amx page. So can any one point me to the right usage of the amx:verbatim tag?
    Edited by: Angelo Hannes on Nov 26, 2012 2:04 AM

    You need add the HTML in CDATA section.
    example:
    <amx:verbatim id="v1" >
    <![CDATA[
    <p style="color:white">My HTML <b style="color:red">html</p>
    ]]>
    </amx:verbatim>

  • Froward  bean value to servlet

    if I want to forward bean value to servlet I use
    <%@ page import="java.util.*" %>
    <html>
      <head>
    <jsp:useBean id="formHandler" class="cedars.FormBean" scope="request">
    <jsp:setProperty name="formHandler" property="*"/>
    </jsp:useBean>
    <%
       if (formHandler.validate()) {%>
    <jsp:forward page="/servlet/Insert"/>
    <% } else { %>
    <jsp:forward page="/resubmit.jsp"/>
    <% } %>
    </body>
    </html> is that right?
    why i keep get error message like NullPointerException on <jsp:forward page="/servlet/Insert"/>
    my beab local on cedars.FormBean, my Insert.java in WEB-INF/classes
    thank you for the help

    Hi,
    don't think it will execute EL this way. However,you should be able to execute JavaScript (what you should keep in mind though is that any DOM manipulation on AMX page rendering is a risk and can put you into trouble). What is the HTML you want to insert (and to what extend do you control the metadata tags added to the AMX page this way? Wouldn't it be possible to add the content using AMX components?
    Frank

  • How to assign bean value to a local variable in JSP using struts.

    Hi everybody!
    I've a problem that puzzled me on how to assign a bean value to a local variable like String in JSP using struts.
    we can have someting like this to display the value
    <bean:write name="detailService" property="status" />or
    <bean:define id="theStatus" name="detailService" property="status"/>
         This is country: <%=theStatus%>but an error occured when I tried like this:
    String currentStatus = "<bean:define id="theStatus" name="detailService" property="status"/>";
    or
    String currentStatus = "<bean:write name="detailService" property="status" />";Is there a way to do this?.....
    Any help pretty much appreciated

    Java != JSP.
    The <bean:define> and <bean:write> tags are custom tags meant to appear in the HTML section of a JSP file, as opposed to the scriptlet section. They actually get turned into java code as part of the translation process.
    The <bean:write> tag naturally just writes out what you tell it to.
    The <bean:define> tag defines a local variable, and gives it a value.
    this should do it.
    <bean:define id="theStatus" name="detailService" property="status" type="java.lang.String"/>
    <%
      String currentStatus = theStatus;
    %>With the advent of JSTL, you shouldn't really need to use scriptlet code anymore. Personally I am for 0% scriptlet code in any jsp I write.

  • How to set a value to an  existing element in  html page using servlets

    i have created a session in my login page and i know how to retrieve it now the actual problem is i want to set the same value to a textbox in an html page........

    Use JSTL and/or EL.
    Assuming that you mean with "created a session" that you've created a bean and have set it as an attribute of the HttpSession, e.g.httpSession.setAttribute("someBean", someBean);then do for example using the JSTL c:out tag:<p><c:out value="${someBean.someProperty}" /></p>or, if you're using at least Servlet 2.4 API with JSP 2.0 API which allows EL in template text, then do for example:<p>${someBean.someProperty}</p>

  • How to attach simple Spring code as managed bean into amx:listView (list view in adf mobile application)

    I found very simple code to fetch facebook feed here:
    3.&amp;nbsp;Facebook API Binding
    it uses Spring Framework. I already added spring support into jDeveloper.
    code to fetch feed is something like this:
    String accessToken = "f8FX29g..."; // access token received from Facebook after OAuth authorization
    Facebook facebook = new FacebookTemplate(accessToken);
    List<Post> feed = facebook.feedOperations().getFeed();
    I created managed bean for my amx:listView - Facebook.java. And inserted this code. But of course it is not enough. I need somehow to add spring managed bean (not like mine).
    Can you help me with that?

    Thanks for your answer. But its too wasteful for my app to run additional server. My app is very simple so i do not need server side. May be there is another way, without Spring. I mean something simpler then raw JDK 1.4 - some ready-made tool for the needs of these?
    Thanks in advance

  • How to make html file on server side from the data entered in text area

    Hi!
    I want to know how to make .html file on server side. Like if i enter the data in text area ( or like we normaly see when we write mail that editor) and we can use html tages in it and when user submit form all the data in that field will be saved on server side as an html formate. Is it possible to do so??? or any ruff idea how to design it???

    Erm ...
    Whats the problem with that?!
    Ok, here the code ...
    String myparameter = request.getParameter("paramname");
    String htmltemplate = "<html>\n"
                         +"<head><title>demo</title></head>\n";
                         +"<body>@parametertag@</body>\n";
                         +"<html>";
    String htmlpage = htmltemplate.replaceAll("@parametertag@",myparameter);
    File yourHTMLfile = new File("wheredoyouwannagotoday.html");
    FileOutputStream fos = new FileOutputStream(yourHTMLfile);
    fos.write(htmlpage.getBytes());
    fos.close();You're done.
    Happy Coding! :-) &copy;

  • How to call the form bean value on jsp withthe help of jstl tag

    hi
    all friends
    i am working in struts & i use jstl tag in jsp. i have one problem rise is how to call the form bean value in jsp page by using jstl tag.
    i now how to retrive the value through jsp:logic
    eg. <logic:empty name="userListForm" property="users">
    NO USER FOUND
    </logic:empty>
    see * userListForm mean formbaen name.
    * users means collection object.
    so how can i write above e.g in jstl

    You use the jstl core:if or core:choose combined with the EL:
    <c:if test="${empty users.userListForm}">
    NO USERS FOUND
    </c:if>I suggest you lookup the jsp expression language (EL) using google, it's very powerful.

  • How do I update a bean value from an AJAX call?

    Hi all,
    How do I update a bean value from an AJAX call? I suppose I could write a servlet to do it. However, this seems like a common problem, so I was wondering if there was some built in solution.
    Thanks,
    Grae
    Edited by: caalip2 on Mar 30, 2010 1:07 PM

    caalip2 wrote:
    Raymond
    Basically, I would user the following. The first choice for IE, the second for Firefox.
    new ActiveXObject("Microsoft.XMLHTTP");
    new XMLHttpRequest();
    GraeDon't do this to yourself. If it were that easy there wouldn't be AJAX frameworks for JSF. Find one you like and use it. I've used a4j (part of RichFaces) successfully.

  • ADF BC how to access session backing bean value in servlet

    Hi everyone,
    How do I access session backing bean value in a servlet?

    Frank, thanks for your reply.
    I'm not sure how I can incorporate this example into my situation. Let me explain more detail about my problem.
    "servlet" in my post here actually means a custom servlet I wrote for rendering an image that is stored in db as ordimage. In this servlet, I get hold of my appmodule by using Configuation.createRootApplicationModule(). By doing so (If I'm not wrong) a new database session/connection is created. What I'm going to achieve is set application context for this new session/connection in db with the data stored in a session backing bean in the view layer.
    I can pass the required data to the servlet thru url parameter, but I don't want to do it this way for the reason that the data may contains sensitive information.
    I hope I have explained myself well.
    Message was edited by:
    bsmt

  • Using bean value in NLS text entry

    Hi all,
    Is there a way I can use the JHeadstart NLS function like
    title="#{nls['HOME_PAGE_TITLE']}"
    and include a bean value in the title
    eg " Welcome #{jhsUser.userId} to my wonderful application".
    I use JHS_TRANSLATIONS to store my text - if I enter the value as above, the jhsUser expression does not get rendered
    Cheers,
    Brent

    Just after posting this message I saw that the exact same thing had been done in the page I had just generated !
    So, the answer is to use this
    text="#{nls['HOME_WELCOME_MSG: #{jhsUser.displayName}']}"Is there a way to inject this in through the JHeadstart application definition ? If I place the value in the Display Title property it further wraps the text with extra nls and {}.
    Is my only option to create a custom template for grouTemplate.vm ?
    Cheers,
    Brent

  • Bean value storing to varable:

    I want to assign the bean value to a variable can it be done:
    <% int age = <bean:write property="age"/> ; %>

    I want to store that value returned by the bean:write into a local variable so that i can pass it to a script ..
    eg:
    <logic:iterate name="resourceRequirementForm" property="grades" id="grade" indexId="index">
    str varname='<bean:write name="grade" property="value"/>';
    </logic:iterate>
    can this be done: storing of value i a variable

  • Portal devt - getting the bean value

    hi,
    i am trying to send my bean value as url but some how i am not able to get that value.  can somebody help me plese.
    my statement:
         srcUrl="http://multirater.standardbank.co.za/reportsdev/showlist.asp?per=<%=bwReportsBean.getGuid()%>" 
    here I wanted to use      bwReportsBean.getGuid() as value.  but it is giving error if i use per=.  your help will be highly appreicated.
    my full statement is:
    <hbj:isolatedHtmlContainer
              id="isohtmlCont" 
              width="100%" 
              height="600"            
              scrolling="AUTO" 
              bordered="false"          srcUrl="http://multirater.standardbank.co.za/reportsdev/showlist.asp? per=<%=bwReportsBean.getGuid()%>"            />     
    thanks a lot.

    Hello kata,
    Why dont you declare a variable and then pouplate the bean's value into the variable and then use the varialbe in the url.
    Pradeep

  • Display Javascript array value OnChange instead of Bean value

    I intially loop through a collection of employees display the values within the employee loop I have a select statement that i loop through a collection of programs that has on OnChange. I want to display the javascript value instead of the bean value onChange. The following code displays the bean value initally and onChange it displays both because the if is never false?
    *<c:if test="${programs[programIndex] != emps.department}">${emps.department}</c:if>*
    * <div id="programText"> </div>*
    * <input name="department" type="hidden" id="department">*
    JSP page
    <jsp:useBean id="programs" scope="request" class="java.util.Collection"/>
    <jsp:useBean id="employeeList" scope="request" class="java.util.Collection"/>
    <script language="JavaScript" type="text/javascript">
    var programs = new Array();
    function setProgramFields() {
    nameField = document.getElementById("programList");
    idx = nameField.selectedIndex;
    emField = document.getElementById("programText");
    emHiddenField = document.getElementById("department");
    emField.innerHTML = programs[idx];
    emHiddenField.value = programs[idx];
    <c:forEach var="emps" items="${employeeList}">
    <td width="170px">
    *<c:if test="${programs[programIndex] != emps.department}">${emps.department}</c:if>*
    * <div id="programText"> </div>*
    * <input name="department" type="hidden" id="department">*
    </td>
    <td width="275px">
    <div class="selectBorder">
    <select name="programName" type="text" class="searchProgram" id="programList" onChange="setProgramFields()">
    <c:set var="programIndex" value="0"/>
    <c:forEach var="sp" items="${programs}">
    <c:if test="${sp.programName == emps.programName}">
    <option value="${emps.programName}" selected="selected">${emps.programName}</option>
    </c:if>
    <c:if test="${sp.programName != emps.programName}">
    <option value="${sp.programName}">${sp.programName}</option>
    </c:if>
    <script language="JavaScript" type="text/javascript">
    programs[${programIndex}] = "${sp.department}";
    </script>
    <c:set var="programIndex" value="${programIndex + 1}"/>
    </c:forEach>
    </select>
    </div>
    </td>
    </c:forEach>
    Edited by: kmb_ms on Sep 15, 2008 2:38 PM

    Apologize for not formatting the code. I used the status.index the code as suggested. The code if more efficient but the results are the same and I still have the same problem.
    <select name="programName" type="text" class="searchProgram" id="programList" onChange="setProgramFields()">
    <c:forEach var="sp" items="${programs}" varStatus="status">
    <c:if test="${sp.programName == emps.programName}">
    <option value="${emps.programName}" selected="selected">${emps.programName}</option>
    </c:if>
    <c:if test="${sp.programName != emps.programName}">
    <option value="${sp.programName}">${sp.programName}</option>
    </c:if>
    <script language="JavaScript" type="text/javascript">
    departments[${status.index}] = "${sp.department}";
    </script>
    </c:forEach>
    </select> How can I access the value of the array to compare with the value of the bean.
    <script language="JavaScript" type="text/javascript">
    var departments = new Array();
    function setProgramFields() {
    nameField = document.getElementById("programList");
    idx = nameField.selectedIndex;
    emField = document.getElementById("departmentText");
    emHiddenField = document.getElementById("department");
    emField.innerHTML = departments[idx];
    emHiddenField.value = departments[idx];
    </script>The following code displays both the value of the bean and the value of the array onChange b/c the if statement is always true???? This is where I need help.
    <td width="170px">
         <c:if test="${departments[idx] != emps.department}">${emps.department}</c:if>
         <div id="departmentText"> </div>
         <input name="department" type="hidden" id="department">
    </td>

  • Getting bean value in portal devmt

    hi,
    i am trying to send my bean value as url but some how i am not able to get that value. can somebody help me plese.
    my statement:
    srcUrl="http://myurl.com/reportsdev/showlist.asp?per=<%=bwReportsBean.getGuid()%>"
    here I wanted to use bwReportsBean.getGuid() as value. but it is giving error if i use per=. your help will be highly appreicated.
    my full statement is:
    <hbj:isolatedHtmlContainer
    id="isohtmlCont"
    width="100%"
    height="600"
    scrolling="AUTO"
    bordered="false" srcUrl="http://myurl.com/reportsdev/showlist.asp? per=<%=bwReportsBean.getGuid()%>" />
    thanks a lot.

    i used a variable and added the string and the dynamic content and used this varialbe. eg:
    <%
    String myurlq = "http://myurl.co.za/reportsdev/showlist.asp?per=" + bwReportsBean.getGuid();       %>
    then
    <hbj:isolatedHtmlContainer
              id="isohtmlCont" 
              width="100%" 
              height="600" 
              srcUrl="<%=myurlq%>" 
              scrolling="AUTO" 
              bordered="false" 
              />

Maybe you are looking for

  • New to MacBook Pro - External hard drive advice

    I just ordered a MacBook Pro last night which will be my first mac computer and would appreciate any insight on external hard drives. Here are the specs for the MacBook: 2.6Ghz Quad-core Intel Core i7, NVIDIA GeForce GT 650M with 1 GB GDDR5 memory 8

  • Is the joystick Saitek X52 compatible with OS X?

    On Saitek website, it doesn't say anything about OS X... Some people told it works very well on thei MacBook Pro. So you might know if it works on OS X?

  • E-Business Suite R12 Oracle services loading sequence in Windows 2003

    Can anyone tell me what is the loading sequence for the following Oracle services for EBS R12 in Windows 2003. 1) Oracle Fulfillment Server service for VIS 2) Oracle Service VIS 3) OracleConcMgrVIS service 4) Oracle RDBMS TNS Listener 5) Oracle Tools

  • Oracle 8i Lite - Palm sync

    Hello, Does anybody has successfully run a HotSync synchronization between an Oracle lite 8i on a Palm and an Oracle 8i EE? The Hotsync process always gives errors in my environment. ----- (from the hotsync log) OK Memo Pad Unable to initialize threa

  • X-Fi Xtreme and Windows 7

    \ Hello. Has established on the sound card drivers from your site for Windows 7. The sound is, all is good. But a problem with films. The mode 5. does not work. In card options this mode is included. In films a stereo sound. In Windows XP all is good