Pass HTML snippet TO JSPX page

Hi
I have a backing bean. In page's backing bean I have a small HTML snippet (that is small MenuBar functionality) that has come OUt of database.
How can i pass this HTML snippet FROM this backing bean TO the jspx page ? Meaning this HTML snippet should go as HTML in the body of jspx page and then get rendered as MenuBar as jspx page runs .......
thx
dd

Are you using ADF in jour JSPX?
It isn't good practice to create HTML in your backing bean and then pass it to your page...
In JSPX you can create dynamic menus without any problems. There are methods enough to iterate a collection from your backing bean.
The complete idea of beans is to have a seperation between your view layer and other layers. You shoulnd't realy use that methode... Instead, get a collection that respresent your menu. For example a public List<MenuItem> getMenu(). In your jspx you can iterate it and output it correctly.

Similar Messages

  • Need Help with CommandLink Passing rowKeyStr to 2nd JSPX Page

    I've been working about 8 hours on something that should be simple - I have a databable displaying rows of data with a simple command link on one of the columns that will send the user to a 2nd page with a single record form showing detailed information for the selected row.
    The problems I'm having:
    * When I press the commandlink I do not get the correct record on the 2nd page
    * Also I'm receiving the following error: JBO-25020: View row of key oracle.jbo.Key[11 ] not found in SearchViewIterator
    When I use the af:tableselectone (selection) button to select the row first and then click the commandlink, the 2nd page DOES display the correct row, however I still receive the 25020 error above.
    Note I am using the same View Object and Iterator for both pages.
    I have compared my code against the SRDemo application and cannot see any differences - I was hoping someone could review my steps to see if I'm missing something (using JSF and ADF BC 10.1.3):
    Page 1 JSPX Code Snippet (commandLink / ActionListener):
    <af:commandLink actionListener="#{bindings.setCurrentRowWithKey.execute}"
    action="viewisp"
    text="setCurrentRowWithKey"
    disabled="#{!bindings.setCurrentRowWithKey.enabled}">
    <af:setActionListener from="#{row.rowKeyStr}"
    to="#{processScope.rowKeyStr}"/>
    </af:commandLink>
    Page 1 JSPX Page Definition File Snippet:
    <action id="setCurrentRowWithKey" IterBinding="SearchViewIterator"
    InstanceName="SearchDataControl.SearchView"
    DataControl="SearchDataControl" RequiresUpdateModel="false"
    Action="96">
    <NamedData NDName="rowKey" NDValue="#{row.rowKeyStr}"
    NDType="java.lang.String"/>
    </action>
    JSPX Page 2 (destination - single form) - Page Definition Snippet:
    <executables>
    <iterator id="SearchViewIterator" RangeSize="10" Binds="SearchView"
    DataControl="SearchDataControl"/>
    <invokeAction id="setCurrentRowWithKeyStr" Binds="setCurrentRowWithKey"
    RefreshCondition="#{adfFacesContext.postback==false}"/>
    </executables>
    <action id="setCurrentRowWithKey" IterBinding="SearchViewIterator"
    InstanceName="SearchDataControl.SearchView"
    DataControl="SearchDataControl" RequiresUpdateModel="false"
    Action="96">
    <NamedData NDName="rowKey" NDValue="#{processScope.rowKeyStr}"
    NDType="java.lang.String"/>
    </action>
    Finally - I did see some other posts related to the JBO-25020 error. The recommended Solution was to add the following code to the underlying ViewObjectImpl class:
    protected void create()
    {    setManageRowsByKey(true);
    super.create(); }
    This had no affect.
    thanks for any help.....
    ps what exactly is stored in the row.rowKeyStr? is it based on data columns in the row?

    Finally got this to work - thought I would post the solution that worked for me here in case anyone else runs into this:
    Note: Page#1 = Search Form - ADF parameter form and ADF read-only table (uses CommandLink to pass record to page#2)
    Page#2 = ADF read-only form - uses same VO and same iterator as page 1
    1. As Frank in his reply above, I don't need to use an ActionListener, but only use the commandlink for navigation. I did need also to set the current row when the user clicks the command link as described in the JDev help (Adding Tables | Setting the Current Object Using a Command Component) - this was a step I was missing before.
    2. NOW, here is where it gets Interesting - to avoid the issues of:
    a. page#2 not displaying the correct record selected, or, inconsistently displaying the correct record; and/or,
    b. receiving a "JBO-25020: View row of key oracle.jbo.Key[num] not found in xxIterator"
    I had to EITHER:
    A. Set the SyncMode for the DataControl in databindings.cpx = Batch (as described in      http://www.oracle.com/technology/products/jdev/tips/muench/batchmode/index.html)
    OR,
    B. Keep the SyncMode for the DataControl as Immediate, BUT override the following method in ViewObjImpl as described in some previous forum threads related to JBO-25020 error:
    protected void create()
    {     setManageRowsByKey(true);
    super.create(); }
    This is what I found (after much trial & error) worked for me - I'm curious to see if others have come to the same conclusions.
    thanks
    Tom

  • How to pass a value from jspx page to the managed bean

    hi,
    i have created a jspx page and manages bean with page flow scope..
    in my jspx page i am searching a employee record from the data base . and getting entire employee details including 'status' as a search result.
    here i want to pass the value of 'status ' field to the managed bean variable called 'stval'.
    can anybody suggest any solution?.......

    As per the details provided in the post above, when the user clicks on the search in the af:query, the results are populated in the table. And you are interested in getting the value of particular column. This could be done by having the custom row selection listener to get the value of the current row (selected row in the table).
    1) Have a custom selection listener:
    <af:table value="#{bindings.EmpDeptVO.collectionModel}" var="row"
    rows="#{bindings.EmpDeptVO.rangeSize}"
    emptyText="#{bindings.EmpDeptVO.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.EmpDeptVO.rangeSize}"
    rowBandingInterval="0"
    rowSelection="single" id="t1"
    partialTriggers=":::qryId1 ::ctb1 ::commandToolbarButton1"
    columnStretching="column:c1"
    styleClass="AFStretchWidth" columnSelection="multiple"
    first="0" contentDelivery="immediate" autoHeightRows="10"
    binding="#{pageFlowScope.ExampleBean.searchResultsTable}"
    *selectionListener="#{pageFlowScope.ExampleBean.rowSelected}">*
    2) In the method, set the current row programmatically:
    ADFUtil.invokeEL("#{bindings.EmpDeptVO.collectionModel.makeCurrent}",
    new Class[] { SelectionEvent.class },
    new Object[] { selectionEvent });
    3) Get the current row and get the required attribute values and set it in any of the variables in the managed bean:
    Row selectedRow =
    (Row)ADFUtil.evaluateEL("#{bindings.EmpDeptVOIterator.currentRow}");
    String status = selectedRow.getAttribute("Status");
    Thanks,
    Navaneeth

  • Link to HTML Snippet rather than Page

    I am uploading a 'Video' page with all of the videos embedding from Vimeo.com using HTML Snippets.
    I only want to have one 'featured' video and then thumbnails below of the other videos. The only way I can think move the thumbnail videos to the 'featured' spot is by copying/pasting the page, switching the embed code, and making visitors reload the entire page.
    Simply put, I would like to know if there is a way (or widget) which would allow you to switch the code on an HTML snipped via a hyperlink.
    Hope this makes sense & thanks in advance,
    Alex

    Hello Alex,
    Alex0liver wrote:
    http://vimeo.com/channels/hpx170
    I've had no experience with Vimeo but it seems this is your gallery there, correct ?
    If so, you can show only that gallery with iFrames :
    <iframe name="my vimeo"
    src="http://vimeo.com/channels/hpx170"
    onload="window.frames yyy'my vimeo'qqq.scrollTo(23,660)"
    style="width:930px; height:220px;
    border-width:2px;
    border-color:#339900;
    border-style:solid;"
    scrolling="no" >
    </iframe>
    replace qqq with ]
    and yyy with [
    the brackets are special mark up codes here to include a link... so can't have them in the iFrame sample code here.
    scrollTo(23,660) from left, top is how to position the content.
    Note : the gallery is 930 px long so your page that contains the iFrame must be a bit longer.
    Kind regards,
    Leo

  • Showing HTML content in jspx page

    Hi,
    We have stored text/html email messages in database and we want to display this on our page.
    I tried with af:richTextEditor its not showing actual space & font. Few extra line breaks are added.
    I tried af:outputText with escape=false it looks perfect. But all the menu items, command links, tab header label are started showing underlines and the UI looks odd. When I check the documentation it says
    "In addition, nearly all attributes are ignored when "escape" is set to false"
    I believe this is the reason the UI is showing odd.
    All I need is just to show a html content inside a panelGroupLayout. Any suggestions?
    Thiru

    Hi,
    here's what I think works best:
    1. add an ADF Faces inlineFrame component to the page
    2. Have the inlineFrame source property pointing to a servlet that reads and streams the HTML from the database as an HTML document
    Frank

  • HTML Snippet does not exist as a Widget option in iWeb 09

    I have iWeb 09 on my machine. I'm trying to insert an HTML Snippet onto a page so i can drop in the code for a XSPF player.
    When i choose "Show Media", under Widgets there are only four, and HTML Snippet isn't one of them. I only have:
    MobileMe Gallery
    Google AdSense
    iSight Photo
    iSight Movie
    I also don't have the YouTube widget, the Google Map Widget--these i only know about by looking in support and seeing that these should all be there.
    Any thoughts as to how i can get HTML Snippet available in my media widgets? My site is almost completed and ready to publish. Without this feature it will be pointless to publish at all.
    Many thanks for any suggestions!
    Peter

    Can you post the code you are using so that we can see what the problem is?

  • HTML Snippet widget bug report.

    Dear Apple iWeb 08 Engineers.
    I didn't know where to send this bug report and so I have resorted to this forum. I hope it gets to you somehow.
    When creating a simple HTML Snippet in a page it seems that the piece of code that refers to the newly created widget in the .html for the page has a bug in it. For example, I have a page on my website called "Animation"; it has a simple HTML Snippet the code for which has been tested (by viewing the file widget0_markup.html in a browser). In Animation.html the following line appears
    <iframe id="widget0-frame" src=".//Animationfiles/widget0markup.html" frameborder="0" style="width: 100%; height: 100%;" scrolling="no" marginheight="0" marginwidth="0" allowTransparency="true"></iframe>
    Surely the pathname in the "src" option is in error (what the **** is .//?). If I change it to ./ by hand then everything works. Please change this asap, because at the moment I have to go into every page and change it by hand after publishing.
    Many thanks, Marvin.

    Thanks for the reply, but I'm afraid that I'm not convinced.
    In all the flavours of unix that I've ever used ./ is the current directory, ../ is the parent directory and ../../ is the grandparent directory (not .// as you suggest). In any case, the path name of source file in question is ./Animationfiles/widget0markup.html (assuming the code in question is in the file Animation.html) and so going up the tree into the grandparent directory is not what you want to do anyway; the directory Animation_files is always in the same directory as Animation.html and the file widget0_markup.html is saved, by iWeb upon publication, in the directory ./Animation_files.
    In short, I still think it's a bug, but thanks for the advice; I apologise if I am wrong.
    Marvin.

  • Why won't my html snippets appear in any browser?

    My website is created in iWeb 3.0.4. My server is Machighway and I upload via FTP using Cyberduck.
    The problem I have been having, even on my old server before I transfered to Machighway is when I add any HTML snippet into my page, it works just fine in iWeb, but when I publish, there is just a blank space where the widget should be. I have tried viewing the site in Safari and Firefox.
    I have opened iWeb and taken a screenshot to show you the twitter widget:
    Now here is how it looks in Safari after publish:
    I have tried different html snippets, and I have the same problem with all of them. I have asked Machighway and they said they can't help me because it's a coding problem.
    Can anyone shed any light on this? Thanks!

    Oh, I see, you do not want the Sitename in the URL?
    Read this :
         The concept of iWeb Sites
    A Site, which is just a folder, is a convenient way to organize your pages based on topic, subject or whatever you choose to keep relevant pages together. I’ve been doing that for the past 17 years, and I find it rather natural.
    But since iWeb is doing it, it seems to confuse & frustrate people. iWeb shouldn’t do it, they say. As if there is a law that demands it.
    To avoid the Sitename in the URL, read my solution. It's very technical but in the end it saves time. And best of all, iWeb is not involved :
         Avoiding the iWeb Sitename in the URL
    An easier, time-wasting, solution is to publish to a folder on your desktop.
    Open that Site folder and move the content of that folder to the root of the webserver with a FTP application.
    (The root of a webserver is where the file or folder, shown immediately to the righthand side of the domainname, is stored.)
    Everytime you make changes to a page, you have to repeat these steps.
    But the result is what you want.
    And here's a re-post with some additional info about using an index.php file to avoid overwriting the index.html file iWeb creates :
        Avoiding the iWeb Sitename in the URL
    Works on all servers. With or without a subdomain I may add. Like this one :
         http://wyodor.byethost8.com/htdocs/index.html
    Not as easy as publishing to a folder, but in the end it saves time. Again.
    See this post that explained the link above :
    Re: iWeb keeps populating a site name at the end of my url.  Causing error.

  • Html snippet is not working on iweb 9. i can't write a code, Html snippet is not working on iweb 9. i can't write a code

    Html snippet is not working on iweb 9. i can't write a code, Html snippet is not working on iweb 9. i can't write a code

    You don't get this window when you insert an HTML snippet on the page?
    Click to view full size
    If you don't try the following:
    delete the iWeb preference files, com.apple.iWeb.plist and com.apple.iWeb.plist.lockfile, that resides in your Home() /Library/Preferences folder.
    go to your Home()/Library/Caches/com.apple.iWeb folder and delete its contents.
    Click to view full size
    launch iWeb and try again.
    OT

  • Html snippet not displaying live info

    Hi, this is my first post. I hope someone can help me? I've inserted a html snippet on a page which has an <IFRAME SRC = > code pointing to a .html file on my server. I know the destination it's pointing to displays correctly as I can load this up in a separate window and it displays exactly the way it should, exactly the way it's written and the images inside it. However in iWeb I can't see the live view inside the html smippet. I've tried re-inserting the html snippet, but I can't get iWeb to show me exactly what my page will look like. However when I publish my site, either via MobileMe or to my server, it displays fine. Why isn't iWeb displaying the correct live info? Thanks for helping.

    Why isn't iWeb displaying the correct live info? Thanks for helping.
    Sometimes you simply have to imagine what it will look like in a browser.
    It's called webdesign. Create a lot of page to get the hang of it and you will get used to it.

  • HTML Snippet Question

    Hi All,
    I'd like to create a mouseover js for two image files. One being the initial image and the second being when it is moused over.
    I'm wondering where I would put these image files so they can be read and dealt with by the script/snippet.
    Thanks.

    You put the images in a folder on the server.
    Look at the source of this page.
    http://web.mac.com/wyodor/_Demo/MouseOver.html
    The <img> element is pasted in the HTML Snippet.
    The page itself is created by iWeb. It's name widget0_markup.html

  • Adding an HTML Snippet

    I'm either going crazy or something is not right here. I have a new site in iWeb and I am trying to add an HTML Snippet to the page. Everything I read on this site or in the help pages suggests that once I add the widget to the page I should be able to double-click on it and a popup window will appear in to which I can add my code.
    However, when I double click on the widget I get a blue outline around it and nothing happens. I get no window, I can't type in to the widget frame, nothing.
    Does anyone have any suggestions what I might be doing wrong?
    Thanks
    Simon

    Lorna,
    I am using widgets in a couple of different ways.
    First to put in a banner just decorative stuff
    look here
    http://www.mireillegreen.com/Frenchresources/French_ResourcesMain.html
    When the page is loaded you should see some photos of paris pushing one another
    and on this page I used the widget to display French news papers without leaving my site.
    http://www.mireillegreen.com/Frenchresources/newspapers.html
    Best regards
    Mireille

  • HTML Snippet annoyance

    Hi
    Have a simple website with a HTML Snippet successfully showing one tripadvisor snippet.
    However, added a new HTML Snippet to the page pointing to something else, and when published locally, looks fine, but when loaded to the web, keeps duplicating the first HTML Snippet so that I end up with TWO HTML Snippets showing the same information. Have deleted them both, started again, republished, perhaps done this three times now, simplyfing the process to make sure I wasnt duplicating it.
    But no, each time I publish to the net, (and clear the browser cache too) I get two versions of the HTML Snippet for the Tripadvisor, and not the google one I wanted
    Anything to tell me?
    Thanks n all

    That can happen. Especially in Safari.
    Brute force to the resque.
    Reload the page frantically : Command-R
    If that does not help, open the Activity window in Safari : Command-Option-A
    Then double-click both widgetmarkup files and reload them.
    Close both windows and load the webpage again.
    If all else fails. Clear the cache and/or quit/start Safari again.

  • Redirect in iWeb08 using HTML Snippet works only on preview

    Hello, I'm trying to redirect a page in iWeb08 using an HTML Snippet.
    It works fine on the preview, but on the live site it only gives me a blank page (the page to be redirected is blank apart from the snippet). Any ideas where I'm posisbly going wrong? It's a GoDaddy-hosted site, and all is fine on that front. It's just the redirect doesn't seem to work live. I've tried a few variants, all of which work fine in preview but not live.
    Many thanks

    Are you using the following script in the HTML snippet ON the page being redirected, not on the destination page?
    <script type="text/javascript">
    parent.location.replace('URL TO PAGE YOU WANT TO REDIRECT TO');
    </script>
    See this demo page: Redirect
    OT

  • HTML Snippets and Opening in New Window?

    Hello,
    New to iWeb and this forum. Have been developing a site and I have been using an html snippet on one page. I would like to have that page open in a new window, therefore, I would like the link to that page to open the window. I know about the "check box" when creating links that makes this happen. However, as this is in the navigational menu on the top of the page, there isn't an option for this in iWeb.
    Can you help please? Thanks in advance.

    Koeklin,
    Thanks for the reply. I was trying to do this a different way, and I'm sorry if I haven't expressed myself clearly.
    I have been using Blogspot for a company blog. I wanted to incorporate this blog into my iweb site. However, I don't want to lose what I have already done in Blogspot (can this easily be transferred? I don't know).
    So what I was doing was this...
    I have on my site a page labeled "blog." When this link is clicked, I show, via html snippet, the blog from Blogspot, but because of how the snippet shows on my page, it does not show the menu at the top of the Blogspot page (which is what I would like). I'm trying to make the blogspot blog appear to be an original part of my site, even though it isn't. I was hoping to have this blog page open in a new window with the Blogspot blog present on my blog page. I'm pretty sure everyone is confused by now...
    Or, maybe to make things easier, is there a way to incorporate a "back" button on this page to go back to the site?
    I'm sorry if this is confusing....

Maybe you are looking for

  • New development with time remap tool

    It turns out my time remap tool works just fine in other projects just not this one. I do have alot of still shots with some motion graphics which is starting to extend my render times extensively. My question is, how do I solve this rendering time p

  • Network problems after update; system reinstall not fixing it.

    Hello, first post here ^^ Sorry if I write with a bit of engrish. I'm very tired ^^" My brother's laptop, a Portuguese Classmate PC (aka "Magalhães", version MG2 -- unfortunately, I can't find the corresponding international version, but have a pictu

  • My Selector Stops Blocking

    Hello everyone, I am very new to using Java NIO and am having a problem. My server works for a short time, but when I try to stress it (particularly by having it read and write at the same time), it seems to break. Specifically, when I call select on

  • Workflow to be fired from F-22

    Hi, My requirement is that a workflow has to be fired whenever an invoice document is posted from F-22.There are no standard templates available. Can anybody help me with some business object or user exit. I am in version 4.6C. Regards, Moinak

  • Update Purchasing group directly in production system

    Hi, We keep getting purchasing group changes requests and we follow conventional approach, configure in development - move to Quality and then to Production. Since we have high number of requests, we are exploring the direct maintenance in Production