6 Replies Last post: Apr 23, 2008 3:18 PM by Tatyana Matveyeva  
Daniel Wachter   14 posts since
Mar 17, 2008
Currently Being Moderated

Mar 27, 2008 7:19 PM

Passing Objects trough a method call in a DataTable

Hello Team-Dev Support

 

During the evaluation of your QuipuKit components we noticed some strange behavior.

We have the following View:

 

 

+ <ui:repeat var="datalogger" value="#{m_Facility.dataloggers}">+  <h:form> <q:dataTable var="node" value="#{datalogger.nodes}" width="100%" applyDefaultStyle="false" styleClass="data_table" headerSectionClass="data_header" bodyRowClass="data_row" bodyOddRowClass="data_row_tainted"> <f:facet name="noDataMessage"> <h:outputText value="#{q_msg.f_mes_noDevices}" /> </f:facet> <q:column> <f:facet name="header"> <h:outputText value="#{q_msg.f_netId}" /> </f:facet> <h:outputText value="#{node.networkAddress}" /> </q:column> <q:column> <f:facet name="header"> <h:outputText value="#{q_msg.f_retentionTime}" /> </f:facet> <h:outputText value="#{deviceAction.calcDuration(node)}" /> </q:column> </q:dataTable>    </h:form>                                            </ui:repeat>

 

 

 

 

At the method call deviceAction.calcDuration(node) I pass a node object.

If I debug calcDuration(Device node) my node object is null!

 

 

 

 

I found two solutions for which the passing will work:

 

 

  1. I use a h:dataTable instead of the q:dataTable

  2. I use the q:dataTable in a nested c:forEach

 

 

In this situation, I can't work with nested c:forEach loops!

Do I understand something wrong, that sould be possible, or not?

Is it possible to pass objects inside a dataTable?

 

 

 

Thanks for helping

Daniel

 

 

 

 

 

 

PS: We use JBoss AS 4.2.2 and JBoss Seam 2.0.1

Darya Shumilina TeamDev Ltd. 24 posts since
Jan 4, 2007
Currently Being Moderated
1. Mar 27, 2008 7:43 PM in response to: Daniel Wachter
Re: Passing Objects trough a method call in a DataTable

Hello Daniel,

 

Please, provide us with the following info:

 

- Your page (JSP or XHTML)

- Backing bean

- Scenario to reproduce the problem

- QuipuKit version

- JSF implementation and version

- Your web.xml file

 

Also it would be great if you can send us war-file that contains the reproducing example.

 

Regards,

Darya

Dmitry Pikhulya TeamDev Ltd. 162 posts since
Jan 5, 2007
Currently Being Moderated
3. Mar 29, 2008 9:25 PM in response to: Daniel Wachter
Re: Passing Objects trough a method call in a DataTable

Hello Daniel,

 

We tried to reproduce the problem using the ear-file you have provided, but unfortunately we couldn't run the ear file as is. It couldn't start because of some database issues. Nevertheless we've been able to create a separate sample page right in your application. This page contains a q:dataTable component inside of ui:repeat iterator, and passing parameters in EL expressions inside of this table works fine. We've also checked this use case in other applications having similar configurations, but haven't succeeded with reproducing the problem. You can find the test page and the backing bean that it uses in the attachment. Please try this page on your side and confirm that it works for you as well. Please also confirm that it demonstrates the use case that you were having a problem with.

 

 

 

If you still cannot resolve the problem using this sample, please try to localize the problem and create the simplest possible application without the database that demonstrates this problem. Please send us the ear-file  with this localized example. This way we'll be able to reproduce and investigate the problem effectively.

 

 

 

Regards,

 

 

Dmitry

 

 

P.S. The problem with s:link is a known issue (see the list of known issues). The fix for this issue will most probably be included in the nearest release, which will preliminary be available in a month.

Attachments:
Dmitry Pikhulya TeamDev Ltd. 162 posts since
Jan 5, 2007
Currently Being Moderated
5. Apr 2, 2008 6:25 PM in response to: Daniel Wachter
Re: Passing Objects trough a method call in a DataTable

Hello Daniel,

 

I have just tried using a method call expression inside of <h:outputText> component instead of just plain method binding expression, and it worked fine both in our testing application, and in the war file that you have provided. Note that I've only tried the modified version of a test page that I have attached in my previous post. So there must be some other specifics that causes this behavior.

 

Please tell if you still need help with resolving this problem.

 

Regards,

Dmitry

Tatyana Matveyeva   873 posts since
Aug 16, 2006
Currently Being Moderated
6. Apr 23, 2008 3:18 PM in response to: Dmitry Pikhulya
Re: Passing Objects trough a method call in a DataTable

Hello Daniel,

 

We've fixed the issue with JBoss Seam's s:link component and the fix is available in QuipuKit 1.4.3.

 

Regards,

Tatyana

More Like This

  • Retrieving data ...