-
15. Re: @SelectItems and @SelectItemsSelection annotations?
gavin.king May 23, 2006 2:04 PM (in response to cptnkirk)Probably not, unless enough people nag for it ;-)
-
16. Re: @SelectItems and @SelectItemsSelection annotations?
gavin.king May 23, 2006 2:05 PM (in response to cptnkirk)By the way, I have not quite finished the databinder stuff, I still have one more commit to do today. So sit tight....
-
17. Re: @SelectItems and @SelectItemsSelection annotations?
cptnkirk May 23, 2006 2:40 PM (in response to cptnkirk)I'm looking forward to checking out the DataBinder support this evening. Cudos for getting this in prior to Seam 1.0 GA.
Gavin do you know of any plans for a JBoss hosted component repository for Seam? I would think that as Seam the framework takes off there will be many valuable components, data binders, and the like developed by the Open Source community. The reuse of these components could save massive time world wide.
I would also recommend that Seam ship with default data binders for the two JSF model objects that ship with Java EE 5. Developers new to Seam need to learn to use the framework before developing modules for it and it makes sense to be productive with the entire JSF RI rather than just DataModel.
Actually now that I think more about it it may be a better idea that Seam ship with no data binders and that a component repository containing these data binders and more be released along with 1.0 GA. This way you can separate the core framework from all the extensions.
-Jim -
18. Re: @SelectItems and @SelectItemsSelection annotations?
pmuir May 23, 2006 2:55 PM (in response to cptnkirk)I think a component repository is a very good idea. Allow people to plug stuff into seam as they like and make changes if needed. I can immediately see that a data binder for select items and for the myfaces tree stuff.
Perhaps the wiki is a good a place? For soemthing like SelectItems it's only 4 classes. I'll put any I make up there for a start. -
19. Re: @SelectItems and @SelectItemsSelection annotations?
cptnkirk May 23, 2006 3:17 PM (in response to cptnkirk)Of course once you start talking repo you need to think about a package structure. JAR + META-INF/*.xml feels right to me but that's just knee jerk.
-Jim -
20. Re: @SelectItems and @SelectItemsSelection annotations?
gavin.king May 23, 2006 11:23 PM (in response to cptnkirk)The Wiki is the right place for this kind of stuff.
-
21. Re: @SelectItems and @SelectItemsSelection annotations?
pmuir May 24, 2006 2:45 PM (in response to cptnkirk)"gavin.king@jboss.com" wrote:
By the way, I have not quite finished the databinder stuff, I still have one more commit to do today. So sit tight....
Gavin, did you get this finished for CR3? as I'm having problems getting the DataSelector stuff to fire. If you have finished it then I'll to followup with details on where I'm stuck
Cheers
Oh, and I using a label attribute on my DataBinder meta annotation to indicate the field to use for label of the selectitem (then get its value via reflection). As the annotation isn't passed to the wrap method I've had to store it in a field (set in the getVariableName method), and then read it from the field in the wrap method. Doesn't seem ideal to me. -
22. Re: @SelectItems and @SelectItemsSelection annotations?
pmuir May 24, 2006 3:15 PM (in response to cptnkirk)Sorry. My bad. I was navigating without calling any action/property on the bean so it (obviously) wasn't injecting the Selection into the bean.
-
23. Re: @SelectItems and @SelectItemsSelection annotations?
gavin.king May 24, 2006 4:15 PM (in response to cptnkirk)Yes, it is in CR3.
-
24. Re: @SelectItems and @SelectItemsSelection annotations?
cptnkirk May 25, 2006 2:43 AM (in response to cptnkirk)Is it possible to pass the annotation into all the DataBinder and DataSelector methods? I wrap based on attributes on my annotation and will also need to select based on attributes on the annotation.
Also, does Seam provide for any built in dirty checking, or are objects wrapped and unwrapped on every request by default? -
25. Re: @SelectItems and @SelectItemsSelection annotations?
gavin.king May 25, 2006 6:22 AM (in response to cptnkirk)That is probably possible. Add a request to JIRA.
Seam calls equals() to determine if the underlying data structure has changed. We actually should let the DataBinder define the dirty checking, add that to JIRA also.... -
26. Re: @SelectItems and @SelectItemsSelection annotations?
cptnkirk May 25, 2006 3:21 PM (in response to cptnkirk)I didn't want to try and have a conversation about dirty checking within JIRA...
What are your thoughts on dirty checking? Seam could keep track of field/method access and then simply not call the DataBinder methods if there haven't been any changes since the previous wrap/unwrap invocations.
Within wrap/unwrap the DataBinder could be forced to do it's own dirty checking based on information stored in a custom wrapped object (approach currently taken).
Seam could signal the DataBinder that it has observed access to the object and that it might be dirty (via additional param on wrap/unwrap?). Then the binder could take its own action as it wishes. wrap/unwrap would be called on each request.
-Jim -
27. Re: @SelectItems and @SelectItemsSelection annotations?
gavin.king May 25, 2006 3:36 PM (in response to cptnkirk)I don't think this level is necessary or desirable.
It would be better to simply let the DataBinder decide if the thing is dirty. -
28. Re: @SelectItems and @SelectItemsSelection annotations?
gavin.king May 25, 2006 4:11 PM (in response to cptnkirk)I implemented that in CVS.
-
29. Re: @SelectItems and @SelectItemsSelection annotations?
cptnkirk May 25, 2006 5:44 PM (in response to cptnkirk)I see the CVS addition. And if isDirty() is true, Seam then doesn't call the wrap/unwrap methods?
I'd suggest that the annotation be passed through to this method as well. No telling what original information might be beneficial to DataBinder writers down the road.
For example, what if someone wanted to invalidate this object (or not) based on the state of another object? That information would need to be stored in the annotation.