myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John" <>
Subject RE: [Tobago] - Problems with updating text field with AJAX - RESEND
Date Tue, 09 Jan 2007 16:55:58 GMT
Hi Bernd,
This is the code - not sure I know how to produce a simple page that
exercises the same functionality in exactly the same way:

<%@taglib uri="" prefix="t"%>
<%@taglib uri="" prefix="tx"%>
<%@taglib uri="" prefix="f"%>
<t:panel id="quarantinePanel">
  <f:facet name="layout">
    <t:gridLayout columns="1000px" id="quarantineGridLayout"/>
  <t:box id="quarantineBox">
    <f:facet name="layout">
    <f:facet name="toolBar">
      <t:toolBar labelPosition="left" id="quarantineToolbar">
        <t:toolBarCommand label="Delete All"
image="images/mail-mark-junk.jpg" tip="Delete all messages in
quarantine" id="QuarantineCmdDelAll">
          <f:facet name="confirmation">
            <t:out value="Delete every message in quarantine?"/>
        <t:toolBarCommand label="Delete"
action="#{quarantine.deleteMessages}" image="images/delete.jpg"
tip="Delete selected messages(s)"/>
        <t:toolBarCommand disabled="true"/>
        <t:toolBarCommand label="Deliver"
action="#{quarantine.deliverMessages}" image="images/mail-forward.jpg"
tip="Deliver selected messages to recipient(s)"
        <t:toolBarCommand label="Deliver Always"
image="images/whitelist-deliver.jpg" tip="Whitelist and then Deliver
selected message(s) in one step" id="quarantineCmdDeliverAlways"/>
        <t:toolBarCommand label="WhiteList"
action="#{quarantine.whitelistMessages}" image="images/whitelist.jpg"
tip="Record sender of all selected messages - future messages from this
sender will bypass filtering" id="quarantineCmdWhitelist"/>
        <t:toolBarCommand disabled="true"/>
        <t:toolBarCommand label="View Message"
image="images/system-search.jpg" tip="View message source in Message
Display area" id="quarantineCmdViewMsg"/>
        <t:toolBarCommand disabled="true"/>
        <t:toolBarCommand label="Refresh" action="#{quarantine.refresh}"
image="images/view-refresh.jpg" tip="Refresh list of quarantined
messages" id="quarantineCmdRefresh"/>
    <t:panel id="quarantinePanel1">
      <f:facet name="layout">
        <t:gridLayout rows="fixed;fixed;1*" id="quarantineGridLayout1"/>
      <t:panel id="quarantineInfoPanel">
        <f:facet name="layout">
          <t:gridLayout columns="fixed;fixed;1*" rows="fixed"
        <tx:in label="Total messages" readonly="true"
binding="#{quarantine.displayMessageCount}" id="messageCount"
        <tx:in label="Messages / page"
value="#{quarantine.messagesPerPage}" id="messagesPerPage" tip="Maximum
messages displayed per page"/>
      <t:panel height="400px" id="quarantineSheetPanel">
        <f:facet name="layout">
          <t:gridLayout id="sheetLayout" rows="fixed"/>
        <t:sheet value="#{quarantine.messagesList}" id="quarantineSheet"
columns="3*;3*;2*;2*;1*" var="quarantineRec"
state="#{quarantine.selectedMessages}" showPageRange="right"
          <t:column label="From" id="From" sortable="true">
            <t:out value="#{quarantineRec.sender}"
          <t:column label="To" id="To" sortable="true">
            <t:out value="#{quarantineRec.recipient}"
          <t:column label="Subject" id="Subject" sortable="true">
            <t:out value="#{quarantineRec.subject}"
          <t:column label="Match text" id="Matchtext" sortable="true">
            <t:out value="#{quarantineRec.matchtext}"
          <t:column label="Filtered by" id="Filteredby" sortable="true">
            <t:out value="#{quarantineRec.filteredby}"
      <t:tabGroup switchType="reloadTab" state="#{quarantine.tabState1}"
        <t:tab label="Message Display off" tip="Don't display content of
selected message" id="quarantineTabGroup2Tab1">
          <f:facet name="layout">
            <t:gridLayout rows="0px" id="viewOffLayout"/>
        <t:tab label="Message Display on" tip="Display content of 1st
selected message" id="quarantineTabGroup2Tab2">
          <f:facet name="layout">
            <t:gridLayout rows="fixed" id="viewOnLayout"/>
           <t:textarea value="#{quarantine.messageText}" readonly="true"
binding="#{quarantine.displayMessageText}" height="300px">

-----Original Message-----
From: Bernd Bohmann [] 
Sent: Tuesday, January 09, 2007 12:44 AM
To: MyFaces Discussion
Subject: Re: [Tobago] - Problems with updating text field with AJAX -

Hello John,

it would be easier to understand the problem if you send a simple jsp
page for this.



John wrote:
> Well, not directly. I don't know how to explicity initiate an AJAX 
> request. I'm only using the inherent AJAX within the sheet code. I'm 
> not sure I understand your question.
> -----Original Message-----
> From: Volker Weber []
> Sent: Thursday, January 04, 2007 12:17 PM
> To: MyFaces Discussion
> Subject: Re: [Tobago] - Problems with updating text field with AJAX
> The toolbarButton triggers the ajax request?
> 2007/1/4, John <>:
>> Hi Volker,
>> From a button on the toolbar above. Which querys the database and 
>> updates the sheets data.
>> Then the tx:in is updated by doing a setValue on its component (which

>> I now know only to take affect during a relayout[not the right name] 
>> phase), as well as just modifying its value.
>> John
>> -----Original Message-----
>> From: Volker Weber []
>> Sent: Thursday, January 04, 2007 10:36 AM
>> To: MyFaces Discussion
>> Subject: Re: [Tobago] - Problems with updating text field with AJAX
>> Hi John,
>> how did you trigger the refreshing?
>> 2007/1/4, John <>:
>>> My page is basically laid out like this:
>>> --------------------
>>> tx:in
>>> --------------------
>>> --------------------
>>> tc:sheet
>>> --------------------
>>> When the sheet is refreshed (new data pulled in from the backing 
>>> bean), the tx:in displays a new count of the rows.
>>> This has always worked fine. It uses a binding and also a value to 
>>> grab the row count from the backing bean
>>> Now with AJAX enabled, I'm noticing that the tx:in doesn't always 
>>> update (about 50% of the time). I'm attributing this to the sheet 
>>> updating in place with AJAX and therefore not refreshing the tx:in.
>>> How do I make tx:in update still?
>>> Thanks,
>>> John

View raw message