Afc:cache JSF and af:forEach
I have to iterate with a forEach to dynamicaly add panels in a tab.
I would like that each tab can be included in cache BUT i have to use different id for each cache element iterated...
How to do it ??? (it seems that generating the id dynamicaly is not possible because id can not be EL generated)
<af:showOneTab>
<af:forEach items="#backing_commercialoffer.composedPackages}"
var="packageLink" varStatus="vs" begin="1">
<afc:cache id="#{vs.index}" duration="60"
searchKeys="commofferList"
cacheMissOnRePost="false">
<af:showDetailItem text="#{packageLink.currentVersion.dateAsString}">
Hmmm it looks like I've found the answer in help for that tag:
"< af:forEach > does not currently support scenarios where the size of the "items" list or array changes from one request to the next. It may be possible to work around this in specific scenarios by manually deleting all children of the parent component, but this has not yet been tested. "
This is the case which caused my problem... the question remains - what for then is that tag, if it doesn't support the situation when count of records changes :-) ??? And other question - how to render nice table then? Do we have to use only standard table?
Leszek
Similar Messages
-
Can anyone tell me how to access JSF objects from JSTL tags?
I want to set a requestScope flag in my changeListener
... context.getExternalContext().getRequestMap().put("xxx","ok"); ... and render output depending on existance of this flag:
...<c:if test="${requestScope.xxx!=null}" > .... .
This examplecode doesn't work, JSTL tags cannot access this var! How can I do that?
What I realy want is to reload another frame when user changed a specific input field.
Above code should add a JavaScript to reload the frame if this is true .
I can't do this on submit because the other framepage uses the stored/modified data.
Maybe there's a better approach for this anyway?
Thanks for your help!Thanks for your help - I found it was my own mistake why it didn't work. Now it does, as you said.
But in the meentime I ran into another Problem mixing JSTL und JSF:
I want to build a SelectOneMenu and populate it with data from a database, but with selectItemValue
other than selectItemLabel (value should be numeric DB-ID, label a readable name).
Since "selectItems" allows only one dimensional Arrays (?) as parameter, I must use "selectItem" for
each row. So I wrote following code:
<h:selectOneMenu id="m1" value="#{worktime.employee}">
<sql:query var="employees" dataSource="jdbc/WebOfficeDB">
select oid,displayname from employees order by displayname asc
</sql:query>
<c:forEach var="row" items="${employees.rows}" >
<f:selectItem itemValue="#{row.oid}" itemLabel="#{row.displayname}" />
</c:forEach>
</h:selectOneMenu>This doesn't work, I get NullPointer Exceptions from selectItem.setValue().
I think because JSF "#" references another context than JSTL "$" - is this correct?
So I tried to set a JSTL variable inside the forEach loop to access the datarow
<c:set var="data" value="${row}" scope="request"/>
<f:selectItem itemValue="#{requestScope.data.oid}" itemLabel="#{requestScope.data.displayname}" />
...The effect is that all lines of the selectOneMenu have the same content (from the last datarecord)!?
Since this is my first project in JSTL and JSF and should stay a small one I don't want to go into building
CustomComponents and so on for such a simple Task.
I would be very very happy for some tips and hints, since I think this mixing of JSTL and JSF Context
will be a very common problem within my project.
Thanks -
Does Weblogic Portal Server provides caching services and multilingual support
I wanted to know whether Weblogic Portal Server 8.1 has got the facility for caching
services and multilingual support?is this JSF-portlet.jar bridge file used to create .portlet file from the JSF file so that the portlet file may be added in the portal?
And if you were able to solve the issue by removing the bridge jar file itself, how does that help? if that is the one that would help in creating portlets.
If anyone have been able to create a .portlet file from JSF and deploy in Weblogic 8.1, let me know.
Thanks,
-RAJIV. -
Problems with JSF and included subviews
Hi everybody,
I' ve got a problem with JSF and included subviews which makes me going
crazy. I've got no clue why my web-pages are represent wrongly. The only
tip I've got is that it must be connected with the kind I do include my JSF-pages.
When I use <%@file="sub.jsp"%> my pages are are represent right. When I use <jsp:include page="Sub.jsp" /> or <c:import url="Sub.jsp" /> ( mark: the usage of flush="true" or flush="false" doesn't matter )
my pages are represent wrongly.
The usage of tags like f:facet or f:verbatim were also included but didn't point to an solution.
I searched the whole Sun Developer Forum and some other web-sites for any solution for my problem but the given hints and clues didn't help. Now I'm trying to post my problem directly in Sun's Forum in hope to get help.
My environment is the following:
JAVA JDK 1.5 Update 4
Tomcat 5.5.9
JSLT 1.1
Sun JSF 1.1
Win 2K
Here's my code:
Main.jsp
<%@ page language="java"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName()
+ ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="stil.jsp" type="text/css" />
</head>
<body>
<f:view>
<h:form>
<div class="table">
<div class="tr">
<h:outputText styleClass="tdleft" value="value 1"/>
<h:outputText styleClass="tdinfo" value="value 2"/>
</div>
<div class="tr">
<h:outputText styleClass="tdleft" value="value 3"/>
<h:outputText styleClass="tdinfo" value="value 4"/>
</div>
</div>
</h:form>
<jsp:include page="Sub.jsp" />
</f:view>
</body>
</html>Sub.jsp
<%@ page language="java"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<f:subview id="subview">
<h:form>
<div class="table">
<div class="tr">
<h:outputText styleClass="tdleft" value="value 11"/>
<h:outputText styleClass="tdinfo" value="value 22"/>
</div>
<div class="tr">
<h:outputText styleClass="tdleft" value="value 33"/>
<h:outputText styleClass="tdinfo" value="value 44"/>
</div>
</div>
</h:form>
</f:subview>stil.jsp
<%@page contentType="text/css"%>
<%
String schwarz = "#000000",
grau1 = "#707070",
grau2 = "#c0c0c0",
grau3 = "#e0e0e0",
grau4 = "#e8e8e8",
grau5 = "#fdfdfd",
blau = "#0000dd",
tuerkis = "#00cfff";
String liniendicke = "1px",
linienart = "solid";
String allgemeineTextFarbe = schwarz;
String allgemeineHintergrundFarbe = grau3;
String infoTextFarbe = blau;
String fieldsetRandFarbe = blau;
String fieldsetRandDicke = liniendicke;
String fieldsetRandArt = linienart;
String hrLinienFarbe = blau;
String hrLinienDicke = liniendicke;
String hrLinienArt = linienart;
String inputAktivHintergrundFarbe = grau5;
String inputReadonlyHintergrundFarbe = grau4;
String inputPassivHintergrundFarbe = grau4;
String inputPassivFarbe = schwarz;
String inputRandFarbe1 = grau1;
String inputRandFarbe2 = grau5;
String inputRandDicke = liniendicke;
String inputRandArt = linienart;
String inputButtonHintergrundFarbe = grau3;
String legendenFarbe = blau;
String linkFarbe = blau;
String linkAktivFarbe = tuerkis;
String linkBesuchtFarbe = blau;
String linkFocusFarbe = tuerkis;
String objectGitterFarbe = grau5;
String objectGitterDicke = liniendicke;
String objectGitterArt = linienart;
String tabellenGitterFarbe = grau5;
String tabellenGitterDicke = liniendicke;
String tabellenGitterArt = linienart;
%>
<%-- ----------------------------------------------- --%>
<%-- Textdarstellung mittels der Display-Eigenschaft --%>
<%-- in den Tags div und span --%>
<%-- ----------------------------------------------- --%>
*.table {
display:table;
border-collapse:collapse;
*.tbody {
display:table-row-group;
*.tr {
display:table-row;
*.td,*.tdright,*.tdleft,*.tdinfo,*.th {
display:table-cell;
padding:3px;
vertical-align:middle;
*.td,*.th {
text-align:center;
*.tdright {
text-align:right;
*.tdleft {
text-align:left;
*.tdinfo {
color:<%=infoTextFarbe%>;
text-align:right;
*.th {
color:<%=infoTextFarbe%>;
font-weight:bold;
}thanks in advance
benjaminHello Zhong Li,
many thanks for your post, but it didn't work.
My problem is that the JSF-Components im my included or imported
JSP-Pages does not accept any kind of style or styleClass for
designing. The components take over the informations for colors
but not for alignment.
When I take a look at the generated JAVA-Source in $TOMCAT/WORK/WEBAPP for my sub.jsp ( sub.java )
it seems that the resulting HTML-page would be presented correctly.
But later when I start the application via Firefox or Mozilla the html-sourcecode is totally wrong.
In my example I create a simple grid with 2 rows and 2 columns.
Both columns contains JSF-Outtext-Components and are included with div-tags.
The generated Sub.java shows that the text would be setted in the div-tags. Unfortunately the html-sourcecode represented by my browser shows that jsf-text is not setted in the tags but in the <h:form> tags. The div-tags are neither rounded by <h:form> nor containing the JSF-OutText-Components.
Any clue?
Many thanks Benjamin
Here is the html-code from Firefox:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="http://polaris21:8080/webtest/">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="stil.jsp" type="text/css" />
</head>
<body>
<form id="_id0" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
<div class="table">
<div class="tr">
<span class="tdleft">value 1</span>
<span class="tdinfo">value 2</span>
</div>
<div class="tr">
<span class="tdleft">value 3</span>
<span class="tdinfo">value 4</span>
</div>
</div>
<input type="hidden" name="_id0" value="_id0" />
</form>
<form id="SUB:_id5" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
<span class="tdleft">value 11</span>
<span class="tdinfo">value 22</span>
<span class="tdleft">value 33</span>
<span class="tdinfo">value 44</span>
<input type="hidden" name="SUB:_id5" value="SUB:_id5" />
</form>
<div class="table">
<div class="tr">
</div>
<div class="tr">
</div>
</div>
</body>
</html> -
Difference between af:iterator and af:foreach
guys,
whats the difference between af:iterator and af:foreach ?The documentation for af:iterator describes the differences:
http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_iterator.html
While the <af:forEach> will be sufficient for most user's needs, it does not work with a JSF DataModel, or CollectionModel. It also cannot be bound to EL expressions that use component-managed EL variables (such as the >"var" variable on an <af:table>). The <af:iterator> tag was created to address these issues. Thanks,
Navaneeth -
how to cache jsf page with submitted data .
Where do you want to cache it? And with which purposes?
-
some music files do not show up in google play music app library. I did clear cache/data and restarted phone. The music is stored on the SD card. Most of the music in the library is in the same folder on the sd card. I can play the song from file manager, but it still is not in the music library in play music.
Cyndi6858, help is here! We'd be happy to help figure this out. Just to be sure though, the Droid Maxx should not have an SD card. Is this the Droid Razr Maxx? How did you add the music to the device? Are you able to see the files and folders located on the SD card or device when plugged in?
Thanks,
MichelleH_VZW
Follow us on Twitter @VZWSupport -
Building a Simple JSF and Web Services App in JDeveloper 10.1.3 Preview
Hi
I was trying out this example of JSF and webservices at:
http://www.oracle.com/technology/products/jdev/101/howtos/jsfws/index.html
Has anyone tried it before? I'm getting the following error:
calling http://216.200.21.157:9090/soap
WARNING: Unable to connect to URL: http://216.200.21.157:9090/soap due to java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP Content-Type: text/html
java.rmi.RemoteException: ; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP Content-Type: text/html
at com.minc.ws.stockquery.proxy.runtime.NetXmethodsServicesStockquoteStockQuoteBinding_Stub.getQuote(NetXmethodsServicesStockquoteStockQuoteBinding_Stub.java:96)
at com.minc.ws.stockquery.proxy.NetXmethodsServicesStockquoteStockQuotePortClient.getQuote(NetXmethodsServicesStockquoteStockQuotePortClient.java:40)
at com.minc.ws.stockquery.proxy.NetXmethodsServicesStockquoteStockQuotePortClient.main(NetXmethodsServicesStockquoteStockQuotePortClient.java:29)
Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP Content-Type: text/html
at oracle.j2ee.ws.client.http.HttpClientTransport.invokeImpl(HttpClientTransport.java:142)
at oracle.j2ee.ws.client.http.HttpClientTransport.invoke(HttpClientTransport.java:118)
at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:175)
at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
at com.minc.ws.stockquery.proxy.runtime.NetXmethodsServicesStockquoteStockQuoteBinding_Stub.getQuote(NetXmethodsServicesStockquoteStockQuoteBinding_Stub.java:79)
... 2 more
Any ideas?
Thanks
AlexI'm not using 10.1.3 preview. I was using 10.1.3.1 production. I just copied the title of the tutorial as my subject. sorry for the confusion!! :)
I used the HTTP analyzer and this is what I got in the header:
<HTML><HEAD><TITLE>TCP Packet Monitor Error</TITLE></HEAD><BODY>JDeveloper TCP Packet Monitor encountered an error retrieving<P><pre>POST http://216.200.21.157:9090/soap HTTP/1.1
Host: 216.200.21.157:9090
Proxy-Connection: Keep-Alive
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: Oracle HTTPClient Version 10h
SOAPAction: "urn:xmethods-delayed-quotes#getQuote"
Accept-Encoding: gzip, x-gzip, compress, x-compress
Content-type: text/xml; charset=UTF-8
Content-length: 680
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="urn:xmethods-delayed-quotes"><env:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" env:mustUnderstand="1"/></env:Header><env:Body><ns0:getQuote env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><symbol xsi:type="xsd:string">orcl</symbol></ns0:getQuote></env:Body></env:Envelope></pre><P>The error was :<P><pre>IOException retrieving the response: java.net.ConnectException: Connection refused: connect</pre><P></HTML>
It looks like I'm getting connection refused error... Hmmm.. wonder why?
I'll download 10.1.3.2 and see if that helps..
Thanks for looking into this!
Alex -
Hi - in the app store, I've logged in with no problem, but when I go into my existing purchases and have INSTALL next to everything I've bought, and try to click on them it says;
"There was an error in the App Store. Please try again later. (100)".
I've tried restarting, clearing all caches, buying and downloading new apps (which works), and also buying and downloading more music from iTunes too (so I update all T&C's etc too, and update all payment info). But nothing seems to solve this. Any ideas?? Thanks a lot, GregThis procedure is a diagnostic test. It makes no changes to your data.
Please triple-click anywhere in the line below on this page to select it:
ls -@Oaen L*/Coo* | pbcopy
Copy the selected text to the Clipboard by pressing the key combination command-C.
Launch the built-in Terminal application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
Paste into the Terminal window by pressing the key combination command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
Wait for a new line ending in a dollar sign ($) to appear below what you entered.
The output of the command will be automatically copied to the Clipboard. If the command produced no output, the Clipboard will be empty. Paste into a reply to this message.
The Terminal window doesn't show the output. Please don't copy anything from there. -
Does OAM cache users and how do you configure a flush?
I'm using OAM 10g with 11g OVD and 11g OID. OAM is configured to use OVD as it's user store.
I've created a successful LDAP authorization rule, but it takes several hours for the authorization rule to detect a change to the ldap value. So a change to the ldap that should prevent authorization fails to take affect for several hours.
I'm guessing the user has been cached so the new value isn't detected until the cache is flushed/updated. Is this the case? Where do you set the time limit for this?
ThanksFor info. I've found the manual user cache flush and the user cache timeout on the access server.
-
I cant retrieve my images from webcams that are cached any more with mozilla. With netscape all of the live webcam images from live cams were automatically saved in my cache folder and all i had to do was open it send the files to acdsee and turn them into jpgs. It would save them untill the Cache ran out of room no matter how many files or sites I had running. Mozilla seems to save what it wants when it wants and often dose not save any that I can retrieve because I believe it is bulking them into Cache 123 or 4 and those i cant open to retrieve the files. Sometimes it saves 100 or so and sometimes 2 or 3 sometimes 10 or more but i don't seem to have any control over what it does or does not save to retrieve no matter how much space i allow for the cache to save.
== This happened ==
Every time Firefox opened
== I finally gave up trying to keep netscape due to all the ridiculess popups and continued reminders from you saying i had to switch overYou have or had an extension installed (Ant.com Toolbar) that has changed the user agent from Firefox/3.6.3 to Firefox/3.0.12.
You can see the Firefox version at the top and the user agent at bottom of the "Help > About" window (Mac: Firefox > About Mozilla Firefox).
You can check the '''general.useragent''' prefs on the '''about:config''' page.
You can open the ''about:config'' page via the location bar, just like you open a website.
Filter: '''general.useragent'''
If ''general.useragent'' prefs are bold (user set) then you can right-click that pref and choose ''Reset''.
See [[Web sites or add-ons incorrectly report incompatible browser]] and [[Finding your Firefox version]]
See also http://kb.mozillazine.org/Resetting_your_useragent_string_to_its_compiled-in_default -
In safari, on my Ipad2, I get the error message " too many redirects" and the page won't load. I have cleared the cache, cookies, and history and have rebooted and I still get the same problem. Any advice?
In safari, on my Ipad2, I get the error message " too many redirects" and the page won't load. I have cleared the cache, cookies, and history and have rebooted and I still get the same problem. Any advice?
-
hi all.
i'm developing an application using jsf and tiles.
i've some problem in the general layout page.
how can I refer to images and files,if I don't know where the page will be used?
with struts i've used <html:rewrite page=" ... " /> but it doesn't work with jsf.
I only use the TilesServlet.
any suggestion?
i've also try to define the url like "/css/mycss.css" but in local dosn't work.
thank a lot for any reply!hi all.
i'm developing an application using jsf and tiles.
i've some problem in the general layout page.
how can I refer to images and files,if I don't know where the page will be used?
with struts i've used <html:rewrite page=" ... " /> but it doesn't work with jsf.
I only use the TilesServlet.
any suggestion?
i've also try to define the url like "/css/mycss.css" but in local dosn't work.
thank a lot for any reply! -
Greetings:
Please either confirm and/or correct following proposed solution for Myfaces tiles.
Issue: isert a tile definition and attribute in a pure jsf page.
First passed solution: A hybrid of Jsp programming and Jsf. I was able to create a tile page layout in pure jsf except in the portal columns i used old fashion jsp programming to insert a list of portletDefinitions which is extracted from jsf ValueBinding of its managed beans.
The problem with the above approach is that it works well only with html portlet fragments. When a portlet fragment has some jsf elements, the page rendering has conflict of simultaneous rendering between jsf and jsp. The portlet fragments are rendered in a woring place.
Proposed solution: use <h:dataTable ...> to render the portletList and extract the item portletDefinition as following:
<h:dataTable var="portlet"
value="#{portalTabbedBean.selectedPane.serviceListL}" >
<f:verbatim>
<h:outputText
value="<tiles:insert name=#{portlet.portletDefinition} flush='false' /> " />
</f:verbatim>
</h:dataTable>
Note on the name of tiles:insert element, which i just extracted the definition as a jsp variable to make it work in the first hybrid solution:
<tiles:insert name="<%=portletDefinition%>" flush="false" />
Thanks
BaTien
DBGROUPSI reply this myself. Jsf and Jsp programming either via Jstl or while loop do not go together under current version.
I solve the problem by using Jsp programming and insert the portlet tile fragment directly rather than though a portlet template with different tile content attribute. The portlet tile is created as <h:panelGrid ...> and observe the set rules to make Jsf and jsp working together. Hopefully Jsf and Jsp will be able to work together nicely in their next specifications. -
Can any body give some info on integration of JSF to existing struts application
I describe the main differences between JSF and Struts in this sample Chapter from my JSF book:
http://www.oreilly.com/catalog/jsvrfaces/chapter/ch01.pdf
Hope that helps.
Maybe you are looking for
-
How can i reset my securtiy questions while the is no option for rescue email ?
i know the basic way to rest a secrity quetions but whats bothering me is that i cant download any paid app from my i phone till i answer my securty qeustions which i dont remember and whenever i go to https://appleid.apple.com and enter my ID i dont
-
Updated to Snow Leopard, now having problems with Java??
I've had my MacBookPro for five years, and I'm thrilled it's lasted so long with no bugs. However, since I updated from Tiger to Snow Leopard on my MBP, things have been running slow, hiccuping, etc. I've run the disc utility app a couple of times, a
-
Cant Add OCRD.CardName,CRD7.ECCNo to this query.Please Help. declare @FDate as datetime declare @TDate as datetime declare @Location as VARCHAR (30) /* SELECT FROM [dbo].[OLCT] S0 WHERE */ SET @Location = /* S0.Location*/ '[%0]' /* SELECT FROM [db
-
Displaying Medium Text in Variable screen (WAD)
Hello Experts, When I run one of my reports in BEx, the input help for an infoobject shows key, Short Description and Medium Description. But the same report when I run in WEB it does not show the Medium Description but only the key and Short Descrip
-
Premium extension with multiple subscriptions
Hello, I'm just trying to find out what is happening with my premium account. I initially got skype premium on March of 2013. Of course, here we are and I just got a message that it's around seven days till March, so my premium account would be exp