on 02-02-2007 6:11 AM
i have a model node
-Product (model node)
-product_id (model attribute)
-name
-price
-OriginalProduct (value node)
-product_id
-name
-price
vnFilters (value node 1..1)
-name
-TableFilter
when i try to filter it returns a "Incompatible node"
one of my friends solution is like this
Have the valuenode as data-source node for the table and let the Model Node be the original node
I think this will solve your problem.
yet , my doubt is :
Once again , thanks for the prompt reply.....
i get data from the model node ...though i bind to the table
if i create a valuenode...i cant get data from the backend....
ModelNode
ProductCommandBean
getProductid() setProductid()
getname() setname()
getprice() setprice()
Message was edited by:
yzme yzme
Message was edited by:
yzme yzme
Yes, you are right.
You need to bind the Value Node to the table, and let the Model Node be the original data source.
You have done the right thing here:
-Product (model node)
-product_id (model attribute)
-name
-price
-OriginalProduct (value node)
-product_id
-name
-price
vnFilters (value node 1..1)
-name
-TableFilter
To copy the Model Node to Value Node, do this:
WDCopyService.copySubtree((IWDNode)wdContext.nodeOriginalProduct(),(IWDNode)wdContext.nodeValueProduct());
//Concept: cast both of them to IWDNode.
Then, pass this ValueProduct Node to the filter function.
i.e.
public void onActionFilter(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionFilter(ServerEvent)
wdContext.currentContextElement().getTableFilter().filter((IWDNode)wdContext.nodeOriginalProduct(),(IWDNode)wdContext.nodeValueProduct());
//@@end
}
It works fine for me.
Quote:
if i create a valuenode...i cant get data from the backend....
Answer: As I mentioned, you still use the bind the model date to modelnode, but display with the valuenode (that get copied with WDCopyService).
For the rest of the table filter details. You can refer to this blog ( I read a few blogs on table filter, this is the most powerful one)
WDJ - A Generic Java Class for Filtering Web Dynpro Tables
<a href="/people/peter.vignet/blog/2007/01/03/generic-web-dynpro-java-table-filter:///people/peter.vignet/blog/2007/01/03/generic-web-dynpro-java-table-filter
Good luck.
Please reward points if this help.
Kent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.