myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John" <jo...@jak.com>
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="http://myfaces.apache.org/tobago/component" prefix="t"%>
<%@taglib uri="http://myfaces.apache.org/tobago/extension" prefix="tx"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<t:panel id="quarantinePanel">
  <f:facet name="layout">
    <t:gridLayout columns="1000px" id="quarantineGridLayout"/>
  </f:facet>
  <t:box id="quarantineBox">
    <f:facet name="layout">
      <t:gridLayout/>
    </f:facet>
    <f:facet name="toolBar">
      <t:toolBar labelPosition="left" id="quarantineToolbar">
        <t:toolBarCommand label="Delete All"
action="#{quarantine.deleteAllMessages}"
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?"/>
          </f:facet>
        </t:toolBarCommand>
        <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)"
id="quarantineCmdDeliver"/>
        <t:toolBarCommand label="Deliver Always"
action="#{quarantine.whitelistDeliverMessages}"
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"
action="#{quarantine.populateMessageText}"
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:toolBar>
    </f:facet>
    <t:panel id="quarantinePanel1">
      <f:facet name="layout">
        <t:gridLayout rows="fixed;fixed;1*" id="quarantineGridLayout1"/>
      </f:facet>
      <t:panel id="quarantineInfoPanel">
        <f:facet name="layout">
          <t:gridLayout columns="fixed;fixed;1*" rows="fixed"
id="quarantineGridLayout2"/>
        </f:facet>
        <tx:in label="Total messages" readonly="true"
binding="#{quarantine.displayMessageCount}" id="messageCount"
value="#{quarantine.messageCount}"/>
        <tx:in label="Messages / page"
value="#{quarantine.messagesPerPage}" id="messagesPerPage" tip="Maximum
messages displayed per page"/>
        <t:cell/>
      </t:panel>
      <t:panel height="400px" id="quarantineSheetPanel">
        <f:facet name="layout">
          <t:gridLayout id="sheetLayout" rows="fixed"/>
        </f:facet>
        <t:sheet value="#{quarantine.messagesList}" id="quarantineSheet"
columns="3*;3*;2*;2*;1*" var="quarantineRec"
state="#{quarantine.selectedMessages}" showPageRange="right"
rows="#{quarantine.rows}">
          <t:column label="From" id="From" sortable="true">
            <t:out value="#{quarantineRec.sender}"
id="quarantineSheetOut0"/>
          </t:column>
          <t:column label="To" id="To" sortable="true">
            <t:out value="#{quarantineRec.recipient}"
id="quarantineSheetOut1"/>
          </t:column>
          <t:column label="Subject" id="Subject" sortable="true">
            <t:out value="#{quarantineRec.subject}"
id="quarantineSheetOut2"/>
          </t:column>
          <t:column label="Match text" id="Matchtext" sortable="true">
            <t:out value="#{quarantineRec.matchtext}"
id="quarantineSheetOut3"/>
          </t:column>
          <t:column label="Filtered by" id="Filteredby" sortable="true">
            <t:out value="#{quarantineRec.filteredby}"
id="quarantineSheetOut4"/>
          </t:column>
        </t:sheet>
      </t:panel>
      <t:tabGroup switchType="reloadTab" state="#{quarantine.tabState1}"
id="quarantineTabGroup2">
        <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"/>
          </f:facet>
          <t:panel/>
        </t:tab>
        <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"/>
          </f:facet>
           <t:textarea value="#{quarantine.messageText}" readonly="true"
binding="#{quarantine.displayMessageText}" height="300px">
</t:textarea>
        </t:tab>
      </t:tabGroup>
    </t:panel>
  </t:box>
</t:panel>


-----Original Message-----
From: Bernd Bohmann [mailto:bernd.bohmann@atanion.com] 
Sent: Tuesday, January 09, 2007 12:44 AM
To: MyFaces Discussion
Subject: Re: [Tobago] - Problems with updating text field with AJAX -
RESEND

Hello John,

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

Regards

Bernd

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 [mailto:weber.volker@googlemail.com]
> 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 <johnk@jak.com>:
>> 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 [mailto:weber.volker@googlemail.com]
>> 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 <johnk@jak.com>:
>>>
>>> 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
>>>
>>
> 
> 


Mime
View raw message