Creating dynamic jsf page from xml

I have an xml file with repeating content and from this xml file I have to build a screen with what is in the XML file
The following is a sample of what I am talking about .I would have two RequestItem sections on the screen with a field ItemId ,RequestAction,
Level,TelephoneNumber etc.
The problem I face is knowing how many RequestItemes are in the XML .
Any Ideas what is the best way to approach this .
<RequestItem>
<ItemId>3</ItemId>
<RequestAction>ADD</RequestAction>
<Level>LINE</Level>
<TelephoneNumber>
<TN>3035552224</TN>
<CompressionType>729</CompressionType>
</TelephoneNumber>
<TenantLocationRecord>
<Id>tlr1234567891
</Id>
</TenantLocationRecord>
</RequestItem>
<RequestItem>
<ItemId>1</ItemId>
<RequestAction>DELETE</RequestAction>
<Level>LINE</Level>
<TelephoneNumber>
<TN>3035542224</TN>
<CompressionType>730</CompressionType>
</TelephoneNumber>
<TenantLocationRecord>
<Id>tlr1234567891
</Id>
</TenantLocationRecord>
</RequestItem>

Use Jaxb to read the XML and then programatically add components to the page.

Similar Messages

  • Creating dynamic HTML form from XML data in session

    I'm a bit new to servlets, please bear with me if I don't make myself clear.
    currently i have a HttpServlet that extracts a XML document into a jdom Document.
    this is done within the doGet() method as the XML document is in the session object.
    i would like to create a popup window (a JSP or servlet) that can access the same session, convert some of the data in the XML to a submit form that users can put input into, and have the JSP(or maybe servlet) send the form data and the XML back to the original HttpServlet (through the session object).
    i have a few questions on how to make this happen:
    1.how to create a popup window (JSP or servlet) in a servlet, and forward the session data as well?
    2.if the popup window has a submit form that submits some extra data back to the original httpservlet, will the XML document still be retained in the session?
    and any advise on how to go about this problem is highly appreciated!

    Hi,
    This is my first time posting a reply. Hope this helps.
    I am assuming that you are hitting the servlet from a link. This is one way of doing it. You can create a new window using Javascript. like this.
    <script language="javascript">
    var popupWin
    function openWindow(page){
    popupWin=window.open(page,"","width=800,height=600,resizable,scrollbars");
    </script>
    link
    The response of your servlet will be in the new pop-up window.
    2.if the popup window has a submit form that submits
    some extra data back to the original httpservlet,
    will the XML document still be retained in the
    session?The session should be retained as long as you are hitting the same servlet container . You should be able to access the seesion variable in the original servlet if the form in the pop-up window calls the original servlet.
    --mv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Create web pages from xml files using Servets or JSP

    I�m new in this tecnology and I have to create a web pages from information that I get from a XML files. I would like to know if there is a place where I can find examples of code or any book that could help me.

    Two places with loads of information on this:
    http://xml.apache.org
    Look at Xalan or Cocoon.
    Also, there was an article on http://www.javaworld.com on XML with JSP.

  • JSF Pages from entity class

    I am new to NB5.5. However, when I create a 'web application' project then I get the option to create 'JSF Pages from entity class' in the persistence category but not while creating a 'visual web application' project. Is there a way of getting this option in visual web applications?
    Regards
    Rajeev

    Hi, may I know what you mean by Visual Web Application?
    Creating JSF Pages from Entity Classes is just a way to increase the speed of developing a web application (a database must already be existing, connected to netbeans for you to use this option).

  • How to run and JSF page from Bea Weblogic 8.1

    Hi, I am new to JSF . Can anybody help me that how can i access a JSF page from Bea Weblogic 8.1. How can deploy. What libraries and files are needed and where to put these required .jar or library files. I just wrote a single page and now i am not able to run it . Any help would be highly appreciated.I am looking forward for your kind replies.Thank you.
    Regards,
    Waqar

    You need to package your application into the standard .war format. Make sure jsf-api.jar and jsf-impl.jar are placed in WEB-INF/lib, your faces-config.xml is in WEB-INF, and your tld files are defined appropriately. Once you have your .war file, deploy it to your servers applications directory or use the console for deployment.
    You should not have any problems if everything is packaged correctly. I am successfully using WebLogic Server 8.1 with my JSF-based web app.

  • How to create an Excel file from XML in the Receiver File Adapter Comm Ch

    How do I create an Excel file from XML in the Receiver File Adapter Communication Channel? I have my mapping done and I am outputting the file as a comma delimited csv file. However, the target can only process an Excel file (.xls). How can I generate an Excel in XI?
    I saw this blog, but I don't know how to create a XSLT transformation.
    /people/michal.krawczyk2/blog/2005/12/10/xi-generating-excel-files-without-the-java-nor-the-conversion-agent-not-possible
    Any help would be appreciated. Thanks.

    Here are the steps I took to create an XSLT transformation in XI 3.0:
    1. I created my source and target XSDs using XMLSpy.
    2. I created the XSLT mapping from source to target in XMLSpy (referencing the souce XSD schema).
    3. I created another XSLT mapping to format the target into Excel XML.
    4. Import the source and target XSDs in the IR's External Definitions
    5. Zip each XSLT mapping (.xls) and import it into the IR's Imported Archives
    6. Reference the XSL mappings in the Interface Mapping

  • What is the best way to create a database schema from XML

    What is the best way to create a database schema from XML?
    i have  a complex XML file that I want to create a database from and consistently import new XML files of the same schema type. Currently I have started off by mapping the XSD into Excel and using Mysql for Excel to push into MySQL.
    There must be a more .net microsoft solution for this but I cannot locate the topic and tools by searching. What are the best tools and way to manage this?
    Taking my C# further

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • How to create a JSF page wich filter a Table, similar to an ORACLE ADF LOV?

    I want to create a JSF Page with a table and filtering capabilities similar to ORACLE ADF LOV(List Of Values) (or similat to ORACLE Forms LOV)
    So, we have a page wich contain a Table and a text field and search button.
    The field will contain the search criteria and the button will submitt the search.
    The search criteria shoult be applied on a table column and the result be rendered.
    An example can be : http://technology.amis.nl/blog/?p=1933 realized in Oracle ADF technology.
    Can anyone find a similar example in JSF/Netbeans ?
    Thanks!

    To realize a LOV may be usefull a filter on the table:
    http://webdev2.sun.com/woodstock-tlddocs/webuijsf/table.html#TableFilter

  • How to create a JSF page on fly?

    I have created a login application. After successful authentication, I want to create a JSF page on fly that contains different menu oprtions based on user's authority. My question here is that is it possible to create a JSF page on fly? If yes, then how?
    My working environment is RAD6.0, Websphere6.0
    Please Advise.

    Ok you have something like this
    <f:view>
    <h:form id="mainForm" />
    <h:form >
    </f:view>
    in your code you have
    UIComponent mainForm=FacesContext.getCurrentInstance().getViewRoot().findComponent("mainForm");
    then you can do
    Application app = FacesContext.getCurrentInstance().getApplication();
    HtmlInputText in = new HtmlInputText() ;
    in.setStyleClass("myClass");
    ValueBinding vb = app.createValueBinding("#{myBean.myProperty}");
    in.setValueBinding("value", vb);
    mainForm.getChildren().add(in);
    the other option instead of doing the mainForm.getChildren().add(in);
    in your jsp page you can have
    <h:inputText bininding = "#{myBean.myInputText}" />
    where myInputText is a HtmlInputText
    that way you can position your componets in your jsp and create them in your backing bean

  • Creating a HTML page from the J2ME application

    Hi,
    I am developingan application in J2ME. Can anyone of you out there, help me whether there is any way I can generate a HTML page from the application.
    I have the data but I don't know ho to create a HTML page from a J2ME application.
    Any document or any code will prove handy.
    Thanking in anticipation.
    Ashish

    When you say that "you have the data" you mean that you have HTML code data(<html><body>Hello World</body></html>)? If yes you should create an algorithm that "read" html tag and display text in the appropriate layout/font/size/color...
    A solution could be simplify your HTML code (server side), so you can easly "decode" and display text.
    Giovanni
    Italy

  • Create dynamic distribution group from 2 or more OU ?

    How I can create Dynamic distribution group from 2 or more OU ?
    I tried modified solution from this post:
    http://social.technet.microsoft.com/Forums/office/en-US/11a338b9-dbca-4378-9cda-4590a5b8d0f7/exclude-specific-ou-or-user-from-dynamic-distribution-groups?forum=exchangesvrgenerallegacy
    but I'm not sure will this work.

    Hi,
    I have some tests in my environment using Exchange 2013. I use the following cmdlet to create a dynamic distribution group through multiple OUs, but it can't work as I expect.
    New-DynamicDistributionGroup -Name "Users with mobile phones" -Alias "usermobile" -RecipientFilter{(((recipienttype -eq 'usermailbox') -and (MobilePhone -ne $null) -and ((RecipientContainer -eq 'contoso.com/users') -or (RecipientContainer -eq 'contoso.com/test
    OU'))) )}
    Actually, we have a dedicated support team regarding the Microsoft Scripts. I recommend you ask your question on our Microsoft Scripts forum which is staffed by more experts specializing in this kind of problems. Thanks for your understanding.
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?category=scripting
    Hope it helps.
    Best regards,
    Amy Wang
    TechNet Community Support

  • Is anyone know how to create dynamic pdf file from a JSP page or Servlet ?

    Hi
    Is any one know how to create a dynamic PDF file from JSP or servlet. I need to have standard form format needs to be created and want to send the info to that form dynamically.
    Is there any libraries available?
    Thanks

    I posted a link in this thread to a lib that lets you create PDFs from an app. They have a Java version. I have not used it but I know someone who used it with Microsoft ASP and they liked it.
    http://forum.java.sun.com/thread.jsp?forum=31&thread=287285
    -S-

  • Creating new JSF2 pages from a running Servlet (3.0) or JSF2 page?

    I'm new to JEE6 web apps with JSF 2.x frontends (GlassFish 3), and I still wasn't able to find a solution for this dynamic JSF 2.x problem:
    *From inside a running JSF 2.x web app (Servlet 3.0), which possibilities (if any) do I have to dynamically add generated JSF pages (whole new .xhtml files) to specific folders of the (exploded) document root, so that these pages can be dispatched to the client like any traditional, statically-deployed one?*
    Background: An app for "promoting" authors/editors (content providers) which has these few main requirements:
    <ol>
    <li>New providers will register under <tt>www.acme.com/app/register.xhtml</tt>.</li>
    <li>The system will grant each provider "sub-domain" associated with web space under
    <tt>www.acme.com/app/<b>providerX</b></tt> where providerX is an arbitrary sub-domain name chosen by the provider during the registration.</li>
    <li>Each provider will initially have some pre-defined pages in their document context root, e.g.
    <tt>www.acme.com/app/providerX/index.xhtml</tt>, <tt>about-me.xhtml</tt>, <tt>contact.xhtml</tt>, etc.</li>
    <li>Each provider will have an administration console for managing 2 tasks:
    <ul>
    <li type="a"><tt>www.acme.com/app/providerX/admin/page-manager.xhtml</tt> </li>
    <li type="a"><tt>www.acme.com/app/providerX/admin/customer-manager.xhtml</tt></li>
    </ul>
    to specify new pages with offers, publish these pages in their document context root, e.g. <tt>www.acme.com/app/<b>providerX</b>/<b>my-services</b>.xhtml</tt> (customized page name), and
    to manage their readers/customers, respectively.
    </li>
    <li>Thus, each providerX will also have a pre-deployed customer registration page running, which creates standard customer accounts. E.g.:
    <ul>
    <li type="disc"><tt>www.acme.com/app/providerX/customers/registration.xhtml</tt></li>
    <li type="disc"><tt>www.acme.com/app/providerX/customers/login.xhtml</tt></li>
    <li type="disc"><tt>www.acme.com/app/providerX/customers/customer-account-dashboard.xhtml</tt></li>
    </ul>
    </li></ol>
    Please note: I know that for such kind of systems a CMS would be more suitable, but is such a system -- here aiming at only basic functionality -- also realizable in pure JEE 6 technologies, i.e. w/o CMS???
    <b>The unclear main aspect is stated in my initial question above. Basically, I hope to get these clarifications:</b>
    <ol>
    <li><b>Which app architecture designs can I use to deploy new generated JSF pages or servlets from within a running JSF page or servlet???</b></li>
    <li><b>Supposing that all relevant page description data provided by a provider is stored in a db:
    Where can I "cache" the new .xhtml pages generated from these data on-the-fly when (a) an exploded WAR, and (b) a packaged WAR is running???</b>
    The pages shall be "hooked" to the scope (doc root) of the respective provider and dispatches by the <tt>FacesServlet</tt> as such.</li>
    </ol>
    Due to the crucial importance in a current project, I'd really appreciate any constructive help very much.
    Natalia.

    Natalia F. wrote:
    Determining you as one of the experts in this forum, please, could I ask you how you'd solve this kind of web apps in JSF2 (one of the requirements stated at the beginning of this thread):I'm certainly an expert at having an opinion about everything.
    >
    Having a "page-manager.xhtml" JSF2 UI at "/page-manager" context that lets registered member X define a website (=a set of .jsf/.xhtml pages) in a new context "/websiteX" (where "websiteX" is freely chosen and associated with dedicated webspace to store the pages in the filesystem):
    How to store these dynamically created website pages from within the PageManagerServlet?
    <ol><li type="a">Could I create a new exploded WAR structure in the filesystem (or elsewhere) when a new context is defined, and then store new .jsf/.xhtml files therein when a new page is defined, all this with usual file operations? -- Would this be enough, or...</li>
    <li type="a">...after storing a new page, would I need to explicitly tell the container to deploy the page (or re-deploy the WAR(?)) so that I can instantly test/run the page when it is new/modified, or will it be compiled automatically when pointing a browser to it???
    I guess both is possible, but for performance reasons, a pre-compile would be better. How can I achieve this?</li>
    </ol>
    Thank you a million for your help, Natalia.I only see mention of xhtml files - that is the easy part. But XHTML files don't actually do anything at all. What about classes like JSF managed beans? jar libraries? database connections and ORM/JPA support which also adds the complexity of having to deal with all the configuration descriptor files? Even if you can automatically deploy all that, replacing existing classes and reloading them is a whole different matter.
    My "expert" opinion: this cannot be done with JSF. In fact the only Java web framework which I can think of that has any chance of making something like this possible is Play framework. I'd really take the road that EJP took: make the content dynamic, not the webapp.

  • Create View Object programattically from XML input

    Hi,
    I have requirement to create view object from xml at run time in ADF application. is there any way to create view object dynamically in java program from xml?
    My requirement is to call a webservice and generate view object from the response of the web service call.
    Thanks

    I want to create view objects from different web services and the same will be available to the developer at the time of development. I don't want to create web service proxies for each of the web service. this will simplify the developers task to create proxy and data controls. the one thing developer has to do is select the service and base on the service the view objects will be created to develop pages accordingly.

  • How to allow my webserver to create dynamic web pages ?

    say i have created a pretty simple web server in java which can send and receive HTML files. How can i extend it to allow dynamic web pages ?
    thanks

    You know the part that takes some information from a request, and then loads the requested file?
    Replace that with something that takes that info and uses it to invoke some other functionality.
    No more detail is possible given the detail-less nature of your question.
    You do realize that you're reinventing the wheel, right?

Maybe you are looking for

  • How to install App Store on my macbook pro?

    Hi I have del the app "app store" as i can't open it,so i decided to del and install it back but I jus can't find the app.Can someone pl's advice.Thank You

  • How to display a row in Cross Tab when the count summary is zero

    My customer wants a row for all possible data, even when the count is zero.  How can I get a row to display when there is no data?  Using an example:  Display status for incidents - possible five statuses, but selection only results in four statuses

  • Photoshop CC Lighting Filter is not working

    Lighting Filter is not working.  When you run the filter the circular ring/point does not appear to adjust the light.  It is totally missing. You can adjust the settings but the filter never runs.  After attempting to run the filter I tried to go bac

  • Line numbers

    How do I add line numbers to the lines for each transaction on a journal entry report. In column C I want to add the line number for each line that has the same transaction number in column D. Then start a new set of line numbers for the next transac

  • POST-QUERY and LOV

    Hi, I created a POST-QUERY trigger on a LOV field; I have checked off “Validate from list”, so the user is forced to use the LOV. However every time a user retrieves a record, and then tries to re-query, they get the message, “Do you want to sa