On 11/10/06, Mittal Bhoigade <[EMAIL PROTECTED]> wrote:
Andy,
Some more info, I updated my html ognl property (see html).
******* page *********
<component id="transaction" type="For">
<binding name="source" value="currentTrans"/>
<binding name="element" value="literal:tr"/>
<binding name="index" value="tranIndex"/>
<binding name="class" value="beans.evenOdd.next "/>
</component>
<component id="tree" type="tacos:Tree">
<binding name="contentProvider" value="currentTrans[tranIndex].contentProvider"/>
<binding name="value" value="currentTrans[tranIndex].item"/>
<binding name="nodeLinkAjax" value="ognl:false" />
</component>
******* page *********
******* html *********
<tr class="odd" jwcid="transaction">
<td align="left">
<div class="cData" jwcid="tree" style="overflow: auto; width: auto; height: auto;">
<span jwcid="@Insert" value="ognl:currentTrans[tranIndex].item.name"/>
</div>
</td>
</tr>
******* html *********
General Info >>
1) currentTrans is collection of VO called Transaction
2) Each Transaction has member a) ITreeContentProvider b) Item
3) This is how Folder's are added to ContentProvider
public TransactionTreeContentProvider(String strParent,String strTransDetailsURL){
Folder folder = new Folder(strParent,strTransDetailsURL);
ROOTS.add(folder);
}
4) ROOTS is a List of Folder's
5) Folder extends Item
Issue I am hitting at,
1) I am able to display tree with root
2) When I click on plus sign - I get following exception.
source is null for getProperty(null, "0")
I have checked for,
1) ContentProvider is not null
2) Item is not null
3) I am able to print name property of Item in logs
Any help shall be appraciated.
Thanks
Mittal
Thanks
Mittal--On 11/10/06, Mittal Bhoigade < [EMAIL PROTECTED]> wrote:Andy
See my answer in ur message below..
additionally, Transaction has property Item,
public Item getItem() {
return item;
}
public void setItem(Item item) {
this.item = item;
}
So, If I am on right path,
- tree reads contentProvider and set's it to currentTrans[tranIndex].item
- and then I am trying to display it using
>> <span jwcid="@Insert" value="ognl: item.name"/>
Should I paste html/page/java here.....if that helps you see the problem
Thanks
MittalOn 11/10/06, andyhot <[EMAIL PROTECTED]> wrote:You have
<binding name="value" value="currentTrans[tranIndex].item"/>
So what the tree actually does is ask the contentprovider for the current
entry and store it in currentTrans[tranIndex].item
Is that what you want? Mittal >> Yes
Also, when you show each node, you do
<span jwcid="@Insert" value="ognl: item.name < http://item.name>"/>
but how is item set? The tree doesn't set it, the tree only sets
currentTrans[tranIndex].item
Mittal >> They are set from constructor of class that implements ITreeContentProvider
Mittal >> Folder folder = new Folder(strParent,strTransDetailsURL); // where parent is root
Mittal >> ROOTS.add(folder); // ROOTS is a List
Mittal >> Folder extends Item
Mittal Bhoigade wrote:
> Hey Andy
>
> What do u mean by temp prop - can u write/paste sample code on it.
>
> I was able to render single tree based on Simple Tree example and made
> the children add to parent on click on plus sign. I am surprised of
> error too....
>
> any pointers shall be of g8 help
>
> Thanks
> Mittal
>
> On 11/9/06, *andyhot* <[EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>>
> wrote:
>
> Mittal Bhoigade wrote:
> > alrite need to give some more details, assumming u r reading from
> > bottom up
> >
> > 1) There is VO called Transaction - which are added to collection -
> > and collection is returned via getCurrentTrans
> > 2) Transaction VO has member of type ITreeContentProvider - i.e each
> > Transaction (row in a html view) has a tree
> > 3) I am able to display roots exception below is generated when plus
> > sign is clicked
> > >> what gets invoked when plus sign is clicked - I thought
> it was
> > getChildren on Folder
>
> Well, the only slightly weird thing i see is the value binding of your
> tree...
> I'd bind it to a temp property
>
> But i don't think this is the cause of your problems...
>
> Have you tried making a single tree work before adding that For loop?
> Did it work?
> >
> > Thanks
> > Mittal
> >
> >
> > On 11/9/06, *andyhot* < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> <mailto: [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED] >>>
> > wrote:
> >
> > Mittal Bhoigade wrote:
> > > intially tree is rendered with root and plus sign but when I
> > click on
> > > plus sign of tree
> > > I am getting exception source is null - "source is null for
> > > getProperty(null, "0")"
> >
> > You have to find out which line provokes this... It looks
> like an
> > array
> > access...
> > as if when executing currentTrans[tranIndex]
> >
> > Also, do you need the for component? Why don't you use its value
> > parameter?
> > How is getCurrentTrans() implemented?
> >
> > > I checked for treeContentProvider implementation - its getting
> > filled in..
> > > any idea's - I can send you more details if required
> > >
> > > // reads collection
> > >
> > > <component id="transaction" type="For">
> > > <binding name="source" value="currentTrans"/>
> > > <binding name="element" value="literal:tr"/>
> > > <binding name="index" value="tranIndex"/>
> > > <binding name="class" value="beans.evenOdd.next"/>
> > > </component>
> > >
> > > // reads contentprovider from collection
> > >
> > > <component id="tree" type="tacos:Tree">
> > > <binding name="contentProvider"
> > > value="currentTrans[tranIndex].contentProvider"/>
> > > <binding name="value"
> value="currentTrans[tranIndex].item"/>
> > > <binding name="nodeLinkAjax" value="ognl:false" />
> > > </component>
> > >
> > >
> > > // html
> > > <div jwcid="tree" style="overflow: auto; width: auto; height:
> > > auto;"><span jwcid="@Insert" value="ognl: item.name
> < http://item.name>
> > < http://item.name>
> > > < http://item.name>"/></div>
> > >
> > > --
> > > Regards
> > > Mittal Bhiogade
> > >
> >
> ------------------------------------------------------------------------
> > >
> > >
> >
> -------------------------------------------------------------------------
>
> > > Using Tomcat but need to do more? Need to support web
> services,
> > security?
> > > Get stuff done quickly with pre-integrated technology to make
> > your job easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on
> > Apache Geronimo
> > >
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >
> >
> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> < http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>>
> > >
> >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Tacos-devel mailing list
> > > Tacos-devel@lists.sourceforge.net
> <mailto:Tacos-devel@lists.sourceforge.net >
> > <mailto: Tacos-devel@lists.sourceforge.net
> <mailto:Tacos-devel@lists.sourceforge.net >>
> > > https://lists.sourceforge.net/lists/listinfo/tacos-devel
> > < https://lists.sourceforge.net/lists/listinfo/tacos-devel
> < https://lists.sourceforge.net/lists/listinfo/tacos-devel>>
> > >
> >
> >
> > --
> > Andreas Andreou - [EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]> <mailto: [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> -
> > http://andyhot.di.uoa.gr
> > Tapestry / Tacos developer
> > Open Source / J2EE Consulting
> >
> >
> >
> -------------------------------------------------------------------------
>
> > Using Tomcat but need to do more? Need to support web services,
> > security?
> > Get stuff done quickly with pre-integrated technology to
> make your
> > job easier
> > Download IBM WebSphere Application Server v.1.0.1 based on
> Apache
> > Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >
> >
> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> < http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>>
> > _______________________________________________
> > Tacos-devel mailing list
> > Tacos-devel@lists.sourceforge.net
> <mailto: Tacos-devel@lists.sourceforge.net>
> > <mailto: Tacos-devel@lists.sourceforge.net
> <mailto: Tacos-devel@lists.sourceforge.net>>
> > https://lists.sourceforge.net/lists/listinfo/tacos-devel
> >
> >
> >
> >
> > --
> > Regards
> > Mittal Bhiogade
> >
> ------------------------------------------------------------------------
> >
> >
> -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services,
> security?
> > Get stuff done quickly with pre-integrated technology to make
> your job easier
> > Download IBM WebSphere Application Server v.1.0.1 based on
> Apache Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Tacos-devel mailing list
> > Tacos-devel@lists.sourceforge.net
> <mailto: Tacos-devel@lists.sourceforge.net>
> > https://lists.sourceforge.net/lists/listinfo/tacos-devel
> < https://lists.sourceforge.net/lists/listinfo/tacos-devel >
> >
>
>
> --
> Andreas Andreou - [EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]> -
> http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >
> _______________________________________________
> Tacos-devel mailing list
> Tacos-devel@lists.sourceforge.net
> <mailto: Tacos-devel@lists.sourceforge.net >
> https://lists.sourceforge.net/lists/listinfo/tacos-devel
>
>
>
>
> --
> Regards
> Mittal Bhiogade
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tacos-devel mailing list
> Tacos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tacos-devel
>
--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tacos-devel mailing list
Tacos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tacos-devel
--
Regards
Mittal Bhiogade
Regards
Mittal Bhiogade
--
Regards
Mittal Bhiogade
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Tacos-devel mailing list Tacos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tacos-devel