thanks, Mittal.

--sam


On 12/11/06, Mittal Bhoigade <[EMAIL PROTECTED]> wrote:
> well I guess you are correct, initially I put sample code in mailing list -
> and reduced its content to keep e-mail short including only main details.
> But since now this example is on wiki - I shall put all source code on wiki
> - check wiki after few hrs...
>
> Let me know if any one has questions.
>
> Thanks
> Mittal
>
>
> On 12/11/06, Gernot Stocker <[EMAIL PROTECTED] > wrote:
> > Hmm,
> > I think a "complete example" should look slightly different, if it
> shouldn't confuse. I tried
> > to have a quick look at the example,  and I'm missing some important
> information:
> >
> > * How does the Transaction look like (transId, transType, details, item)?
> > * What is the ROOTS object about?
> > * How does a typical Item and Folder implementation look like?
> >
> > Please don't get me wrong but if I see "complete example", as a beginner I
> would try to cook
> > the recipe again, and would get stuck immediately when having  to read all
> the internal fields
> > out of the ognl String.
> >
> > Sorry,
> >   Gernot
> >
> >
> > On Sunday 10 December 2006 10:36 pm, Sam Gendler wrote:
> > > This strikes me as the kind of thing that should go in the wiki
> > >
> > > --sam
> > >
> > >
> > > On 12/7/06, Mittal Bhoigade < [EMAIL PROTECTED]> wrote:
> > > > // This is complete example of tacos tree with lazy loading of
> childrens in
> > > > non-ajax/traditional mode
> > > > // This example shows use case of, user displayed with multiple rows
> of
> > > > data, each of those rows has
> > > > // a tree component and details for individual tree's are fetched
> lazily.
> > > >
> > > >
> > > > Page definitions
> > > > <property name="treeState" persist="client" initial-value="ognl:new
> > > > java.util.HashSet()"/>
> > > >
> > > > <component id="tree" type="tacos:Tree">
> > > >     <binding name="contentProvider" value="new
> > > >
> com.abc.xyz.pages.TransactionTreeContentProvider(currentTrans[tranIndex].transId,currentTrans[tranIndex].transType,currentTrans[tranIndex].details)"/>
> > > >     <binding name="value" value="item"/>
> > > >     <binding name="keyProvider" value="keyProvider"/>
> > > >     <binding name="state" value="treeState"/>
> > > >     <binding name="nodeLinkAjax" value="ognl:false" />
> > > > </component>
> > > >
> > > > // currentTrans is an arrayList of VO's called Transactions
> > > > // currentTrans is present in ASO
> > > >
> > > >
> > > > // this is implementation of ITreeContentProvider
> > > > // creates trees with foll. data
> > > > // TransId - unique id for each transaction
> > > > // strParent - parent to be displayed
> > > > // strTransDetailsURL - some details that shall fetch children for
> that
> > > > parent
> > > > public TransactionTreeContentProvider(int
> TransId,String
> > > > strParent,String strTransDetailsURL){
> > > >      Folder folder = new
> > > > Folder(TransId,strParent,strTransDetailsURL);
> > > >      ROOTS.add(folder);
> > > >  }
> > > >
> > > >
> > > > // this method shall get invoked when user clicks on plus sign
> > > > // so write logic to fetch children
> > > > public Collection getChildren(Object parentElement) {
> > > >     if (parentElement instanceof Folder) {
> > > >         Folder folder = (Folder)parentElement;
> > > >         String strDetails = folder .getDetailsurl();
> > > >         if(folder.getItems ().isEmpty() && strDetails!=null){
> > > >
> > > >         // some logic here
> > > >             folder.item("From:");
> > > >             folder.item("To:");
> > > >             folder.item("Total Amount:");
> > > >         }
> > > >         else{
> > > >             folder.item("There are no details for selected
> Transaction.");
> > > >         }
> > > >         List l = new ArrayList();
> > > >         l.addAll(folder.getFolders());
> > > >         l.addAll(folder.getItems());
> > > >          return l;
> > > >     }
> > > >     return Collections.EMPTY_LIST;
> > > > }
> > > >
> > > > // we need this to identify which plus sign was clicked by User
> > > >
> > > > public class TransactionKeyProvider implements IKeyProvider {
> > > >       public final static TransactionKeyProvider INSTANCE = new
> > > > TransactionKeyProvider();
> > > >
> > > >       public Serializable getKey(Object value)
> > > >       {
> > > >         Item a =(Item)value;
> > > >         int intKey = a.getKeyId();
> > > >             return intKey;
> > > >       }
> > > > }
> > > >
> > > > // Item and Folder implementation shall be custom - so I am copying it
> over
> > > > - I shall put the
> > > > // same if it's required by any one.
> > > >
> > > >
> > > > html code
> > > >
> > > > <tr class="odd" jwcid="transaction">  --> this is for loop definition
> for
> > > > currentTrans
> > > >       <td align="left">
> > > >     <div id="tree" class="cData" jwcid="tree" style="overflow: auto;
> width:
> > > > auto; height: auto;">
> > > >             <span class="cData" jwcid="@Insert" value="ognl:
> item.name"/>
> > > >     </div>
> > > >       </td>
> > > >       <td valign="top"><span class="cdata" jwcid="amt"></span></td>
> -->
> > > > some other columns data
> > > >       <td valign="top"><span class="cData"
> jwcid="effDate"></span></td>  -->
> > > > some other columns data
> > > >       <td valign="top"><span class="cData"
> jwcid="rcvDate"></span></td>  -->
> > > > some other columns data
> > > > </tr>
> > > >
> > > > Hope this helps.
> > > >
> > > > Thanks
> > > > Mittal
> > > >
> > > >
> -------------------------------------------------------------------------
> > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
> > > > opinions on IT & business topics through brief surveys - and earn cash
> > > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > >
> > > > _______________________________________________
> > > > Tacos-devel mailing list
> > > > Tacos-devel@lists.sourceforge.net
> > > >
> https://lists.sourceforge.net/lists/listinfo/tacos-devel
> > > >
> > > >
> > > >
> > >
> > >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > > opinions on IT & business topics through brief surveys - and earn cash
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > _______________________________________________
> > > Tacos-devel mailing list
> > > Tacos-devel@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/tacos-devel
> > >
> >
> > --
> > Gernot Stocker,
> > Institute for Genomics and Bioinformatics(IGB)
> > Petersgasse 14, 8010 Graz, Austria
> > Tel.: ++43 316 873 5345
> > http://genome.tugraz.at
> >
> >
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > _______________________________________________
> > Tacos-devel mailing list
> > Tacos-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/tacos-devel
> >
> >
> >
> >
>
>
>
> --
> Regards
> Mittal Bhiogade
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Tacos-devel mailing list
> Tacos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tacos-devel
>
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Tacos-devel mailing list
Tacos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to