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
Similar Messages
-
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 -
Hi,
I have created error.jsp page also added in web. XML but it is not catching exception
error.jsp
<body>
<h2>Your application has generated an error</h2>
<h3>Please check for the error given below</h3>
<b>Exception:</b><br>
<font color="red"><%= exception.toString() %></font>
</body>
Web.xml
<error-page>
<error-code>500</error-code>
<location>/Error.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/Error.jsp</location>
</error-page>
after login page i am getting these exception
java.lang.NullPointerException
at view.security.UserAccess.get(UserAccess.java:30)
at javax.el.MapELResolver.getValue(MapELResolver.java:164)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
at com.sun.el.parser.AstValue.getValue(AstValue.java:118)
Truncated. see log file for complete stacktrace
>
but it is not redirecting to error page
also i am using adf.config.xml (task flow )for mapping pages so how to resolve these issue
can anybody help me
is there any another way to create error page
Thanx in advance..!!!
AmolHi Frank ,
Thanx for replying
Where i have to define error is there any sample application that may helpful for me
Also, I have created sample JSF page in thse
ErrorDiaplay.jspx
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=windows-1252"
isErrorPage="true"/>
<f:view>
<af:document id="d1">
<af:form id="f1">
<af:panelFormLayout id="pfl1">
<f:facet name="footer"/>
<jsp:scriptlet>
out.println(exception);
</jsp:scriptlet>
</af:panelFormLayout>
</af:form>
</af:document>
</f:view>
</jsp:root>
Let me know where i have to define...
Regards,
Amol -
How to create a Registration page in WebDynpro java
Hi All,
How to create a registration page in Web Dynpro java.Whatever i enter in the field of registration page should be stored in the pcd..So plz help me???
Message was edited by: suman sahuHi Suman,
I have a similar kind of requirement , please let me know if you have got the solution for this??
Regards,
Ravi. -
Does anyone here knows how to create a login page thru JDBC?
Anyone here knows how to create a login page which connect to database thru JDBC but not JDBC-ODBC bridge?
Hi..pls you'll do people here a great good if you could explain yourself better..!
Anyway if you are trying to connect to an Oracle Database you dont need the jdbc-odbc bridge as oracle provides a special driver for java applets/applications that is "the thin driver" and the "oci driver"..so if you are connecting to Oracle your connection will look like this:
Class.forName("oracle.jdbc.driver.OracleDriver"); //not sun.jdbc.odbc.JdbcOdbcDriver
Connection con = DriverManager.getConnection ("blah blah, blah");
no need for the jdbc-odbc bridge.
I hope i've answered your question.
Thanks. -
How to create a master page in Dreamweaver?
Hi
Does anyone know how to create a master page in Dreamweaver ??Dreamweaver Templates ~
http://www.smartwebby.com/web_site_design/dreamweaver_template.asp#1
Server-Side Includes ~
http://www.smartwebby.com/web_site_design/server_side_includes.asp
Spry Tabbed Panels ~
http://labs.adobe.com/technologies/spry/samples/tabbedpanels/tabbed_panel_sample.htm
Spry Accordion Panels ~
http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
How to create a "Child" page?
Hi there,
I have been watching tutorials on Apple's site and cannot find any help on how to create a Child Page in iWeb. In other words, how to create pages "under" other pages?
Any advices?
Thanks,
PapaChilliWeb doesn't provide the capability to do this natively, but see the +"Drop Down Menus in iWeb"+ section HERE. And you'll find more suggestions by doing THIS.
-
Hello,i am very new to dreamweaver 8,and i have searched
everwhere possible on how to create a html page.My website has a
navegation bar.And on the navegation bar it has links,like
forums,your accounts,and etc,but thats already integrated with the
website.Now i have an option in the admin area,wher i can create a
new category so that it would show up in the navegation bar,and i
have a drop down menu where i cans select what to put in that
category.But also i have an option to put a external url,so that
when they click on it,it will take them to where that link is
directed.The point is that i asnt to make a category in the
navigation menu that says Lirics.So that i can put lirics of songs
and etc,and that when users click on that link it will take them to
the lirics page..Do you guys understand?Sorry for the bad english,i
am now quite good with it..The most eloquent description will do nothing for us. To get
a solution to
your problem, we must see your code. Can you upload the file
and post a
link to it, please?
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
==================
"don_playboy" <[email protected]> wrote in
message
news:eaadi9$kjf$[email protected]..
> well what i am trying to say is that i created a Folder
named
> Liricas(which is
> lirics in spanish),on my ftp.Now since i created that
folder in my ftp,it
> will
> show on my navegation menu control panel.But it will be
blank since it has
> nothing on it.Now what i want to do is,sicne i created
that folder,and i
> go to
> my nav meny control panel and select it as a category it
will show on my
> navegation menu(the Liricas that is),but when u click it
it has
> nothing,since
> it has no html or anything in the category.Now i want to
create a html
> page so
> that i can put albums names,and under those albums name
i want to create a
> link
> or category thats for lirics.So all this will be stored
on the ftp.and
> when
> users click on the Liricas category on my navigation
menu,it will take
> them to
> the liricas index page,which will show all the lirics...
>
>
>
> -
How to create a HTML page like iView, thanks in advance!
How to create a HTML page like iView, thanks in advance!
I'm a newcomer, would you please tell me how to create a HTML page in WebDynpro ? In fact, i want create one welcome page which use html format and include some javascript.
thanks again.jakinapallykrishna , thank you very much for you reply.
The pdf file is a simple application, but i want know how create a view in HTML format (<HTML>... </HTML>), maybe use HTMLB control, i don't sure it.
In fact, I need create a view in portal, some pictures in it, once mouse over one picture, it need change another picture replace old one. I don't know how to do it, just know it can be handled in HTML page. So, i need help.
Thanks. -
How to create a One Page checkout
Hello nice people,
Does anybody knows how to create a ONE-PAGE Check Out Process in Online Shop Layout?
Thanks in advance"I can resolve the problem if I can insert one page (or step) after
"registration - buy". This would be a "summary" page where the customer has
the last opportunity tu check out all his data and, if it is needed, to
correct his order, billing address, shipping, the way of payment"
<<< The only way to do this is with JS. You can use jQuery's .load() method
to load your cart into the registration layout. You'll have to do some
parsing of that cart table to obtain things like product name, quantity etc
and present this in some kind of summary. Parsing tables in jQuery is not a
nice task, so if you're going to embark onto producing this kind of summary
you may want to get rid off the table from the cart and simple throw in
some divs and tags which will help you parse the cart nicely. That mans
you'll have to construct the layout for the cart though using JS.
Example of alternative cart layout:
It renders like this:
product one
(S)
product one
(M)
onchange="UpdateItemQuantity(this.value,231502,234492,6737768,183427,'','US');return
false;" class="cartInputText" type="text" value="1">
onchange="UpdateItemQuantity(this.value,231502,234492,6737768,183428,'','US');return
false;" class="cartInputText" type="text" value="3">
$10.00
$45.00
$55.00
You can see that this is much nicer to read and you can then construct your
own data structure that will hold this info and render it it whichever way
you want to. You can even write it back as a table where each product is in
its own row. You may want to look at something that gives you template.
model, controller like ember.js.
Anyway, I hope that helps somewhat.
Cheers,
M -
How to create a multi-page collapsible & CSS styleable table of contents box?
How to create a multi-page collapsible & CSS styleabe table of contents box?
Is there a tool available for Dreamweaver or for standalone operation that can create for multi-page articles a collapsible & CSS styleabe table of contents box based on the page titles?You could do this with jQuery.
Table of Contents -
http://www.downloadjavascripts.com/list/javasiteccc68/Details.aspx
Collapsible Panels, Tables & Accordions -
http://www.downloadjavascripts.com/Collapsible_And_Free_Accordion_Panels.aspx
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.blogspot.com -
How to pre-compile JSF pages?
Hi,
I am new to JSF and would appriciate if any one can help me find out how to pre-compile JSF pages?
Thanks in advance
satsdnThe same way you pre-compile JSP pages: Set it up in your faces-config.xml file.
Here's how I do it:
<servlet>
<servlet-name>AcctID</servlet-name>
<display-name>AcctID</display-name>
<jsp-file>/AcctID.jsp</jsp-file>
<load-on-startup>-1</load-on-startup>
</servlet>Put one of these tags for each JSP you want to pre-compile. The -1 load-on-startup value is important.
CowKing -
How to Use another JSF page that I load by XMLHttpRequest?
Hi everyone, I'm a newbie of JSF and curisous about how to load page content seperately by AJAX.
I saw example of Java Blue Print. It's load some data to use in page. What I want is to load another JSF page when click a link or button, (Like include another page). And work with functions privoided by loaded JSF Page.
My example is, In a main page. I request a JSF page and set it into a div layer.
var requestURL = "/admin/customer/customer-list-body.faces";
var content = postDataWithoutContent(requestURL); divContent.innerHTML = content;
All JSF components are required under <f:view>, thus action of form is set as "action='"/admin/customer/customer-list-body.faces'"
But my page is main.jsp. Each time I click command button in customer-list-body.faces, the url will change to customer-list-body.faces, I want to request and hold in main.jsp.
What can I do then? Any advices?Hi,
the list doesn't seem to be your problem. You need to track down the illegal argument exception. Once you have that sorted out, expose the method on the AM so it gets shown as a method binding. The return values then could be picked up in a managed bean to create the select Item list
Frank -
Need HOW-TO on dynamic JSF pages
How can we change a page dynamically? For example, I want to create an image tag but I do not know the name of the image until runtime. In fact it is a temporary file name that is geneated by a servlet .
If this was a standard JSP page I would create a JSP tag with a "name" property . Can JSP tags be used on JSP pages and if so where do they show up in the Creator IDE?A technique that I have achieved in my app is to set the image url dynamically through the image url like this...
THIS ONLY WORKS IF YOU HAVE USERNAME OR SIMILIAR FOR CLIENT SET IN SESSIONBEAN1 (JDBC/LDAP, Login, etc...)
1. Close Creator locate an example jpeg that you want to bind dynamically.
2. Open your Projects directory (outside of Creator is how I did) navigate to web/resources make an images directory inside of resources.
3.Rename your example image something like...
template1username.jpg
(Hope I don't have to say that above username will correspond to whatever username you would like to bind the url to so when they are logged into your app they will have dynamic image just for them)
4. Paste the renamed jpeg into the newly created images directory.
5. Go back into Creator open your app and drop an image component onto the page.
6. Make sure it is selected and go to properties pane -- url -- click the ellipses.
7. NOTE I tried to use property binding and Creator wouldn't retain my url.
8. Go to Use Value and then navigate to the images directory to the example renamed jpeg and select it so the url displays on top.
9. Now all you have to do is manually add the binding in the url this way Creator doesn't seem to complain and the JSF Tag remains in the url
10. To add the binding manually just replace username with the necessary binding expression for me it was...
/resources/images/template1#{SessionBean1.loginBean.username}.jpg
now run the project once logged in navigate to page with bound image and voila! It should be there and now all you have to do is add the images properly renamed to the images folder and anybody with a username and corresponding image in the directory gets a personalized image when they are logged in. This is probably not the best way to do this, but for what I was trying to achieve coupled with the fact that I am a NOOB it works pretty darn good. -
How to create a 4 page pdf from images - each page should open at same size
How do I create a 4 page pdf (from 4 images - all the same size) that opens each page at full page size?
Thank you so much.
Ginger
PREVIOUS MSG:
My goal is to create multi page pdfs that are created from images (scans of old brochures). I receive images (scans of pages) all at the same size.
I have been able to create the 4 pdfs (each opens at full page size) and merge into 1 pdf. When I open that final pdf, I see a column of 4 pages, page 1 image being larger than the remaining 3. When I click on the left, page 1, icon, I get the full page. When I click on icons for pages 2 - 4, I get nothing. The only way I can get the other pages in a full page view is to adjust the scaling after left icon is selected. That is not what I want.
How I created the files.
I can either create pdf pages using Photoshop, or using Acrobat Pro itself through:
File> Create PDF> From File and adding each of the images. I then, for each, choose Properties> Initial View> Fit Page> Save. Then I use File> Combine> Merge Files into Single PDF> Save.
Then I open the multi page pdf.
I appreciate any help.
Thank you,
Ginger
PREVIOUS MSIt seems to me what you want to do is create one document which a combination of all four and then one page of each.
To create a Document with 4 pages combined in to one PDF. open the first in a Series the to Edit menu and click on add pages click on next document (browse to document first) the choose attach to to end of document or add to end of document. Repeat until you get all images added. They will end up (or should ) center in center of their own page. Save this document with a new name for now.
Next go back to Photo shop and reduce size of images to fit desired sheet of paper (8-1/2 by 11, 8-1/2 by 14, whatever) place them side by side and row by row so you have 4 images on one page.
now save as Pdf.
now decide which you want to swap to the Thumbnails (the 4 on one page, or 4 individual pages. I would use the thumbnails and make each a button that references the page in the document you save as a 4 page pdf that applies.
Then on that page write a line saying click each illustration to see full size image (you might have to write this line while in Photoshop) then save this as PDF file
Try out. You might have to use some javascript controls to do this. But I am not experienced in JavaScript to do this. I'm sure it cane be done.
But note you will have to save both documents with the Thumbnails and the four page and Thumbnail page in a folder and send to prospect
If you want just four separate pages in one Pdf just do first two paragraphs above
Maybe you are looking for
-
Image processor option missing from bridge cc
In the past I have been able to open Bridge and go to tools - photoshop- image processor and then a panel would open where I could resize my images, change their file type, and apply an action to a batch of photos. I just updated my version of Bridge
-
Itunes music from 2 apple IDs on 1 iPhone
Hi - I have two separate Apple IDs and while I understand I can't merge them, can I get the music from both into one itunes library and then sync my iphone with this library. I just want to be able to listen to music from my new and older account on
-
Is there anyway I can use my iPod Touch serial number or Apple ID to trace and find back my iPod Touch? Cause I lost it recently(as you know iPod Touch can only go online if there is WiFi). is there any other ways too, apart from contacting the polic
-
Although I can remove it, when iSync starts again the device is still shown. In this case it is Pocket PC, which was a program to connect a Pocket PC to the Mac. I no longer need this. I also tried to add a Nokia E90. I d/loaded the plug-in, did a se
-
Hi Gurus Please let me know the std condition types of CVD and SHE cess. We have the following condition types JCV1 and JCV2 and JCE1 (and not JEC1). JCV2 and JEC1, (CVD and ECS AP columns respectively) have been entered in the maintain excise defau