How do I include pages conditionally
I have three incolude files in the mail JSP file. It's given one after another without any condition. How do I include them 'conditionally' -- include the one, which some validation fails. For example, if only shipping address validation fails, it should have only val_ship_addr.jsp included, not others.
i just wanna see clearly your situation.. what exactly you want to achieve? r u trying to have an error message on screen or something else? can u elaborate further ?
anyways, i have a simple example on how to include conditionally just to give u an idea..this might help you <i hope>:
so i hav a main screen named main.jsp .... on the left part of the screen list two links that corresponds to various screen . in short the right part of the screen is dynamic, depending on what the user clicks on the left part of screen.
suppose i have two menu's on the left screen named : My Profile and Change Password
/**** here is the main.jsp ********/
<html>
<head>
<script language="javascript">
function toggleScr(formobj){
document.formobj.submit();
</script>
</head>
<body>
<%@ include file="misc.html" %>
<table width="100%">
<tr>
<td width="200px">
<!-- left panel -->
<%@ include file="LeftPanel.jsp"%>
</td>
<td width="350px">
<!-- main screen this is the dynamic part -->
<%
if(request.getParameter("scr")!=null){
String screentype=request.getParameter("scr")
if(screentype.equalsIgnireCase("B")){
%>
<%@ include file="Myprofile.jsp"%>
<%
}else{
%>
<%@ include file="NewPassword.jsp"%>
<%
}else{
// show the default screen
%>
</td>
</tr>
</table>
</body>
</html>
/*** here is the LeftPanel.jsp ***/
<table>
<tr>
<td>
My Profile
</td>
</tr>
<tr>
<td>
New Password
</td>
</tr></table>
/*** here is the misc.html ****/
<FORM NAME="myfprofileform" method="post" action="main.jsp">
<INPUT TYPE="HIDDEN" NAME="scr" VALUE="A"/>
</FORM>
<FORM NAME="newpwdform" method="post" action="main.jsp">
<INPUT TYPE="HIDDEN" NAME="scr" VALUE="B"/>
</FORM>
Similar Messages
-
How to call New Page conditionally in Adobe Form
Hi,
Actually I want to develope a adobe form in which the employee training details will be come Page wise.
Suppose there is 2 employee one has 90 and another has 60 training details.Suppose on each page only 50 line items can be displayed.now for first employee in 1-st page 50 line item will come ,there afte in secon page 40 line item will be come.Now when second Employee details is coming it should not come in secon page .it should be come on third page.
Can anybody help me regarding this matterHi,
I think there is no way to do this, atleast for Adobe Designer v.7.0. But if you know XML or java scripting you can try that. I dont have much knowledge on it.
However there is one way. Add dummy records in the table so that there are mulitple of 50 records for each employee. I have also heard that adobe designer 7.1 has some extra options. Please try that if possible.
Please let me know too if you find anything out. It will help me too..
Regards,
Susanta -
How to include a page conditionally ?
Hi all !
I have a web page made of different sections. Every section is included in a separate page.
<f:view>
<h:form>
<%@ include file="filters.jsp" %>
<%@ include file="dataTableAdmin.jsp" %>
<%@ include file="modalPanel.jsp" %>
</h:form>
</f:view>Now I have the requirement that some sections should be visible only to the admin users.
The roles are referenced in a Bean registered in faces-config.xml.
How can I include a page depending on the value of the Bean ? I'd need something like the "rendered"
attribute on the "include" tag, but I'm afraid it doesn't exist......
Do you have any suggestion ?
Thanks alot
FrancescoPut the include into a panelgroup and use the rendered attribute...
-
How do I include a page from web search into an Email?
I have a HP TouchSmart 610-1147c Desktop computer. running Windows 7 64 bit. I should have known the answer to this question years ago, but I don't....terrible huh? Anyway, how do I include a page from a web search that I did into an Email? Believe it or not, I've never had to do this before, so don't have the faintest idea how to do this. I have a feeling that it would be sent as an attachment, but how don't know how to do that!!
I would appreciate any help that anyone would take the time to give me. I thank you beforehand for having patience with me and my silly question.
Auntie CC
This question was solved.
View Solution.Well, the way I would do it is to copy and paste the web address in the email, so the recipient can click on the link and get right to the Web page.
For example, I just googled "horses," and here is the result of that search:
http://www.google.com/#hl=en&output=search&sclient=psy-ab&q=horses&oq=horses&aq=f&aqi=g4&aql=&gs_l=h...
I highlighted the Web address, copied it, and then pasted it in the response. Same thing can be done into an emial.
Does that make sense? Or were you looking for something else?
GeorgeFN
GeorgeFN
I work on behalf of HP. -
Just purchased an Ipad, I'm stuck on a page "Conditions" on this page it says "Send by email"
. How do I get out of this page. WalterReboot the iPad by holding down on the sleep and home buttons at the same time until the Apple logo appears on the screen. It takes about 10 seconds. After you see the logo, you can release the buttons.
-
Using Pages, how do I include occasional "landscape"-formatted pages (for large tables) into a long "portrait"-formatted document?
I have not been able to find the solution on Pages Help.triplebrook wrote:
Using Pages, how do I include occasional "landscape"-formatted pages (for large tables) into a long "portrait"-formatted document?
I have not been able to find the solution on Pages Help.
It can't be done in Pages, hence you don't find the solution in Pages help!
You can rotate the table on the page instead. Press Cmd and drag the right lower corner 90 degrees -
How can I include a dynamic content in the page fragment?
My header.jspf contains codes similar to the following in the init() method:
Object o =getValue("#{sessionScope.username}");
if(o!=null){
greetingStaticText.setRendered(true);
}else{
greetingStaticText.setRendered(false);
But this code is not working as expected.
I tried the following in the jsp page, but still no use:
<jsp:include page="../Header.jspf"/>
Thanks.Before the initial render, your logic sets rendered false. Then on the postback when the user logs in, init executes (setting it false again); the static text is overwritten with the corresponding static text object from the component tree; and subsequently the action method executes (setting username in session); the page redisplays, with rendered still false. You can overcome this by setting the rendered property from your action method. Here are steps that simulate the solution:
1. Create a property in SessionBean1 called username of type String.
2. Drag a Page Fragment Box onto Page1. Create a fragment called Fragment1.
3. Drag a Hyperlink onto Page1. Set its text to "Go to Login Page" and its url property to /faces/Login.jsp.
4. Double-click to edit Fragment1.
5. Drag a Static Text. Set its id to greetingText and its text to "Welcome, #{SessionBean1.username}!"
6. Drag a Hyperlink. Set its id to logoutHyperlink and its text to "Logout"
7. Double click the logoutHyperlink and use the following code:
public String logoutHyperlink_action() {
getSessionBean1().setUsername(null);
greetingText.setRendered(false);
logoutHyperlink.setRendered(false);
return "Page1";
8. Append the following to Fragment1.init():
String username = getSessionBean1().getUsername();
greetingText.setRendered(username != null);
logoutHyperlink.setRendered(username != null);
9. Implement these two methods as follows:
public void setGreetingText(StaticText st) {
boolean rendered = this.greetingText.isRendered();
st.setRendered(rendered);
this.greetingText = st;
public void setLogoutHyperlink(Hyperlink h) {
boolean rendered = this.logoutHyperlink.isRendered();
h.setRendered(rendered);
this.logoutHyperlink = h;
10. Create a new page called Login.
11. Drag a Page Fragment Box onto Login.jsp (choose Fragment1.jspf).
12. Drag a Text Field and bind its text property to #{SessionBean1.username}
13. Drag a button. Set its id to loginButton and its text to "Login"
14. Double-click loginButton and use the following code:
public String loginButton_action() {
((UIComponent)getValue("#{Fragment1.greetingText}")).setRendered(true);
((UIComponent)getValue("#{Fragment1.logoutHyperlink}")).setRendered(true);
return "Page1";
15. Open Page Navigation and create an outcome called "Page1" that goes from Login.jsp to Page1.jsp.
16. Run the app.
17. Page1 displays with no greeting text. Click the "Go to Login Page" link.
18. Type "misty" in the text field and click the Login button.
19. Page1 displays, this time with the greeting text "Welcome, misty!" and a Logout hyperlink.
20. Click the Logout hyperlink to logout. Page1 displays, this time with no greeting text or Logout hyperlink. -
How I can include js (javascript) file in a jsp page?
Hi,
I�ve tried to include a js (javascript) file in jsp file but it doesn�t work.
When I try to use a js function in the browser I always receive an error. Oh, of course, I�m including the correct tag <script src= ...
What can I do? Does the problem in the WebServer?I cheated and put the scripts in another '.jsp' file and had no problem...then put an include b4 the closing 'head' tag, like this:
<jsp:include page="scrpt.jsp" flush="true" />
I had to do it this way for debugging using JDeveloper (it doesnt seem to like '.js' files). But when the jsp is on the server I used the following line instead:
<script language='JavaScript' src='scrpt.js'></script>
hope this helps. -
Conditional Layout (How I can determine page filling level? )
The document consist with two parts:
Part1: lines
Part2: 1 line+signature+stamp = should be inseparably
Situation1:
When part1 have n lines which up to 80% page then document allocated on single page. No problem.
Situation2.
When part1 have n+k lines which filled page over 80% then part2 must be on next page.
How I can determine end-of-page marker?
or
How I can determine page filling level ?Part2 should be allocated on single page with part1 ( if possible).
-
How to hide Header Page in Report Builder 6.0
Hi,
I am trying to modify the existing report. My requirement is to add a cover page to the report. Based on condition the cover page should not be displayed.
Ex: If currency='USD' then
cover page along with the report body
else
if currency = NULL then
report body should be displayed.
I wrote a format trigger on cover page frame. but it is displaying blank page as first page. It should not display blank page.
Format trigger:
function M_Cover_Page1FormatTrigger return boolean is
begin
if (:CP_currency IS NULL)
then
return (FALSE);
end if;
return (TRUE);
end;
Please help me out how to hide header page in report.
Thanks & Regards,
Sateesh kumar SPatchset 1663658
Simple Search Advanced Search Quick Links Saved Searches
Description Forms & Reports 6I-PATCH-4 for (NT,95,98,2000)
Product Oracle Developer Family
Release 6i
Platform or Language -------- Platforms --------Microsoft Windows (32-bit)
Last Updated 11-MAY-2001
Size N/A
This patchset is obsolete in this platform and language. Please see the reason stated below. Please contact Oracle Support for replacement patch.
Reason for Obsolescence
Forms&Reports 6i-Patch-4 for WindowsNT has been obsoleted, owing to the fact that a later verison, <b>patch-4a is now available for download via metalink</b>
Patchsets known to include or supersede Patch 1663658
No information available from the patch repository
Download Notes
Click here for the UNZIP utilities for most platforms.
You may also download patches using any FTP client by connecting to updates.oracle.com. Connect with your Metalink username and password and read the welcome banner for more instructions. Looks like you want patchset 1747364 now. As soon as you get into Metalink, change the Quick Find drop down to be "Patch Number" and put "1747364" into the search text box. This should pull up the patch you need. -
How to print last page in sap script in ladscape format?
Hi all,
can any 1 tell me How to print last page in sap script in ladscape format?
Thanks In advance.
PravinHi Pravin Sherkar,
we can do this in SAP Scripts.
we need to create two pages, one of landscape and another of potrait.
now after filling the data at last we need to call the page which is of format landscape using START_FORM function module.
You can use condition &PAGE& = &FORMPAGES&.
Please check this link
Printing Portrait/Landscape in sapscript
Re: Landscape and potrait in same layout?
http://www.sap-img.com/ts013.htm
Best regards,
raam -
How to remove blank pages from report
Hi All
i have a condition where i have to display the record only when trxn lines are available for that record ,inside my for each group condition i put the if condition having a count variable so if count is not zero then only the record will be displayed ,it works but problem is it shows blank pages for those records.
any clue would be very helpful.Thanks in advance
Thanks
PratapHi All
The solution of this issue is given in below mentioned thread
How to avoid blank page in BI Publisher
Thanks a lot to Vestrini :)
Thanks
Pratap -
How to use different page scapes in smartforms
hi
How to use different page scapes in smartforms.
I want Potrait format in the 1st page and Lanscape format in 2nd page is it possible if so plz suggest me an ideaHi,
It is possible in smart forms, but not in scripts.
we can have 3 tabbed options for pages in smart forms.
<b>General...
Output options
Conditions</b>.
In <b>output options</b> u can define whether a page can portrait or land scape in <b>print attributes</b>.
Reward if helpful.
Regards,
Sandhya -
How to create a page & portlet
Hi
I am new to Oracle portal. i am using Oracle 3.0.
i am working on an application in portal. i have created n number of forms, reports, dynamic pages, menus, sub menus & lovs etc. currently i access my application in a raw manner. first login , then go to the navigator link then applications & click on menu.
my menu is a single entry point to my application. how can i publish this. i.e what i want to do is the moment user logs in he should straight away get the menu view.
I have read there is something by which we can create pages & publish them.
Could someone tell me how to create a page where i can drop my components such as menu , forms & reports on to it & then create a complete portal.
I can see a create page in my oracle portal but the moment i try to add a portlet in that page it gives me option for adding an appliction only what i want to add is the componenets(such as menus, forms etc) residing inside my application.
what it gives me is 2 options 1 to edit & the other to navigate the application only, here i can see my components but cannot include them in my page.
Kindly reply
Regards
SushantYou can create a page and add application components to it as portlets. The first step to do this is to go to the application and check the publish as portlet check box. Then go to each component that you want to publish and check the publish as portlet box. Once you do that, you create a page and click add portlet (in edit mode). This will give you the portlet repository. Your application should show up as a provider and each component that you checked will show up as a portlet.
-
How to forward a page from multiple frames
hi,,
in my first jsp page there are 4 frames header ,footer,one left frame and right frame
in my header log out is there if im clicking logout it should forward to login page.it is happening but that page is coming within that header part(frame).how to make it visible as a full screen
my first page containing frames is as follows
<html>
<frameset rows="15%,*" ,id="app_frame" borderColor="red" frameBorder="0" frameSpacing="0">
<frame src="frame1.jsp" id="bar_top_frame" name="top_frame" marginWidth="0" marginHeight="0" scrolling="no"/>
<frameset rows="89%,*",border="0" framespacing="1" frameborder="no" borderColor="red">
<frameset cols="20%,75%",id="app_frame2" borderColor="#33CCFF" frameBorder="yes" frameSpacing="0" >
<frame src="bar_left.jsp"id="bar_left_frame" name="bar_left_frame" marginWidth="0" borderColor="red" marginHeight="0" scrolling="no" />
<frame src="frame3.jsp" id="work_frame" name="work_frame" marginWidth="0" borderColor="red" marginHeight="0" framespacing="1" />
</frameset>
<frameset rows="100%,*",border="0" framespacing="0" frameborder="0" borderColor="#0">
<frame src="footer.jsp" name="footer" NORESIZE frameborder="0" scrolling="no"/>
</frameset>
</frameset>
</frameset>
</html>
and my header frame that is frame1 is as follows
<html>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>ALMAT_ROLE_MAINTAINENCE</title>
<link href="<%=request.getContextPath()%>/almat/css/default.css" rel="stylesheet" type="text/css" />
<body>
<div id="header">
<div id="topmenu">
<ul>
<li>Home</li>
<li>Contact</li>
<li>Sitemap</li>
<li><a href="<%=request.getContextPath()%>/almat/pages/jsp/firstPage.jsp accesskey="3" title="">Log Out</a></li>
</ul>
</div>
<div id="logo">
<h1>A L M A T</h1>
<h2>..Allocation Made Easy</h2>
</div>
</div>
</body>
</html>
pls help me out to solve thisSimple answer is don't use Frames, Sorry I know you already have a design but plz! With JSP include there is no reason to use Frames also with the use of AJAX there is defo no need to use Frames.
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<div id="app_frame">
<jsp:include page="/frame1.jsp" />
</div>
<div id="bar_left_frame">
<jsp:include page="/bar_left.jsp" />
</div>
<div id="work_frame">
<jsp:include page="/frame3.jsp" />
</div>
<div>
<jsp:include page="/footer.jsp" />
</div>PS, try using Javascript
<script>
document.location="/url"
</script>Edited by: Gizard on Apr 17, 2009 6:54 AM
Maybe you are looking for
-
Unable to find Web Service Data Control in Menu
Hi I am trying to call a web service from ADF. For that, I want to create a web service data control As I understand, if I right click on the Model project, I should see the Web Service Data control under Business Tier > Web Services. (as shown in Se
-
How can I register my new ipad air?
How do I register my new ipad air?
-
My Phone Cannot Place Calls or Receive them
This is the Second Time this Problem has Happened. Each Time followed a Plane Trip from Detroit to Kansas City MO. The Phone Was Turned OFF while on the plane both times. I can Text and Receive DATA ONLY! Any call Place results with a message "The Nu
-
File to IDoc scenario( Bypass)-- Error ( Segment is missing) -- urgent pls. Hi Bhavesh and all, I done file to idoc scenario (Bypass) From the above thread i have hardcoded my XML file by inserting BEGIN and Segment = "1" in each of the new segment
-
NRA withholding for payments to Foreign vendors
Hi I would like to discuss with configurators from other US companies as to how they have implemented NRA withholding. In particular, how they handle varying tax rates for certain countries under tax treaties. Thanks Deepa