Robin,

I do not understand how having the <html> tag helps you with setting the content type... <tr:document> will output the <html> tag even in Trinidad 1.0.10. When you look at the generated
source (View->Source), do you see two html tags?

Max

Robin Müller-Bady wrote:
Hey,

i used this tag, because its not possible to use "<jsp:directive.page contentType="text/html;charset=utf-8"/>" in my project. So i decided to use the html-tag in order to get my project running.

One important information is, that i need to use Apache MyFaces Trinidad 1.0.10 and JSF 1.1, because the application is deployed on a Websphere Application Server 6.1. Could this fact cause the problems ? I just deployed the Apache MyFaces Demo version 1.0.10 and in this version, the same problem occurs on /trinidad-demo-1.0.10/faces/components/poll.jspx. (Resend Diaog from Firefox)

Isn´t it possible to fix this issue in JSF1.1 / Trinidad 1.0.10 ?

Thanks in advance,

Robin

Max Starets schrieb:
Robin,

Are you saying that you are getting the standard browser dialog asking whether data should be re-posted? That would happen only if the page is being refreshed. Perhaps something wrong is happening with the PPR request. I see one problem in your page - the <html> tag should not be there. <tr:document> renders its own <html> tag.
I would get rid of the <html> tag and re-test.

Max

Robin Müller-Bady wrote:
Dear List,

i have a problem with the <tr:poll> tag.
I use it to update contents of a <tr:table> data.
My problem is, that everytime i send an action to the server or submit the form, the poll repeats the previous action. In case i send the form and update the table, the poll starts to ask my whether i want to resend the data.

Is it possible to use a poll for just 1 element ? (The table) I tried to do it with <tr:table partialTriggers="::chatPoll" ... > but this did not work.

Here´s my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%-- jsf:pagecode language="java" location="/src/pagecode/Chat.java" --%><%-- /jsf:pagecode --%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/trinidad"; prefix="tr"%>
<%@ taglib uri="http://myfaces.apache.org/trinidad/html"; prefix="trh"%>
<html>
<f:view>
<tr:document id="doc1" title="Chat mit #{chatuserbean.displayName}">
<tr:form id="form1" defaultCommand="sendButton">
<tr:panelPage id="panelPage">
<tr:table id="chattable" width="100%" emptyText="No messages sent"
partialTriggers="::chatPoll"
value="#{chatuserbean.historyListFromChatPartner}" var="chat">
<tr:column headerText="Sender">
<tr:outputText value="#{chat.messageSender}" />
</tr:column>
<tr:column headerText="Message">
<tr:outputText value="#{chat.message}" />
</tr:column>
</tr:table>
<tr:panelFormLayout>
<tr:inputText value="#{messagebean.message}" />
<f:facet name="footer">
<tr:panelButtonBar>
<tr:commandButton text="Send" id="sendButton"
action="#{messageaction.doSendMessage}" />
</tr:panelButtonBar>
</f:facet>
</tr:panelFormLayout>
</tr:panelPage>
<tr:poll id="chatPoll" interval="2000" immediate="true" />
</tr:form>
</tr:document>
</f:view>
</html>


Thanks in advance !

Robin




Reply via email to