|
|
|
[
Permlink
| « Hide
]
Ken in nashua - 07/Jun/07 04:36 PM
Ok, instrumenting ObjectTable was not my original idea but I wanted to get your feedback about it. Where this logic should preferably go.
Overrided a column, it is a guess... if it exists in the object it gets overridden otherwise ignored.
Alejandro, can you offer any advise about this...
Currently this solution is hardcoded to "photo" and descriptor="ognl:components.thisTable.photoColumnPropertyDescriptor" Not pretty especially when the table knows nothing about whether the objects it is iterating even has UploadableMedia as any of it's properties. Can you expand on a nice solution? Ideally, it would be nice if the table was smart enough to render image or link for all UploadableMedia. The solution I attached works fine... and operates the table column just as TrailsDownload.html works. So it looks nice... I am curious about your view of the world at this juncture. Thanks Alejandro already gave you his advice. Use the block to render it. I'd suggesting closing the bug.
Sure, I am going to make one pass at abstract integration and close it for good.
Ken that is waaaayyy too much code.
I wrote a snippet for you copying the usage of the EditLink block. Take a look at the patch. That's all the code you need to change in ObjectTable.java. In ObjectTable.html you have 5 lines to do whatever you need to do to render the blob, if 5 lines of code are not enough you are going to need to create another component to hold your logic. I'm not following the blob components evolution too closely but I think you should be able to reuse the blob download component here. If you are not able to use it that means the download component could use a refactoring. BTW, I'm not a fan of rendering blobs in the object table, but as long as the user can avoid it I'm ok with adding it. Thanks Alejandro, thats what I was looking for...
Let me run with this and see what comes out of it. great.. thanks ! |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||