Results 1 to 5 of 5

Thread: Reusing JSF Page Code

  1. #1
    Join Date
    Apr 2010
    Posts
    69

    Reusing JSF Page Code

    I have three JSF pages that contains the same block of Code. Do you have any method through which I can be able to make one JSF page as main.jsp with the primary block of code and then use somewhat as the include tag to just use again and put the main.jsp with my another three pages. I have tagged the code in the attachment section. Please take a look .. I need put this code in a primary jSP and then just involve the tag in different JSPs where ever I need the above section to be populated. How can it be done ?Do you have any suggestion
    Attached Files Attached Files

  2. #2
    Join Date
    May 2008
    Posts
    4,345

    Re: Reusing JSF Page Code

    It looks as the basic use scenario for styling of the page means page templating. In this situation, I strongly suggest you t just move from JSP to Facelets, that provides a very absolute templating fix. Sometimes users tells that "I am unable to use Facelets because it's not a standard." In JSF 1.2 it was fine, but in JSF 2.0, Facelets is in the core standard.

  3. #3
    Join Date
    Apr 2010
    Posts
    219

    Re: Reusing JSF Page Code

    Hi guys,
    I am trying to implement the javascripts in my jsf page to find whether the issued values for the employee id attribute is numeric or not.. if not then this should show an error message within the message box but I am running in stuck about the procedure to perform that,Actually my jsf page is as follows please suggest me with the code implementation..

    Code:
    <f:view>
         <head>
           <title>Employee Search Details</title>
                
           
                 </head>
         <body>
           <h:form>
            <!--f:attribute name="form1" value="">
            </f:attribute-->
             <table>
               
               <tr>
               <td><h2>Emp Details Search Form</h2></td></tr>
                 
                 <tr>
                 <td>Emp Id</td>
                              
                 
                <td><h:inputText value="#{backing_search.emp_id}"  
                             id="empid" >
                    
                     </h:inputText>
                   
                 </td>
                     
                </tr>
                <tr>
                <td>Name</td>
                              
                 
                <td><h:inputText value="#{backing_search.name}"
                             id="name"/></td>   
                
                </tr>
                
                <tr>
                 <td>Role</td>
                 <td><h:selectOneMenu value="#{backing_search.selectedItem}">
                      <f:selectItems value="#{backing_search.selectItems}" />
                </h:selectOneMenu ></td> 
                </tr>
                
                
                <!--tr>
                 <td>SkilSets</td>
                              
                 
                <td><h:inputText value="#{backing_search.skill}"
                             id="skill"/></td>
     
                </tr-->
                
             </table>
             <p><h:commandButton value="SEARCH" action="#{backing_search.commandaction}"   /></p>
             
     
     
           </h:form>
         </body>
       </f:view>

  4. #4
    Join Date
    Apr 2008
    Posts
    4,088

    Re: Reusing JSF Page Code

    JSF always been executed at the server side, produces HTML output and transfers the same to the client side. JS executes at the client side and able to get and retrieve the HTML DOM series only. So,run the JSF page in your webbrowser, perform a view source and after all allow your JS code base on that. This issue is not important and associated with the JSF. This is just a lack in getting how the components works.

  5. #5
    Join Date
    Apr 2010
    Posts
    77

    Re: Reusing JSF Page Code

    Hi, I am new guy for entire activities and getting on the way. But I am going with something same as to the first points explained below . I am currently making a component which can build me a form from XML dependent configuration file. In that case, you would directly work with the HtmlForm and HtmlInputText. The element that I am creating , builds the form page with the regular _expression_ validator transferred into this . It also consumes in a Bean to fill in the values in the situation of a Edit mode. The help would be appreciate if I get any feedback on customizing this type of dynamically generated forms.

Similar Threads

  1. Reusing the hard drive windows 7
    By Imao in forum Hardware Peripherals
    Replies: 5
    Last Post: 08-04-2011, 07:06 AM
  2. How to add VBScript code in a page
    By Aahlaadith in forum Software Development
    Replies: 6
    Last Post: 30-11-2010, 12:38 AM
  3. Reusing expired software
    By VivRichards in forum Windows Software
    Replies: 5
    Last Post: 09-11-2010, 11:39 AM
  4. Code to fit web page to monitor size
    By Sunny55 in forum Customize Desktop
    Replies: 3
    Last Post: 08-07-2009, 12:29 PM
  5. JavaScript code outside html page
    By Gefry in forum Software Development
    Replies: 3
    Last Post: 30-04-2009, 03:53 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,727,121,349.12168 seconds with 18 queries