How would I insert custom HTML built in a managed Backing Bean into a page?

I believe I could solve a project requirement if I could generate/build custom HTML in a managed Backing Bean and insert or place the output between f:verbatim elements.
The custom HTML output would be similar to:
<ul id="menu" class="view">
<li>New Search</li>
<li>Subscriber
<ul>
<li>Device List
<ul>
<li>New Device</li>
<li>Device</li>
</ul>
</li>
<li>Inbox List</li>
<li>Resend</li>
</ul>
</li>
</ul>Looking at the JSF 1.1_01 API, I don't believe there is a placeholder element?
What is the best approach to do this?
Thanks,

This is exactly what you want:<h:outputText value="#{myBean.htmlString}" escape="false" />where getHtmlString() just returns a plain String object with the HTML in it.
A custom component would be a more clever solution anyway.

Similar Messages

  • How to insert custom HTML before /body ?

    I love that I can insert custom HTML in the <head> of a page in Muse.
    However, I need to add custom HTML just before the end of <body>.
    Namely, I want to insert custom Jquery calls just before </body>. I can't do this in the <head>.
    However, other uses for other people might include inserting Analytics tracking code before </body>, as this is more optimum than in the <head>.
    I've tried using a Custom HTML widget, but even if I put it in the footer of my page, it still ends up appearing in the rendered HTML before Muse's Javascript. I need it to come after Muse's Javascript.
    Thanks in advance.

    Hi Harry,
    Please check this discussion, you might find it helpful in making the jQuery calls.
    How to (make best) use external js library from html object (need help from dev)
    http://forums.adobe.com/thread/1213057
    - Abhishek Maurya

  • Can't insert custom HTML or change social widgets to update Phone layout

    MUSE 2014.2.1.10, CL 787362  on  Windows 8.1  i7 processor 24 GB RAM
    Anytime I try to insert custom HTML in the phone layout pages I get a window that says webpage could not be found  in a window that is too wide for the screen size and can't be re-sized!!!
    I am adding scripts, inline css and custom form code.  Need to republish changes and can't on mobile layout.  Its local code but I get The webpage cannot be found error!!! It also does this with the built in social widgets....  The code is there in the page on export but you can't preview and since I can't resize the box to 380px wide ( it jumps back open) it throws off my layout when export page.   This is not just custom HTML but upon changing or adding any of the built in social widgets such as Google maps, Facebook or  other social media.  Forms, buttons, menus and compositions no problems... they work just as they normally would.
    Preview mode just gives me the whole page as blank when I try to preview the page in Muse.  HELP  I need to update the address and the form to match the desktop site but the error is persistent! and undo does not revert it back to previous content  I just get the webpage cannot be found box even on undo!!!!

    The SECOND picture in my previous post  IS THE PREVIEW... NOTHING appears when I try to view the page in phone view!!!!
    HERE IS THE CODE!!!!!
    <style type="text/css">
    input[type="text"]
    color: #323232;
    border: 1px solid #E0E0E0;
    margin: 5px;
    fieldset {
    border:1px solid #E0E0E0;
    padding:10px;
    width: 350px;
    legend {
      padding:10 px 10 px;
      border: none;
      color:323232;
      margin:10px;
    textarea
      width: 328px;
      min-height: 14px;
      border-width: 1px;
      border-style: solid;
      border-color: #E0E0E0;
      padding: 6px;
      color: #323232;
      line-height: 14px;
      margin: 10px;
    button[type="submit"]
      text-indent:0;
      border:1px solid #E0E0E0;
      display:inline-block;
      background-color:white;
      color:#323232;
      font: Arial,  sans-serif;
      font-size:12px;
      font-weight:bold;
      font-style:normal;
      height:25px;
      line-height:25px;
      width:125px;
      text-align:center;
      margin-top:5px;
    button[type="submit"]:hover {
                  color:#679E11;
    button[type="submit"]:active {
      position:relative;
      top:1px;
    label.label-top {
    display: block;
    margin-top:5px;
    </style>
    <form  name="emailForm" id="emailForm" onsubmit="return validateform();" action="contact-us.asp" method="post">
    <fieldset>
      <legend>E-Mail</legend>
      <div>
      <label class="label-top" for="name">
       Enter your Name:
      </label>
      <input type="text" name="name" id="name" size="30" class="inputbox" value="" />
      </div>
      <div>
      <label class="label-top" for="mail">
       E-mail address:
      </label>
      <input type="text" id="mail" name="mail" size="30" value="" class="inputbox" maxlength="100" />
      </div>
      <div>
      <label class="label-top" for="subject">
       Message Subject:
      </label>
      <input type="text" name="subject" id="subject" size="30" class="inputbox" value="" />
      </div>
      <div>
      <label class="label-top" for="text">
       Enter your Message:
      </label>
      <textarea cols="50" rows="10" name="text" id="text" class="inputbox required"></textarea>
      </div>
      <div>
      <input type="checkbox" name="email_copy" id="email_copy" value="1"  />
      <label for="email_copy">
      E-mail a copy of this message to your own address. </label>
      </div>
      <div>
      <button class="button validate" type="submit">Send</button>
      </div>
    </fieldset>
    </form>
    <script type="text/javascript">
    function validateform()
    var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
        if (document.emailForm.name.value == '') {
            alert('Name is required');
      return false;
        else if (document.emailForm.mail.value==''){
            alert('Address cannot be blank');
      return false;
       else if (document.emailForm.mail.value.search(emailRegEx) == -1) {
              alert("Please enter a valid email address.");
         return false;
        else if (document.emailForm.text.value==''){
            alert('Message field cannot be blank');
      return false;
      else
          alert('Thank you for contacting Argus Talent.');
      return true;
    </script>

  • How to create a custom plugin in Oracle Access Manager to create a cookie

    How to create a custom plugin in Oracle Access Manager to create a cookie or Header Variable..
    Vipin

    Its has more steps which you need to consider in addition to Note:101048.1 which is mentioned by Prashant_Pathak. Both notes have enough information. If not, let's know what else you need to set

  • How can I incorporate new backing beans into a Webcenter Spaces Server?

    I am using the WebCenterSpaces application in Customization Developer Role to make changes to some taskflows for a customer. In order to implement a desired change in the Nav Model for the customer, I had to write 3 very small backing beans. They compiled fine, the taskflow let me add them as managed beans. It even new about these backing beans, presumably because I compiled them. I made changes to the .jsff file to use them and that worked fine. However the metadata.mar created when I deploy the application does not have these new classes, so they will not get put into the WC_Spaces server when I use WLST to import the metadata. Can anybody tell me how to get new backing beans into WebCenter Spaces?
    I cant be the only one who has had to do this.
    Thanks.

    I don't know if you can import as part of the metadata import but an alternative will be to create a shared library out of your java classes and referencing the shared lib in spaces.

  • How to get the value of a checkbox in the backing bean

    How to get the valaue of a checkbox in the backing bean?

    Hi this may help you for selecting single check box
    <h:outputText value="Enabled : "/>
                              <h:selectBooleanCheckbox value="#{Bean.isEnabled}"/>                    
                              <h:commandButton value="Submit" action="#{Bean.submit}"/>
    private Boolean isEnabled;
        public Boolean getIsEnabled() {
            return isEnabled;
        public void setIsEnabled(Boolean isEnabled) {
            this.isEnabled = isEnabled;
        public String submit(){
         System.out.println(isEnabled);
            return isEnabled;
        }for selecting multiple check box
                              <h:selectManyCheckbox value="#{Bean.items}">
                                  <f:selectItem itemLabel="one" itemValue="one" />
                                  <f:selectItem itemLabel="two" itemValue="two" />
                                  <f:selectItem itemLabel="three" itemValue="three" />
                               </h:selectManyCheckbox>
                   <h:commandButton value="Submit" action="#{Bean.submit}"/>
    private List<String> items;
        public List<String> getItems() {
            return items;
        public void setItems(List<String> items) {
            this.items = items;
        public String submit(){
            System.out.println("List : " + this.items);
            return "done";
        }Hope this helps you

  • Inserting custom HTML tags into a HTMLDocument to be displayed in a JEditor

    Does anyone know how to insert custom tags into a HTMLDocument to be displayed in a JEditorPane?
    I have tried using the following code,
    kit.insertHTML( doc,
                    jep.getCaretPosition(),
                    "<testtag>FFFF</testtag>",
                    0,
                    0,
                    new HTML.UnknownTag("testtag") );When the above code is run the handleStartTag, handleEndTag and handleText methods are called on the HTMLReader but nothing is inserted into the document model? Can anyone help?
    I have created an instance of HTML.UnknownTag,
      public static HTML.Tag testTag = new HTML.UnknownTag("testtag");I have subclassed HTMLEditorKit and overridden the getParser() method,
      protected Parser getParser(){
        DTD dtd = null;
        try {
          dtd = createDTD( DTD.getDTD("html32"), "html32" );
        } catch ( Exception e ) {
          e.printStackTrace();
        dtd.getElement( "testtag" );
        Parser p = new ParserAdaptor( new DocumentParser( dtd ) );
        return p;
      }I have subclassed HTMLDocument and HTMLDocument.HTMLReader and created a TagAction for my new tag.
    The following code works fine, the custom tag is in the document model,
        String contents =    "<html>"
                           + "<body>"
                           + "<testtag>Here is some text</testtag>"
                           + "</body>"
                           + "</html>";
        ((HTMLDocument)jep.getDocument()).setPreservesUnknownTags(true);
        jep.setText( contents );

    I've been trying to get <blockquote> insert working in an editor but it seems to be a quite difficult task even if it's only about inserting a couple of tags into the right slot! This is the closest I got:
    HTMLDocument doc = (HTMLDocument)editor.getDocument();
    int start = editor.getCaretPosition()
    int paraStart = doc.getParagraphElement(start).getStartOffset();
    int paraEnd = doc.getParagraphElement(start).getEndOffset();
    String insideBlockQuotes = doc.getText(paraStart, paraEnd - paraStart);
    doc.setOuterHTML(doc.getParagraphElement(start),"<blockquote><p>"+insideBlockQuotes+"</p></blockquote>");
    This is how it works: Get the current paragraphs start and end positions, read the text between the start and end into a string, replace the paragrapElement with <blockquote><p>..the text from string..</p></blockquote>.
    This works 'in about' but it's far from perfect.. it has the following problems:
    1. It looses all formatting from the quoted paragraph (bold etc. tags from the quoted part)
    2. It assumes that the paragraphElement was a <p> (could have been another element too!)
    3. It's ugly
    Anybody come up with a better way to use blockquote?

  • HT1040 I must not have chosen a hard back book when I started my project of creating a photo book. When I go to buy the book it only allows a small soft cover book. How would one go about changing it to a hard back book?

    I must not have chosen a hard back book when I started my project of creating a photo book. when I go to buy the book it only allows me to buy the small soft cover book. How would one go about to chage the settings?

    What version of iPhoto?
    THe basic answer to duplicate the book as things may change when you change size, select themes again and pic the cover and  size you want -
    Before ordering your book preview it using this method - http://support.apple.com/kb/HT1040 - and save the resulting PDF for reference - the delivered book will match it.
    LN

  • How to read values of dynamic UI elements in a backing bean?

    Hi, I have an ADF page where some of the UI elements (in this case, checkboxes) are dynamically rendered as such:
    <af:forEach var="row" items="#{backing_testPage.userList}">
    <af:selectBooleanCheckbox id="checkbox" value="#{row.id}"
    text="#{row.name}" selected="#{row.userSelected}"/>
    </af:forEach>
    I am wondering how can I read the values of these checkboxes in my page's backing bean. It does not seem possible to specify a distinct binding value for the selectBooleanCheckbox elements in order to tie them to a CoreSelectBooleanCheckbox variable in my backing bean (so that I could check whether the checkbox is selected or not).
    When the page gets rendered, I did see that the checkboxes get assigned distinct ids like checkbox_1, checkbox_2, checkbox_3, etc... Not sure if that would help with this.
    Would appreciate any tips on this as I've been struggling with this for awhile. Thanks!

    You probably would do better with a SelectManyCheckbox. Here's how:
    In your backing bean you need:
    private String[] usernames;
    public String[] getUsernames () {
      return usernames;
    public void setUsernames (String[] _usernames) {
      usernames = _usernames;
    }In your page:
    <af:selectManyCheckbox value="#{backing_testPage.usernames}">
      <f:selectItems value="#{backing_testPage.userList}"/>
    </af:selectManyCheckbox>When the form is rendered any strings in the usernames array that are in the userList will be checked. When submitted, any checked items will be in the array.

  • How to call the Reset of af:query in a backing bean .

    Hi, Could some one help me to call the Reset function of af;query by a backing bean. Since i need to refresh the LOV's in the search panel, i need to call the reset operation in the custom code. . thanks.

    Here is the test case Frank.
    I'm having a af:query component and search fields are populated by choice-list LOV .... The VO populating the lov attribute is , is set with auto refresh . In case of new records in the DB, i want the lovs at the search fields of af:query getting updated automatically. Right now , if i click the Reset button then the lovs are getting updated. So i wanted to do the reset programmaticaly to update the lovs of af:query.

  • How to set values in a CoreTable programmatically from a backing bean

    Hi,
    One of the columns in my CoreTable is "af:inputText" field, I need to set the value of inputText field in each row from a backing bean.
    I have bound this table to a component in the bakcing bean and in the setMyCoreTable method I'm also preselecting certain rows. For all the preselected rows I need to set a value in the inputText field.
    Can someone point me to some code samples or give me some ideas to solve this.
    Thanks

    Thanks dvohra,
    I looked at the post you suggested yesterday, but I wasnt sure how I can implement that in my case.
    Since Im programatically preselecting certain rows in the setMyCoreTable method(which is the accessor method), I was hoping I could prepopulate the input text field as well in the same method.
    For your reference below is the code from jspx and the backing bean.
    <af:table value="#{bindings.ProgramComponentList.collectionModel}"
    var="row"
    rows="#{bindings.ProgramComponentList.rangeSize}"
    first="#{bindings.ProgramComponentList.rangeStart}"
    emptyText="#{bindings.ProgramComponentList.viewable ? 'No rows yet.' : 'Access Denied.'}"
    selectionState="#{bindings.ProgramComponentList.collectionModel.selectedRow}"
    selectionListener="#{bindings.ProgramComponentList.collectionModel.makeCurrent}"
    binding="#{backing_EditProgramBean.compsTableComponent}">
    <af:column sortProperty="Name" sortable="true"
    headerText="#{bindings.ProgramComponentList.labels.Name}">
    <af:outputText value="#{row.Name}"/>
    </af:column>
    <af:column sortProperty="Description" sortable="true"
    headerText="#{bindings.ProgramComponentList.labels.Description}">
    <af:inputText value="#{row.Description}" simple="true"
    required="true"
    columns="30"/>
    </af:column>
    <f:facet name="selection">
    <af:tableSelectMany id="tableSelectMany1"/>
    </f:facet>
    </af:table>
    CODE FROM BACKING BEAN ---------
    public void setCompsTableComponent(CoreTable compsTableComp) {
    ManageProgramsServiceImpl serviceImpl =
    (ManageProgramsServiceImpl)JSFUtils.get("#{bindings.ProgramDetailIterator.dataControl.dataProvider}");
    ViewObject searchProgramView = serviceImpl.findViewObject("SearchProgramView");
    Row currProgram = searchProgramView.getCurrentRow();
    ViewObject view = serviceImpl.findViewObject("ProgramComponents");
    view.setWhereClause("ProgramsComponents.PROGRAM_ID = " + currProgram.getAttribute("ProgramId"));
    view.executeQuery();
    view.setRangeSize(view.getRowCount());
    view.executeQuery();
    Row[] programComponents = view.getAllRowsInRange();
    RowKeySet rks = new RowKeySet();
    ViewObject compTypesView = serviceImpl.findViewObject("ProgramComponentList");
    compTypesView.setRangeSize(compTypesView.getRowCount());
    compTypesView.executeQuery();
    Row[] compTypes = compTypesView.getAllRowsInRange();
    for (int i = 0; i < compTypes.length; i++) {
    String code = compTypes.getAttribute("Code").toString();
    for(int j=0; j<programComponents.length; j++){
    String programCode = programComponents[j].getAttribute("ComponentType").toString();
    if(programCode.equalsIgnoreCase(code)){
    rks.getKeySet().add(compTypes[i].getKey());
    compsTableComp.setSelectionState(rks);
    List li = compsTableComp.getChildren();
    System.out.println("****** li : " + li.size());
    //System.out.println("****** row count : " + compsTableComp.getRowCount());
    //System.out.println("****** count : " + compsTableComp.getRows());
    this.compsTableComponent = compsTableComp;
    The table children size(li.size()) comes up as zero and [compsTableComp.getRowCount()] gives an exception. Can you please provide any help. Seems like Im off track with this whole thing.
    Thanks

  • How to insert customized HTML tags?

    Hi
    I insert a lot of tags like <p class="foo"> or say <span onmouseover=”doAction(this);”>.
    Is it possible in Dreamweaver CS5 to extend a list of insertable tags with my customized tags and do steps like
    select some text (say “some text”),
    them choose a tag from the list (say <span onmouseover=”doAction(this);”>.)
    A fragment “<span onmouseover=”doAction(this);”> some text</span>” will be inserted into the file instead of  selected “some text”.
    Thank you in advance.

    Have you used the Snippets folder to store reusable code fragments?
    I use my snippets folder often. Go to an insertion point in your document and double click on the Snippet.
    http://webdesign.about.com/cs/dreamweaver/ht/htdwusesnip.htm
    Another option is to create and use commands from History steps:
    http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-7780a .html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • How do I insert a HTML button into my mail signature.....

    the button is working elsewhere.
    Thanks

    Hello
    be sure to send your email into HTML format end be sure your corespondant read mail as HTML format
    as you can not be sure of your coresspondant email setting , you can not be sure as your mail is read
    Pierre

  • How can I insert a table in headnote so it will show on each page?

    I would like to insert a table in the headnote, but I don't know how with this new pages layout. Suggestions?
    Thank you much

    It isn't possible to do. Maybe can make the tables as an backround image. http://help.apple.com/pages/mac/5.0/?lang=en#/tan9fdc65243

  • Help. How do you TAB from HTML component to applet (and back) ?

    How can one tab between applets in a browser, and from an applet to an HTML component?
    For example, I have the following in my page in decending order:
    an HTML text field,
    an applet containing two components,
    and another HTML text field.
    When focus is on the first HTML text field pressing TAB should shift focus to the first component of the applet, the next TAB press shifts focus to the second component of the applet, and the next TAB press shifts focus to the other HTML text field. Then another TAB press cycles back to the first TEXT field.
    I can handle the tabbing within the applet using the FocusManager, but how can I get the applet to receive focus on a TAB from the browser, and once the applet has focus, how can I give focus back to the browser when a TAB occurs from my last applet sub-component?
    At the moment a user has to click on the applet before he can tab in it, and then click outside it to tab in the html again.
    Any help appreciated, as I cant find any reference to how to do this apart from other people asking the same but getting no replies.
    Thanks,
    Menno

    I see what you are saying. Either use javascript with LiveConnect or go all applets.
    What we are actually doing at the moment is trying to componentise using small applets passing data via InfoBus. So I guess we could use only applets as you suggest. Either with getAppletContext, or we could have a data item on the InfoBus which contains the name of the required in-focus applet, and all applets listen to see if it is their name, and if so request focus.
    I'm suprised applets are not tab-able between by default. I would have thought this was a common requirement.
    I'll look into LiveConnect as well, and let you know how we get on.
    Cheers,
    Menno

Maybe you are looking for