Titles in Templates?

I'm having a problem I've never encountered before. I created
my own .dwt template to use in my web site. Everything (I thought)
was going fine, and I applied my new template to one of my pages. I
was able to bring in the text from my old site, but when I tried to
type a title into the title box, as soon as I pressed 'enter' or
clicked the mouse elsewhere in the page, the title I just entered
disappeared. (Note: The title box on my template page is blank.) I
tried to put the title directly into the code and it won't let me
type anything in there. Any ideas? Thanks.

Create a NEW, blank page. Use FILE | Save as Template..., and
save it with
a name. Look at the code in the head of that page. Make your
template's
title tag look the same.
This is a symptom of NOT using the proper procedure to save
your template.
By the way, you'll also need to copy the editable region
called "head" from
your dummy page into your current template page....
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"kpchop" <[email protected]> wrote in
message
news:epl14t$o4v$[email protected]..
> I'm having a problem I've never encountered before. I
created my own .dwt
> template to use in my web site. Everything (I thought)
was going fine,
> and I
> applied my new template to one of my pages. I was able
to bring in the
> text
> from my old site, but when I tried to type a title into
the title box, as
> soon
> as I pressed 'enter' or clicked the mouse elsewhere in
the page, the title
> I
> just entered disappeared. (Note: The title box on my
template page is
> blank.)
> I tried to put the title directly into the code and it
won't let me type
> anything in there. Any ideas? Thanks.
>

