Hi,
Hi Remo,

I had this problem a while ago - it turned out that, rather 
counter-intuatively, the Components themselves have no state, so don't need to 
be serialized.  As far as I can remember the state is all held in the model.  
Are you getting the current selection out of it or something?  If that's what 
you are doing you can do that just by getting the current value of the variable 
it's bound to from the page context.  I've got a little utility method I use 
for this so e.g. if you've got a table and you need to find out which item was 
clicked on:

  <af:table var="item" value="{model}"> 

You can use this little utility method of mine:

  public Object getRequestVar(String name) {
    FacesContext fContext = FacesContext.getCurrentInstance();
    VariableResolver requestResolver = 
fContext.getApplication().getVariableResolver();
    return requestResolver.resolveVariable(fContext, name);
  }

to pull out the selected row with getRequestVar("item").

I may have taken a few steps too far in assuming this is what your problem is, 
so just ignore me if this isn't what you're talking about.

Regards

Jim
-----Original Message-----
From: Remo Liechti [mailto:[EMAIL PROTECTED] 
Sent: 21 July 2006 10:25
To: MyFaces Discussion
Subject: HTMLDataTable not serializable

Hi all
I have a backing bean that has to be serializable because I do some RMI stuff 
in it. Now I am not able to use the HTMLDataTable of myfaces (t:datatable) in 
my bean, because this is not serializeable. Do you have any hints how to avoid 
this problem?

Thanks


--
Remo Liechti
Application Developer
Swisslog Warehouse and Distribution Solutions
 
Direct: +41 (0)62 837 4345
Mobile: +41 (0)76 329 8660
CH Fax: +41 (0)62 837 4197
Internet: www.swisslog.com
----------------------------------------------------------------
About Swisslog
Swisslog is a global provider of logistic solutions for warehouses, 
distribution centers and hospitals. Swisslog's solutions increase their 
customers' flexibility, responsiveness, and quality of service, while 
minimizing logistics costs. 


This message may contain legally privileged or confidential information and is 
therefore addressed to the named persons only. The recipient should inform the 
sender and delete this message, if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity and punctuality of 
this message. The sender has activated an automatic virus scanning, but does 
not guarantee the virus free transmission of this message.

Reply via email to