Does Facelets template use xHTML or JSP or JSPX?

hi all,
i'm newbie in jsf, i try to use template but i confuse, if templace use xHtml or jsp or jspx format. I have read some book and some tutorial, in which xHtml format ist used.
can some one answer which format should i use, and what is diff beweent xHtml and jspx, which advantage have xHtml and jspx?
can i use in jsp file xHtml template ?
thanks for ur help

Yes, to the best of my knowledge you need to use a consistent extension for files that are facelets.

Similar Messages

  • Is it possible to use XHTML (static content) whilst writing JSPs in XML?

    Hi Everyone,
    I am currently trying to get my head around the whole XML syntax for JSP. Unfortunately there doesn't appear to be a well rounded tutorial on the net about this so I will lay my questions to rest here.
    Firstly I have managed (with the help of some very kind Java Developer Connection users) to write a JSP page in XML syntax (including the <jsp:root> element, and the like). However even when I follow all of the correct conventions my html content ends up causing the page compilation to fail. The problem is that the html content in my JSPs is being read as XML even though it is being enclosed in <jsp:text> elements. For this reason I am getting compilation failures because of deprecated tags like <br> within my html.
    For this reason I am attempting to switch my static content into XHTML, I figure that this will offer some sort of solution. However when I try to convert my html content into xhtml I end up getting a failure around the DOCTYPE declaration that xhtml is required to use.
    Does anybody out there know if jsp xml syntax and xhtml can be used together, and if so could you please point me in the right direction?
    Thanks for your assistance.
    Regards
    David

    I'm looking into this topic too.
    Here is one article I've found on the web regarding the usage of XML syntax for the JSP document.
    http://www.onjava.com/pub/a/onjava/2001/11/28/jsp_xml.html
    I do know that xhtml requires that your tags be "closed". So for example the <br> tag would look like
    and so on.
    As far as the DOCTYPE tag which gives the XHTML specification via DTD to the browser, you can find examples here...
    http://www.w3.org/TR/xhtml1/#dtds
    You'll find examples for Strict, Transitional, and Frameset XHTML
    I have gotten a failure on the DOCTYPE tag when I have attempted to test offline, because the dtd was inaccessible. But once online it worked.

  • 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?:)

  • JSF - Why getting wrong path Handling URLs in Facelets Templates

    Hi, I am trying to do a web application using JSF, Facelets in Netbeans 6.7. but I am having a problem:
    Why I am getting wrong path ?
    It is very simple, straight forward web application.
    When run, it shows the template-client.xhtml perfectly . The navigation menu is shows ok, but they don't work. However, if I enter in the browser address http://localhost:8080/test3/portal/products.jsf it goes perfect to the right page and the navigation between About, Products and Home works perfect. But once I click on Home, the menu start to give me errors. Looks like the path is wrong again.
    folders structure:
    test3My code:
    faces-config.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <!-- =========== FULL CONFIGURATION FILE ================================== -->
    <faces-config version="1.2"
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
        <application>
            <view-handler>
                com.sun.facelets.FaceletViewHandler
            </view-handler>   
        </application>
    </faces-config>web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <context-param>
            <param-name>com.sun.faces.verifyObjects</param-name>
            <param-value>true</param-value>
        </context-param>
        <context-param>
            <param-name>com.sun.faces.validateXml</param-name>
            <param-value>true</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
            <param-value>.xhtml</param-value>
        </context-param>
        <context-param>
            <param-name>facelets.DEVELOPMENT</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>facelets.SKIP_COMMENTS</param-name>
            <param-value>true</param-value>
        </context-param>
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>forward.jsp</welcome-file>
            </welcome-file-list>
        </web-app>forward.jsp:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <jsp:forward page="template-client.jsf"/>template-client.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html">
        <body>
            This text above will not be displayed.
            <ui:composition template="/template.xhtml">
                This text will not be displayed.
                <ui:define name="title">
                    Facelets
                </ui:define>
                This text will also not be displayed.
                <ui:define name="body">
                    Hello from the Facelets client template!
                </ui:define>
                This text will not be displayed.
            </ui:composition>
            This text below will also not be displayed.
        </body>
    </html>template.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:ice="http://www.icesoft.com/icefaces/component">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Facelets - Template Example</title>
            <link href="#{facesContext.externalContext.requestContextPath}/css/default.css" rel="stylesheet" type="text/css" />
        </head>
        <body>
            <div id="menu">
                <ui:insert name="linemenu">
                    <ul>
                        <li><a href="../forward.jsp">Home</a></li>
                        <li><a href="about.jsf">About Us</a></li>
                        <li><a href="products.jsf">Products</a></li>
                    </ul>
                </ui:insert>
            </div>
            <div>
            <h1>
                <ui:insert name="title">Default Title</ui:insert>
            </h1>
            <p>
                <ui:insert name="body">Default Body</ui:insert>
            </p>
            </div>
        </body>
    </html>about.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets">
        <body>
            <ui:composition template="./../template.xhtml">
                <ui:define name="title">
                    title ABOUT
                </ui:define>
                <ui:define name="body">
                    body ABOUT
                </ui:define>
            </ui:composition>
        </body>
    </html>products.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets">
        <body>
            <ui:composition template="./../template.xhtml">
                <ui:define name="title">
                    title PRODUCTS
                </ui:define>
                <ui:define name="body">
                    body PRODUCTS
                </ui:define>
            </ui:composition>
        </body>
    </html>

    My folders:
    Test3
         Web Pages
              /WEB-INF
              /css
                  -default.css
              /layouts
              /portal
                  -about.xhtml
                  -products.xhtml
              -forward.jsp
              -template.xhtml
              -template-client.xhtmlPlease, I need help with this. It may is very easy to find out, I maybe skiping something
    Thank for your help anyone!!!

  • Facelets template (J2EE6 Netbeans 6.8 glassfish v3) ui:composition issue

    Hello every body,
    First please excuse my bad english maybe...
    I'm ready to start a new project with Java EE 6 using netbeans 6.8 and glassfish v3.
    For the Web Tiers, I want to use facelets and JSf 2, but I encounter an issue when I want to create and use a facelets template
    Here are the steps to reproduce my problem (very simple..). Theses steps must be reproduced using Netbeans 6.8 :
    A. Project creation
    1. File > New Project > Java EE > Enterprise Application
    2. Project Name : (no matter) : SampleEE (do not check Use dedicated folder....)
    3. Server : Glassfish v3 Domain (provided with netbeans) / JavaEE Version : java EE 6.
    4. Check Create EJB Module and Create Web Application Module (and do not change default names)
    5. Do not check Create Application Client Module. Then Click Finish.
    B. Add JSF 2 Framework to the Web project
    1. In the project tab, right-clic the web project and clic Properties
    2. Select Frameworks and clic the "add" button and Add Java Server Faces (do not change the default configuration. Make sure to use Facelets (not jsp) as prefered page language in the configuration tab)
    3. Clic OK to confirm and close the window
    C. Create a facelet template
    1. In the web project node, right clic and select New > Other > JavaServer Faces > Facelets Template
    2. File Name : template (and do not change anything else : use CSS and use the first and easiest template. Do Not specify folder). Click Finish
    We get this template at the root of "Web Pages" (css is automatically generated in "resources/css"
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html">
        <h:head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
            <link href="./resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
            <title>Facelets Template</title>
        </h:head>
        <h:body>
            <div id="top" class="top">
                <ui:insert name="top">Top</ui:insert>
            </div>
            <div id="content" class="center_content">
                <ui:insert name="content">Content</ui:insert>
            </div>
        </h:body>
    </html>D. Create a template client
    1. On the project node, right-clic and select New > Other > JavaServer Faces > Facelets Template Client
    2. File Name : client (do not specify any folder)
    3. Clic "browse" button to select a template, and select the template nammed "template"
    4. Check <ui:composition>" for "generated root tag" value (note the problem occurs even if we check "html")
    We get this file :
    {code}<?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
    template="./template.xhtml">
    <ui:define name="top">
    top
    </ui:define>
    <ui:define name="content">
    content
    </ui:define>
    </ui:composition>
    {code}
    E. Execute
    Now just clean and build and Run the project.
    1. Right Clic the project node and select Clean And Build
    2. Right clic the project node and select Run
    3. Wait for the web browser to open and go to the template url : http://localhost:8080/SampleEE-war/template.xhtml (we can see the template displays correctly, with the good CSS style automatically generated)
    4. Now go to the client URL (http://localhost:8080/SampleEE-war/client.xhtml
    There is a problem : tags are not interpreted and client.xhtml just returns a standard xml and no page is displayed. (if you check 'html' instead of <ui:composition> in the steps before, you can see the page, but it's not the correct page, display the page source and you will see all the facelets tags "<ui:composition..."> <ui:define> and so on...
    I don't know what to do to solve this.
    Please help me, i've been searching for so long hours now...
    Note that the project as no faces-config.xml, since it's now optional... I would prefer not to use it.
    Thank you in advance for your help.
    Edited by: Hitsugaya-kun on Jan 16, 2010 5:14 AM

    Kyuubi,
    Thanks for posting anyway. I too was overlooking /faces/* Servlet mapping in web.xml that NetBeans creates.
    Maybe this belongs in an separate thread, but when is <html> a good option to select (versus <ui:composition>) for the Generated Root Tag?
    Roberto
    Edited by: onebeartoe on Aug 11, 2010 6:54 AM

  • Trying to make a facelets template containing a dataTable

    i'm trying to make a facelets template containing a dataTable. i have several problems, but first i'll show you how i wrote the template, simplified of course (the final template contains much more):
    <ui:composition>     
    <h:dataTable value="#{tableSource}" var="#{vaar}" binding="#{tableBinding}"  id="#{faceletId}">
    <ui:insert />
    <h:column>
        <h:commandButton action="#{modifyAction}" id="modifyButton" value="Modify" />
    </h:column>
    </h:dataTable>
    </ui:composition>ok, this was the template. now i'll show you how i'm "calling it" in my page:
    (simpleColumn is another template i made, which works -has no problems)
    <xyz:myDataTable tableSource="#{mainBean.jobsList}" tableBinding="#{mainBean.jobsTable}" vaar="job"
              faceletId="jobsListTable"   modifyAction="#{mainBean.actionTodo}">
    <xyz:simpleColumn headerTitle="Nume job" faceletId="jobName" fieldValue="#{job.name}" />
    </xyz:myDataTable>ok so here are my problems:
    1 - i write "#{job.name}" to add a column with that value, but i get an error that the property "name" does not exist in type java.lang.String.
    how do i fix this? i understand the problem ("job" is not defined as a variable, but as the simple string) but i don't know what to do
    2- i write "#{mainBean.actionTodo}", and the function actionTodo() certainly exists in that bean, but i get an error that the property "actionTodo" is could not be found in that bean (i guess it's looking for a property, not a function). but why, it's in the "action" property of a submit button, so it should not be this way. how can i fix this?

    seeing your answer, i don't think you've used facelets. the id's are not the issue here, they work fine. and besides, they're not variable.
    i'm asking about the other two issues. what's the part that you don't understand? there isn't any more code than this, other than the template for xyz:simpleColumn, which isn't important anyway, since it works ok.

  • How useful is the JSP?

    I use to develop desktop and the traditional C/S application with C++ and just switched to Java and will do a project in Web environment. Maybe because I haven't got accustom to the 'script like' language, I have found the JSP is extreamly difficult both to understand and use, especially the Tags , and so far can't see any advatages gained by using the technology. Does anyone here use the JSP seriously in your production environment ? What is your feeling ?

    1st: You have to know how to program in Java before using a JSP or a servlet can be useful to you at all. You also need a working knowledge of HTTP and HTML or you can get yourself into trouble pretty easily.
    If your looking for advantages over the c/s world you came from: You can run server side code and send its output over the internet to anywhere. You don't have to load a client on the users machine. It's platform independent - your code will run on unix, macs, linux, windows.
    from http://developer.java.sun.com/developer/technicalArticles/Programming/jsp/
    JSP pages easily combine static templates, including HTML or XML fragments, with code that generates dynamic content.
    JSP pages are compiled dynamically into servlets when requested, so page authors can easily make updates to presentation code. JSP pages can also be precompiled if desired.
    JSP tags for invoking JavaBeans components manage these components completely, shielding the page author from the complexity of application logic.
    Developers can offer customized JSP tag libraries that page authors access using an XML-like syntax.
    Web authors can change and edit the fixed template portions of pages without affecting the application logic. Similarly, developers can make logic changes at the component level without editing the individual pages that use the logic.

  • Create a custom web template using VS 2012 with web features,site features sections applied

    hi,
     Want to create a  custom web template using VS 2012  in my SP 2013 environment.  i know "Vesku" has posted a great artice on this [  based on prev. version of SP].
    here -
    http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx
    i am  looking for a code based article  which has step by step process which provides how to add the site features, web features and attach the eventreceivers etc etc on sitecollection creation when i apply this template from central admin. 
    can anyone provide me any links / any source how to create a custom web template with one / two  custom features -  site features element and web features element , / master page etc ....
    I am stuck with this. as part of my reqmnt, i need to create a webtemplate with all the customlistinstances, custompagelayouts, custom masterpages, custom appln pages, custom web parts.
    help is appreciated !
    Das

    The problem is that Web Templates are deployed to a gallery in a site collection and aren't available in Central Admin when creating a new site collection.  YOu have to create the site collection without choosing a template and then choose your web
    template when you first access the root site in the site collection.  Here's an article that discusses that process here:
    http://sharepointchick.com/archive/2011/02/10/using-web-templates-to-create-site-collections.aspx
    Other than that Vesa's article is still the best one and works essentially the same in 2013 as it does in 2010.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Error while trying to update the XML template using XML Publisher Administrator

    Hello Folks,
    We are on R12.1.3
    I changed a condition in a report and trying to upload the new XML template using XML Publisher Administrator.
    when i click the Apply button, it is throwing an error 'Bad Request'
    Navigation : XML Publisher Administrator > Data Definitions > query the report
    Click on the name of the report > click 'Update file' besides Data Template > Choose file > Click Apply
    I am getting the below error
    Bad Request
    Your browser sent a request that this server could not understand.
    Now, i could not upload a new XML template.
    Am I doing anything wrong.
    regards,
    Kris

    user10163762 wrote:
    Thank you Eugen and Hussein.
    The problem is not with the template.
    It seems to be a problem in that particular instance.
    Uploaded it in a different instance.
    However once i run the program, i cannot view the output as the browser window flashes and disappears.
    My colleague says , it is to do with the trusted site to download something from the browser.
    Can you please guide me on how to fix this ?
    http://bit.ly/1k8e2vi
    Thanks,
    Hussein

  • Use of template using CPT1 for charging an additional cost to the product

    Hello,
    I'm trying to charge an additional cost burden to the cost of my product for every base unit produced. (cost estimate)
    I have created a template using transaction CPT1 with sender as Cost Center / Activity Type in environment 001
    The activity type is measured in EA (Eaches) while we make our product in boxes (Product base unit of measure is 'Boxes') with say 20 Eaches going into a Box
    I have maintained an activity price using transaction KP26 at say $0.55 per Each
    I have assigned this template to my costing sheet , valuation area and overhead key using transaction KTPF
    When I now cost the material for costing lot size of a 1000 boxes, it still charges the product with the activity price per Each ($0.55) instead of multiplying  $0.55*20*1000 = $11,000 for a 1000 boxes
    The formula I have chosen in the template against 'Plan quantity ' is in the attachment enclosed:
    I need help with doing the right thing within the template to make it give a cost burden of $11000 for every 1000 boxes costed (costing lot size)

    Didn't realize that you have to use transaction CPTD to charge template overhead to production orders. That's why it was not working. Now it is posting by reading the confirmed yield. But it is still not converting eaches to boxes using the conversion factor in the material master.
    The formula I'm currently using in the template for actual quantity is as under:
    OrderYieldConfirmed / AltQtyFactorFromMaterial( AlternativeQuantityUnit
    = 'BX', Material = OrderMaterialNumber )
    Please tell me what I need to do to the above formula to make it convert boxes to eaches using conversion factor in the material master?
    A similar formula has worked beautifully for 'cost estimate'
    OrderTotalQuantity / AltQtyFactorFromMaterial( AlternativeQuantityUnit =
    'BX', Material = OrderMaterialNumber )

  • Corrupt document gets created in document library with document template using createlistitem workflowaction in visual studio workflow for office 365 solution

    Hi,
    My requirement is to create a document library associated to a custom content type with a document template associated. Also I need to create a document based on the template in this document library when a new item is created in another list by taking the
    reference ID of that new Item , I need to create the document with the name appended by ID. I need to do all this deployment using WSP.
    I have created document library with document template associated to content type by following instructions in below stated blog :http://blogs.msdn.com/b/chaks/archive/2011/05/19/deploying-a-document-template-file-in-content-type-in-a-office365-sandboxed-solution.aspx
    This works perfect for me.
    However, there are few observations, when going to Document Library > Library Settings > Advanced Settings > Document Template section - doesnt shows the Edit template link. When tried to look at the value for the document template using view source
    , it is giving me /Lists/MyDocsListInstance/Forms/template.dotx instead of the actual template file uploaded.
    Ignoring the above observation, when I am trying to create a sandbox based workflow in visual studio to create document in document library when new item is created in another list, I provide the ContentTypeID as the ID associated with the document library
    with template. 
    It creates the corrupt document at end of workflow. 
    I have tried using .docx instead of .dotx files for workflow as per solution provided in some of the post but it isnt resolving my issue.
    Any help is much appreciated.
    Regards,
    Krutika

    OK, I am going to throw out a lot of ideas here so hopefully they get you closer to a diagnosis. Hang on :)
    Does it happen to work for some users but not others? If so, try logging in on the "good" computer with the "bad" username. This will tell you if the problem is related to the end-user's system. Also, once the user downloads a document
    successfully can they open and work on it in Word? Also, does the document library have any custom content types associated with it or does it just use 'Document'?
    I notice that there are other folks on the web that have run into this same problem and the similarity seems to be that they are either on SharePoint 2007 or have upgraded from 2007. Did this doc library start out as a 2007 library?
    What you might want to do is this: Make a site collection from scratch in 2013 (or find one that you know was created in 2013). Choose team site (or whatever you want) for the root web and set up the security the same way you have it on the malfunctioning
    library. Now, use windows explorer to copy and paste some of the documents to the new location. Be sure you recreate any needed content types. Now test it from the troubled user's computer.
    I'm thinking there may be something that is different about the library since it was migrated through various versions and updates since 2007. I've sometimes found that there can be problems (especially with user profiles but that's a different story) with
    things that go through this evolution.

  • Question regarding how to use XHTML format in Form

    I have defined a form where the input interface is iv_text TYPE string and the format of the field in the form is in XHTML.
    But when I set iv_text = '<font face="Times New Roman" color="#ff0000" size="5">Test</font>'. The ADS does not interpret the XHTML and it generates me a PDF file containing this sentence.
    Can someone help me?

    look up for "Using formatters" in the FB help.
    Essentially you'll instantiate a format, NumberFormatter for
    numbers for example, and set it's properties like e.g. showing a
    thousand separator and then one some event of the TextInput --
    valueCommit for example -- you'll do something like:
    ti.text = nf.format(ti.text)
    this is would also give you opportunity to validate user
    input using the same formatter and valid event.
    ATTA

  • How to use EJB in JSP...urgent!!!

    hello,
    i am novice programmer in EJB.
    i am using weblogic 6.1 ...
    my problem is how to use EJB in jsp page.
    my code is as follow..but its not displaying any result.
    <%@ page import="javax.naming.InitialContext,
    javax.naming.Context,
    java.util.Properties,
    firstEJB.First,
    firstEJB.FirstHome"%>
    <%
         long t1 = System.currentTimeMillis();
         System.out.println(t1);
         Properties props = new Properties();
         p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.TengahInitialContextFactory");
         props.put(Context.PROVIDER_URL, "localhost:7001");
         Context ctx = new InitialContext(props);
         FirstHome home = (FirstHome)ctx.lookup("FirstEJB");
         First bean = home.create();
         String time = bean.getTime();
         bean.remove();
         ctx.close();
         long t2 = System.currentTimeMillis();
    %>
    <html>
         <head>
              <style>p { font-family:Verdana;font-size:12px; }</style>
         </head>
         <body>
              <p>Message received from bean = "<%= time %>".<br>Time taken :
              <%= (t2 - t1) %> ms.</p>
         </body>
    </html>
    please tell me the solution.

    Hi, I don't know if it may be the cuase of your problems, but you should narrow the Object obtained doing the lookup, like this:
    FirstHome home = (FirstHome) PortableRemoteObject.narrow(ctx.lookup("FirstEJB"), FirstHome.class);

  • How to use taglibs in JSP for Database access

    Hi
    Could any one please tell me how to use taglibs in JSP for Database access
    with regrds
    Jojo

    This is a sample how to connect to a MySQL database with JSTL 1.0:
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>JSTL MySQL</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <c:catch var="e">
    <sql:setDataSource var="datasource" url="jdbc:mysql://Your_Server_Name_Here/You_Schema_Here"
                           user="Your_Username_Here" password="Your_Password_Here"
                           driver="com.mysql.jdbc.Driver"/>
    <c:out value="datasource= ${datasource},  Class = ${driver.class}"/>
    <br />
    <br />
    <sql:query var="deejays" dataSource="${datasource}">SELECT * FROM Your_Table_Name_Here</sql:query>
    <table>
    <%-- Get the column names for the header of the table --%>
    <c:forEach var="columnName" items="${deejays.columnNames}"><th><c:out value="${columnName}"/></th></c:forEach>
    <tbody>
    <%-- Get the value of each column while iterating over rows --%>
    <c:forEach var="row" items="${deejays.rows}">
      <tr><c:forEach var="column" items="${row}">
            <td><c:out value="${column.value}"/></td>
          </c:forEach>
      </tr>
    </c:forEach>
    </tbody>
    </table>
    </c:catch>
    <br />
    <br />
    <c:if test="${e!=null}"><span class="error">Error</span>�
      <c:out value="${e}" />
    </c:if>
    </body>
    </html>And this thread might help you:
    http://forum.java.sun.com/thread.jspa?threadID=639471&tstart=44

  • Connecting to MSAcess database using JDBC in JSP

    Hi,
    I have created an Aceess database file (C:\db1.mdb) and created a DSN=db1.
    I could able to connect to the database and retrieve the information from the tables using Sun's JDBC OdBc bridge drivers.
    DriverManager.getConnection("jdbc:odbc:db1").
    It was working Fine in my Standalone java program.
    But,when I used the database connection statements in my JSP page,it is not displaying any error message and not selecting rows from the Select statement i used in my JSP page.(The same worked in my standalone Java program).
    I executed the two programs on same machine.Database is also on the same machine.
    Can anyone tell me what shall i do to connect to the database(C:\db1.mdb) through JSP.
    Thanks in Advance
    Rao...

    in your code do you have any things that is suppressing your exception?? i.e. something lik
    try
    // do your stuff
    catch(Exception e)
    // do nothing??
    }if so you vont get to know of any problem that happened....
    also if there is an un handled exception the jsp page will sometimes come up as blank, because your print streem will be terminated abrubtly....
    this will probably happen if you dont have a try - catch block at all, or if you are not handling the exception that is being thrown.... try inclosing your code in a try catch block and doing ex.priintStackTrace() in the catch block to get the exception trace on the server console....
    also can you post some code for both your java client and jsp??

Maybe you are looking for

  • XSLT Mapping - help

    Hi All, I am new to XSLT mapping. My requirement is: file to XML file with CDATA, for this I am planning to use the XSLT Mapping. I downloaded the Stylus studio, then what next, Please help meu2026 In source flat file I have 5 fileds, and target I ne

  • Pages wont open documents

    I cannot open any past documents on pages. It prompts me to update in order to open past documents and then has no option for an update. the documents are there but i cant access them, i have deadlines to meet this is my own personal ****. help!

  • IDVD unexpectedly quitting

    I'm running Mac OS X 10.3.9 and iDVD 6, and I know that's old software now, but I checked for software updates and it was just for GarageBand and iMovie. But every time I try to burn a DVD, it unexpectedly quits (right after it asks me to put a blank

  • Windows, Design Premium, & Design Standard CS4 Re-install

    I need to re-install my Windows software. I have a serial number for CS4 Design Premium & CS4 Design Standard. Will I be able to re-install all of these CS4 programs iwthout any "hiccups" once I wipe my slate clean with a new Windows install?

  • Speedgrade CC won't open after recent update

    After a recent update Speedgrade CC will not open. I get the following error message. Speedgrade exe.-Entry Point Not Found The Procedure Entry Point ?create@recycledMemory@utility@dvzcore@@SA?AV?$hared_ptr@VRecycledMemory@utility@dvacore@@ boost@@XZ