Similar Messages

  • Set browser window title in template page

    Hi,
    How I can set the window title in template page ?
    I know how to do it in regular page:
    <af:document id="d1" title="Dashboard">
    But in template I don't have a document tag.
    so I added this before the <af:form> :
    <html>
    <head>
    <title> My title </title>
    </head>
    </html>
    But the problem is that I want to insert in the title something like that:
    title="#{generalPage.serverName}"
    Any ideas how can i do it ?
    Thanks

    You don't set the title in the template, you set the title in the page that is based on the template.
    There you will have the af:document tag.

  • How do I create a title caps template?

    Is it possible to create a template so that text automatically Is In Title Caps Format Like This? I want to then import it to my iPad.

    Hi Naomi,
    You can do that in a Text Box. Select the text and
    Menu > Format > Font > Capitalisation > Title Case
    Menu > Format > Advanced > Define as Placeholder Text
    Save as Template.
    Open the Template and click on the Placeholder text.
    Type in lower case (hello world) to replace the Placeholder Text to see Title Case
    Or you can do it in a Word Processing document (in the body text, not a Text Box.)
    Edit: further testing you can have either a Text Box or Body text in a WordProcessing document and it will work when you type in lower case.
    Regards,
    Ian.

  • Changing Document Titles in Templates

    Hi all
    I know this must be something I am missing that is easy - but
    I cannot figure out how to change my Document Titles in files that
    are using a single Template. They cannot be edited in the file, as
    they are locked in the Template. How do I unlock the Title in the
    Template so I can make the Document Titles different? This must be
    an easy one - I've just been working too long today and am under a
    deadline.
    Thanks for the help -
    Q

    A properly made template will allow you to edit your child
    page document
    titles. The fact that you cannot means you have not used a
    properly made
    template. To see what I mean, do this -
    Create a new page.
    Use FILE | Save As Template..., and give it a name.
    Look at the code - see the editable region around the
    <title> tag? That's
    what yours should look like.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "QuimbyDog" <[email protected]> wrote in
    message
    news:ejqivb$639$[email protected]..
    > Hi all
    >
    > I know this must be something I am missing that is easy
    - but I cannot
    > figure
    > out how to change my Document Titles in files that are
    using a single
    > Template.
    > They cannot be edited in the file, as they are locked in
    the Template.
    > How do
    > I unlock the Title in the Template so I can make the
    Document Titles
    > different?
    > This must be an easy one - I've just been working too
    long today and am
    > under
    > a deadline.
    >
    > Thanks for the help -
    > Q
    >

  • Editing Titles of Templates

    Try as I might I cannot see how to edit the tite of one of my user templates in my Pages (5.0.1) Templates folder. I have inadvertantly saved it as "untitled" and I wish to give it its proper name.
    Where am I going wrong please?

    Doh!!! Of course - sometimes the obvious is just too obvious for us oldies!!!!!
    Many thanks for putting me right.

  • Please inform me where I can get the title template as the plugin for Adobe Premiere Pro CC 2014?

    Dear Adobe Premiere friends,
    Previously I the user of Pinnacle Studio which I can easy use the Title style/template, now I'm using Adobe Premiere Pro CC and difficult to have the Title style/template, can anyone inform me where i can download the free Title plugin/template.
    Tks & B/regards,
    Handjojo

    Hi,
    Here is a link to download the additional templates for premiere pro: Library, title templates, template projects missing: Premiere Pro, After Effects, Encore
    They are common for cs6, cc and cc 2014.
    Thank You
    Arjun

  • Title and Credit template question

    Is it possible to create a "master" title/credit template, so that when a change is made to the master, it's reflected in all the titles/credits upon which it's based? I have a project with 16 clips, each with a title and a credit. I'd like not to have to edit each title block when I need to make a change. Thanks. ~Bond
    Premiere Pro CC
    OSX 10.8.4
    8 GB DDR3

    There is no CSS-type functionality in Premiere Pro.  But it would make a great addition to the program.
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • Template locks titles

    In child pages made from a template in DW MX 2004 the titles
    seem to be locked.
    The code at the top of the template looks like this:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN"
    http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <title>Unitarian Universalist Fellowship of
    Raleigh</title>
    The code at the top of a child page looks like this:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN"
    http://www.w3.org/TR/html4/loose.dtd">
    <html><!-- InstanceBegin
    template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false"
    -->
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <title>Unitarian Universalist Fellowship of
    Raleigh</title>
    The template can be seen here:
    http://uufr.org/test/template.dwt
    Help appreciated greatly!

    When you created your child page, did you "Apply Template" or
    File/Create
    from Template?
    You have issues I'd rather somebody else helped with but this
    could be a
    pointer.
    Jo
    "dsmith5" <[email protected]> wrote in
    message
    news:e21etp$eef$[email protected]..
    > In child pages made from a template in DW MX 2004 the
    titles seem to be
    > locked.
    >
    > The code at the top of the template looks like this:
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN"
    > "
    http://www.w3.org/TR/html4/loose.dtd">
    > <html>
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    > <title>Unitarian Universalist Fellowship of
    Raleigh</title>
    >
    > The code at the top of a child page looks like this:
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN"
    > "
    http://www.w3.org/TR/html4/loose.dtd">
    > <html><!-- InstanceBegin
    template="/Templates/template.dwt"
    > codeOutsideHTMLIsLocked="false" -->
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    > <title>Unitarian Universalist Fellowship of
    Raleigh</title>
    >
    > The template can be seen here:
    >
    >
    http://uufr.org/test/template.dwt
    >
    > Help appreciated greatly!
    >

  • Issues installing Title Templates

    I downloaded the Title Templates for Premiere Pro CS6 yesterday and when I opened Premiere Pro to load them, they didn't show up properly. What could I do to resolve this?

    (I too am a Cloud Member and my most recent Suite version prior to the cloud is CS3 and I had uninstalled all but Photoshop sometime ago, so I know nothing between CS3 & CS6)
    Regarding Encore & Premiere Pro Functional Content templates, etc. You might want to read through this Encore thread regarding these issues.
    http://forums.adobe.com/message/4457611#4457611
    Encore issues seem to have been resolved, finally, but Adobe instructions are still somewhat vague.
    Also, here is my post #53 back to Adobe (Chad Baker) concerning the ongoing Pr titles issue.
    @Chad...Following the most recent instructions in the document, the title names DO appear in the "new title from template" window. However, there is still a problem with the size of the directory side of the window and/or the scroll bar. The problem can be seen if you grab the scroll bar and pull down, The scrolling begins just below the "classic_full_hd" title name.
    Also, the images associated with the various titles are not showing up in the previews. The PNG and PSD files are in the new templates folder, but they are not coming through in the previews OR when you actually create the menu. Most of them just display the menu text and a series of alternating green/red bars.
    There are still ongoing issues with the Pr title content and it displaying properly and there has been no further response from Adobe, to my knowledge.

  • Multiple users using the same templates?

    The place I work puts out a weekly TV show and we regularly use the same lower thirds for various titles that come up throughout the show. After opening them up in Motion 3 I saved the titles as templates, which is great because now I can do all the work in FCP rather than Motion.
    However, the templates are saved to my user on the local HD. We have multiple editors that work on multiple computers.
    Is there a way to make the templates available on all computers to all users?
    Any suggestions is appreciated.
    jesse.

    Too, here's one more roadblock to (hypothetically) consider.
    Even if what we've discussed happened to work, there would be one more issue: network bandwidth. When you add one of these "Master Templates" to a FCP timeline, then drag it to the browser, then right-click and select "Reveal in Finder", it points straight to the Templates folder that I alluded to earlier. Locally.
    So if this template lived in one central place then, potentially, all editors could be trying to access it, in real-time, remotely, simultaneously. I think this would wreak havoc quickly. Unless of course you're employing a SAN. Now we're talking about a whole new beast. (Unless you've got a SAN already. ;))
    Bottom line is you're going to distribute templates to all editors individually. Unless you're developing new templates all the time, then this shouldn't be too much of a chore. Just out of curiosity, how many editors will this be deployed to?

  • Apex 4.2 CKEditor template hit some errors

    Dear all,
    The first issue is my CKEditor templates work well in Apex 4.1, but after upgrade Apex4.1 to Apex4, click template icon and tick "Replace actual contents" and select my own template, the template has no response. if I un-select "Replace actual contents", my template works fine.
    The second issue is if I un-select "Replace actual contents", my template content is displayed in textarea, then I save it to database, the page(let's say page1) is redirected to another page(let's say page2). In page2, there is button "Edit", click "Edit", page1 is opened and load data to textarea, but page1 appears to hang and gives a message that a script has stopped working :
    Script: http://server/i/libraries/ckeditor/3.6.4/ckeditor.js:29
    Thanks in advance.
    Maggie

    Hi,
    Sorry for the delay and here are my findings and am unable to reproduce your issue. I have a Apex Upgrade and running on version 4.2.1.00.08.
    The steps which i followed are below.
    1. Copied the Templates under plugins/templates/templates/default.js to mytemplate.js and modified the content of mytemplate.js to the following
    // Register a template definition set named "default".
    CKEDITOR.addTemplates( 'default',
        // The name of the subfolder that holds the preview images of the templates.
        imagesPath:CKEDITOR.getUrl(CKEDITOR.plugins.getPath('templates')+'templates/images/'),
        // The template definitions.
        templates :
                    title: 'My Template 1',
                    image: 'template1.gif',
                    description: 'Description of My Template 1.',
                    html:
                        '<h2>Template 1</h2>' +
                        '<p><img src="/logo.png" style="float:left" />Type your text here.</p>'
                    title: 'My Template 2',
                    image: 'template2.gif',
                    description: 'Description of My Template 2.',
                    html:
                        '<h3>Template 2</h3>' +
                        '<p>Type your text here.</p>'
    });Step 2: Modified 3.6.4/config.js and added the following entry config.templates_files = [ CKEDITOR.plugins.getPath( 'templates' ) + 'templates/mytemplate.js' ];
    so your config file will look like
    CKEDITOR.editorConfig = function( config )
        // Define changes to default configuration here. For example:
        // config.language = 'fr';
        // config.uiColor = '#AADC6E';
        config.templates_files = [ CKEDITOR.plugins.getPath( 'templates' ) + 'templates/mytemplate.js' ];
    };Step 3: Since i am using Embedded PL/SQL gateway modified imagelist.xml added the entry (for the mytemplate.js)
           <file>/libraries/ckeditor/3.6.4/plugins/templates/templates/mytemplate.js</file>        just below the following entry
      <file>/libraries/ckeditor/3.6.4/plugins/templates/templates/default.js</file>Step 4: Ran the apxldimg.sql with the necessary parameters and no issues.
    Step 5: Ran the page which has TextArea and clicked on the Templates icon can see the two custom templates which was added to mytemplates.js and selected one of the them with the "Replace Actual Contents" checkbox checked or selected, can see the content in the TextArea and submitted the page to Page 2 and clicked on the button which redirects back to page 1. I can see the HTML Template content in the textArea no issues.
    Step 6: The above step also tested with "Replace Actual Content" checkbox unchecked or not selected, works fine without errors or issues.
    The above testing is done on IE, FF, Chrome and Safari browsers.
    The issue maybe because of Browser cache, recommend to clear the browser cache and try again, also check whether the necessary entries and references in the config.js and mytemplates.js files are proper.

  • Disable-output-escaping and named templates

    I am trying to combine two parts of Steve book, the "features" example that requires disable-output-escaping because the text in the db contains html, and the titledboxes xsl which is called a s a named template.
    Problem is that when I call a template passing the text from the db as a content param the html gets escaped regardless of the output escaping.
    I know why but I need to know a workaround that allows me to use templates and lets me keep html embeded in the db column.
    Rob

    This is Bug 1285505, "Disable-Output-Escaping Is Lost When Copying A Text Node" which has been fixed for the 9.0.1 release that will be posted to OTN in about the May timeframe.
    In the meantime, the workaround is to build two versions of your titled-box template, one which explicitly does disable-output-escaping when it writes the content to the output, and the other one that's like what you have now.

  • Customizng SharePoint 2013 Display Template

    hi i am trying to customize Item_Picture3Lines.html and result not appear Note i am using content search web part and change query to specific content type it returns result but my display template does not render data i am trying to add Line 4 but no
    result appear My Code Sample :-
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
    <head>
    <title>Display Template</title>
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:ManagedPropertyMapping msdt:dt="string">
    'Picture URL'{Picture URL}:'PublishingImage;PictureURL;PictureThumbnailURL',
    'Link URL'{Link URL}:'Path',
    'Line 1'{Line 1}:'Title',
    'Line 2'{Line 2}:'Description',
    'Line 3'{Line 3}:'',
    'Line 4'{Line 4}:'',
    'SecondaryFileExtension',
    'ContentTypeId'
    </mso:ManagedPropertyMapping>
    <mso:MasterPageDescription msdt:dt="string">This Item Display Template will show a 100x100 picture of the item on the left. The title and the default item description will display to the right of the picture with an additional line that is available for a custom managed property.</mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#Content Web Parts;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://c1-dev02/sites/ContentSearchWebPart/_catalogs/masterpage/Display Templates/Content Web Parts/Item_Picture3Lines - Copy.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
    </head>
    <body>
    <!--
    Warning: Do not try to add HTML to this section. Only the contents of the first <div>
    inside the <body> tag will be used while executing Display Template code. Any HTML that
    you add to this section will NOT become part of your Display Template.
    -->
    <script>
    $includeLanguageScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Language Files/{Locale}/CustomStrings.js");
    </script>
    <!--
    Use the div below to author your Display Template. Here are some things to keep in mind:
    * Surround any JavaScript logic as shown below using a "pound underscore" (#_ ... _#) token
    inside a comment.
    * Use the values assigned to your variables using an "underscore pound equals"
    (_#= ... =#_) token.
    -->
    <div id="Item_Picture3Lines - Copy">
    <!--#_
    var encodedId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "_picture3Lines_");
    var linkURL = $getItemValue(ctx, "Link URL");
    linkURL.overrideValueRenderer($urlHtmlEncode);
    var line1 = $getItemValue(ctx, "Line 1");
    var line2 = $getItemValue(ctx, "Line 2");
    var line3 = $getItemValue(ctx, "Line 3");
    var line4 = $getItemValue(ctx, "Line 4");
    var pictureURL = $getItemValue(ctx, "Picture URL");
    var pictureId = encodedId + "picture";
    var pictureMarkup = Srch.ContentBySearch.getPictureMarkup(pictureURL, 100, 100, ctx.CurrentItem, "cbs-picture3LinesImg", line1, pictureId);
    line1.overrideValueRenderer($contentLineText);
    line2.overrideValueRenderer($contentLineText);
    line3.overrideValueRenderer($contentLineText);
    var containerId = encodedId + "container";
    var pictureLinkId = encodedId + "pictureLink";
    var pictureContainerId = encodedId + "pictureContainer";
    var dataContainerId = encodedId + "dataContainer";
    var line1LinkId = encodedId + "line1Link";
    var line1Id = encodedId + "line1";
    var line2Id = encodedId + "line2";
    var line3Id = encodedId + "line3";
    var line4Id = encodedId + "line4";
    var dataDisplayTemplateTitle = "ItemPicture3Lines";
    _#-->
    <div class="cbs-picture3LinesContainer" id="_#= containerId =#_" data-displaytemplate="_#= $htmlEncode(dataDisplayTemplateTitle) =#_">
    <div class="cbs-picture3LinesImageContainer" id="_#= pictureContainerId =#_">
    <!--#_
    if(!linkURL.isEmpty)
    _#-->
    <a class="cbs-pictureImgLink" href="_#= linkURL =#_" title="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= pictureLinkId =#_"
    >
    <!--#_
    _#-->
    _#= pictureMarkup =#_
    <!--#_
    if(!linkURL.isEmpty)
    _#-->
    </a>
    <!--#_
    _#-->
    </div>
    <div class="cbs-picture3LinesDataContainer" id="_#= dataContainerId =#_">
    <a class="cbs-picture3LinesLine1Link" href="_#= linkURL =#_" title="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= line1LinkId =#_"
    >
    <h2 class="cbs-picture3LinesLine1 ms-accentText2 ms-noWrap" id="_#= line1Id =#_"> _#= line1 =#_</h2>
    </a>
    <!--#_
    if(!line2.isEmpty)
    _#-->
    <div class="cbs-picture3LinesLine2 ms-noWrap" title="_#= $htmlEncode(line2.defaultValueRenderer(line2)) =#_" id="_#= line2Id =#_" > _#= line2 =#_</div>
    <!--#_
    if(!line3.isEmpty)
    _#-->
    <div class="cbs-pictureLine3 ms-textSmall ms-noWrap" id="_#= line3Id =#_" title="_#= $htmlEncode(line3.defaultValueRenderer(line3)) =#_">_#= line3 =#_</div>
    <!--#_
    if(!line4.isEmpty)
    _#-->
    <div class="cbs-pictureLine3 ms-textSmall ms-noWrap" id="_#= line4Id =#_" title="_#= $htmlEncode(line4.defaultValueRenderer(line4)) =#_">_#= line4 =#_</div>
    <!--#_
    _#-->
    </div>
    </div>
    </div>
    </body>
    </html>

    Was looking for something else and stumbled across this... I'm sure you've sorted this out by now, but the problem, i think is that you're not specifying a data source (list/site column) for the Line 4 data field...or line 3 for that matter... See lines
    14 and 15 in your code sample. There should be a field reference between the ' '.

  • A region with borders only no title or title bar

    Hello Expert,
    I am trying to create just a border around the region, In essence a region with just border and no title or title bar. There is no simple approach available for this option. Can anybody shed some light on this matter.
    APEX Version : 4.1.0.00.32
    Theme : Builder Blue 2 (I guess it is theme 2 in the APEX)
    I tried various option utilizing border-less region template, report region, report region without title, No Template etc. along with following CSS style code, which I added into header section of the Page.
    This option creates border on top of the region elements but do not cover the region elements like items, that also only in template with no button or titles
    <style type="text/css">
    #CRR {border-style:solid; -- CRR is a static ID for the region
    border-width:1px;}
    </style>
    I also tried creating a template with new region and removed the title class and button class, which created a region without border but there is no line on the top only on the sides, which looked so weird. I am not sure what is the right solution, but a solution with new region template which only creates border and no title and title bar is good.
    Kindly please let me know an approach if anybody is aware.
    Thanks,
    CP

    Hi,
    That is certainly helpful as it does create the border, however the border is created for two regions.
    I have total four regions. At the top is breadcrumb region, below that is Report region displaying basic details. The third region is a list region waith navigation tab only and it is borderless region. The fourth regions has all the form items for which I wan the border only. With your suggestion, I am able get the border but it is now covering both region 3 and 4. I just want only on 4th region. The foruth region template I modified to "Region without button and titles" the way you suggested.
    The Region 3 and Region 4 has same class .bl-body, hjowever I didn't put any static id to region 3. I tried with naming the static id in region 3 with different name, but that didn't change anything.
    Ideally I would prefer a new region template so I can use it for multiple pages.
    Here is what I did,
    Opened shared components in the application, selected templates link. Copied a specific template (Report Region) as a new template and in the definition where there is a code, I removed few lines of code. which is follwowing
    Removed Code
    <div class="rc-blue-top"><div class="rc-blue-top-r">
    <div class="rc-title">#TITLE#</div>
    <div class="rc-buttons">#CLOSE##PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#</div>
    </div></div>
    this removed the title and those buttons, but the border was only to left , right and bottom and there was gray backgroud.
    Full Code
    <div class="rounded-corner-region" id="#REGION_STATIC_ID#" #REGION_ATTRIBUTES#>
    <div class="rc-blue-top"><div class="rc-blue-top-r">
    <div class="rc-title">#TITLE#</div>
    <!-- <div class="rc-buttons">#CLOSE##PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#</div>
    </div></div>
    <div class="rc-body"><div class="rc-body-r"><div class="rc-content-main">#BODY#</div></div></div>
    <div class="rc-bottom"><div class="rc-bottom-r"></div></div>
    </div>
    Thanks for the previous input.
    Further help is highly appreciated.
    Thanks,
    --CP                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Facelets template best practices

    Hi,
    As I gain more experience in JSF, I am doing things a bit differently. When I first started I was binding all components to a backing bean and using the component binding in code for various things such as multi component validation. Later I used only value bindings, and had a lot of configuration in the template:
    <select id="country" jsfc="h:selectOneMenu" value="#{user.countryCode}" validator="#{someBackingBean.country_validate}" required="true" requiredMessage="#{theme_messages['field.country']} #{theme_messages['word.required']}">
        <f:selectItems value="#{someBackingBean.countryItems}"/>
    </select>I modified that example from real code, so it might make more sense to use a converter than a validator for a country code... But anyway, there is a lot of per component configuration in my templates. When I create multiple themes/skins, this stuff has to be duplicated. When I make changes to the application, all themes have to be updated.
    I think Wicket encourages you to bind all components to the "backing bean" and do your configuration in code. Your equivalent template would look something like this:
    <select id="country" jsfc="h:selectOneMenu" binding="#{someBackingBean.countryDropDown}">
        <f:selectItems value="#{someBackingBean.countryItems}"/>
    </select>You might even leave the f:selectItems out of the template. The only challenge I foresee with this is that using JSF APIs to resolve EL to add a validator, converter, action, or whatever else into the component from code is very verbose and difficult. I asked the JSF expert group to enhance the APIs to make it easier to do everything in code, but it did not make the JSF 2.0 spec. They will consider it in a future release: [JSF API Ticket 363|https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=363]
    Can anyone share their experiences with facelets template complexities and best practices they have learned? If you do most of your component configuration in code, how much of it do you allow in the template? Do you allow value bindings? The f:selectItems tag?
    Thanks,
    Ryan

    If you want full understand facelets , Install NetBeans6.1, install facelets plugin for it, here isa link
    http://armarz.ifolder.ru/9150024. if you want more about facelets read this book -
    http://armarz.ifolder.ru/8396066 .
    In net beans the first create web/facelets application, create facelets template, and client pages for it.
    here is a template example, it hase top, left and content, also in each part inserted one xhtml file for defaults views(logo, logout...)
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="/css/tableLayout.css" rel="stylesheet" type="text/css" />
        <link href="/css/index.css" rel="stylesheet" type="text/css" />
        <title>My Template</title>
      </head>
      <body>
        <table cellpadding="0"  cellspacing="0" border="0" width="100%">
          <tr>
            <td id="top" valign="top" align="left" colspan="2" >
              <ui:insert name="top"></ui:insert>
              <ui:include src="top.xhtml"></ui:include>         
            </td>
          </tr>
          <tr>
            <h:panelGroup rendered ="#{,,;,;,;,;,;,;l}">                 
              <td id="left" valign="top" align="left" width="150px">
                <ui:insert name="left"></ui:insert>
                <ui:include src="left.xhtml"></ui:include>           
              </td>
            </h:panelGroup>
            <h:panelGroup rendered ="#{kjkjkjkjkjkkk}">                 
              <td>
                <table width="150px" cellpadding="0" cellspacing="0" border="0">
                  <tr>
                    <td>
                      <f:verbatim> </f:verbatim>
                    </td>
                  </tr>
                </table>
              </td>
            </h:panelGroup>
            <td id="content" valign="top" align="left">
              <ui:insert name="content"></ui:insert>
              <ui:include src="content.xhtml"></ui:include>
            </td>
          </tr>
        </table>
      </body>
    </html>And here is a client page.
    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                    xmlns:ui="http://java.sun.com/jsf/facelets"
                    xmlns:h="http://java.sun.com/jsf/html"
                    xmlns:f="http://java.sun.com/jsf/core"
                    xmlns:c="http://java.sun.com/jsp/jstl/core"
                    template="/layout/main.xhtml">////refer to main.xhtml template
      <ui:define name="content">
        <f:view>
          <h:form id ="login">
            <table width="200" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td align="left" colspan="2" class="red" style="padding:0 0 5px 0" >                                               
                  </td>
                </tr>
                <tr>
                  <td class="form_text">
                    <h:outputText styleclass="form_text" value="#{bean.username}" />
                  </td>
                  <td>
                    <h:inputText styleClass="input_text" id="loginname" value="#{Login.username}" required ="true"
                                 requiredMessage="#{log.required}">                  
                    </h:inputText>
                  </td>
                </tr>
                <tr>
                  <td></td>
                  <td><h:message id="error" for="loginname" styleClass="validate" /></td>           
                </tr>
                <tr>
                  <td class="form_text">
                    <h:outputText styleclass="form_text" value="#{bean.pass}" />
                  </td>
                  <td >
                    <h:inputSecret styleClass="input_text" id="password" value="#{Login.password}" required ="true"
                                   requiredMessage="#{log.passlen}">                      
                    </h:inputSecret>
                  </td>
                </tr>
                <tr>
                  <td></td>
                  <td><h:message id="fail" for="password" styleClass="validate" /></td>           
                </tr>
                <tr>
                  <td>
                    <f:verbatim> </f:verbatim>
                  </td>
                </tr>           
                <tr>
                  <td></td>
                  <td align="right">
                    <h:commandButton styleClass="submit" style="float:right;" value="#{bean.login}" action="#{Login.loggedIn}"  >
                    </h:commandButton>
                  </td>
                </tr>
              </h:panelGroup>
            </table>
          </h:form>
        </f:view>
      </ui:define>
    </ui:composition>is this useful?:)

Maybe you are looking for

  • How do I add mutiple horizontal submenus to one menu label.

    For Muse, how do I add mutiple horizontal submenus to one menu label. In other words, I have Interior,Graphic and Web as one menu. Under Interior I want a horizontal submenu with Kitchens, bathrooms, closets,etc. Then under Kitchens I may want Bars,

  • Photoshop Album + Vista x64

    Hi, I've just upgraded to Vista, and Photoshop Album 3.0SE works fine except that every time I open an image etc, the EULA pops up and I have to click accept - any workaround?

  • Acrobat Distiller not working

    I recently upgraded to Mac OS 10.5 and am using Acrobat 7.0 Professional. Since upgrading, a great majority of the files I try to convert to ps are not converting (a vast variety of error messages) and therefore cannot create a pdf file using this me

  • Detecting MOUSE_OVER on a line

    I have some trails data that I am adding to an interactive map.  The trails were imported from Illustrator and are lines that have been converted to movieclips upon import.  I'd like to add effects and some interactivity to the lines upon click and m

  • Can anyone help decipher my AHT code? It is 4SNS/1/4000000: TGOH- 126.125 ???

    I have been having issues with my (early) 2008 iMac display / graphics cards for a while now. Took it to the Genius bar the other day to find that it is now legacy and they won't touch it with a barge pole. I have already reset the NVRAM and SMC more