OK, I've got it all  figured out.  It sure is hard to be a tapestry
neophyte, tacos neophyte, and javascript neophyte all at the same
time.  I feel like I felt in my first programming class in college,
when I knew absolutely nothing and everything was a struggle.  I'll
get there, though.

--sam


On 5/4/06, Sam Gendler <[EMAIL PROTECTED]> wrote:
I am completely stumped now.  The page loads without any errors.  All
the relevant lines of code appear to execute, according to dojo.debug,
but nothing ever appears in my page any longer.  Needless to say, the
version that didn't use dojo.widget.createWidget() had no such
problems.  All code is identical, except that I am using
dojo.widget.createWidget() instead of a <div dojoType="..."
...></div>, but the set of parameters is absolutely identical, as is
all surrounding javascript.  So why should one result in an invisible
widget and the result in a visible one?  What am I missing?

--sam


On 5/4/06, Sam Gendler <[EMAIL PROTECTED]> wrote:
> Can I just say, out of sheer frustration, that there has never been an
> open source project more in need of documentation than dojo - and I
> was an early Zope user, so I know of what I speak.  It is intended to
> be something like a libc for javaascript, but can anyone imagine
> writing a c program without 'man'?
>
> What a nightmare.  I am getting awfully sick of fighting with dojo in
> order to get even the smallest thing done.  The only thing that is
> easy is to copy the examples in the nightly tests.  Without those, I
> never would have got started at all.
>
> --sam
>
>
> On 5/4/06, Sam Gendler <[EMAIL PROTECTED]> wrote:
> > On 5/4/06, Sam Gendler <[EMAIL PROTECTED]> wrote:
> > > OK, guys.  Thanks.  That helped.  Although I still can't get it to
> > > work, I am on to a new bug.  I think I am just minutes away.
> > >
> > > --sam
> > >
> > >
> > > On 5/4/06, Pedro Viegas <[EMAIL PROTECTED]> wrote:
> > > > Close call Jesse... nearly bumped our heads sending our emails through 
the
> > > > mailing list channel there! :-D
> > > >
> > > >
> > > > On 5/4/06, Jesse Kuhnert < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > The last argument to createWidget needs to be an actual node. (I 
think) Ie
> > > > dojo.byId("testdiv") )
> > > > >
> > > > >
> > > > >
> > > > > On 5/4/06, Sam Gendler < [EMAIL PROTECTED]> wrote:
> > > > > > Home come this works:
> > > > > >
> > > > > > <div dojoType="ReportGrid" widgetId="testDiv" maxRows="20"
> > > > > > enableMultipleSelect="true"
> > > > rowAlternateClass="alternateRow"
> > > > > > headClass="fixedHeader" tfootClass="fixedFooter"
> > > > > > containerClass="tableContainer"
> > > > headerSortUpClass="headerSortUp"
> > > > > > headerSortDownClass="headerSortDown"
> > > > id="repGrid"></div>
> > > > > >
> > > > > > But this does not:
> > > > > >
> > > > > > dojo.widget.createWidget("ReportGrid", {
> > > > > > headClass:"fixedHeader",
> > > > > > headerSortUpClass:"headerSortUp",
> > > > > > tfootClass:"fixedFooter",
> > > > > > maxRows:20,
> > > > > > headerSortDownClass:"headerSortDown",
> > > > > > containerClass:"tableContainer",
> > > > > > rowAlternateClass:"alternateRow",
> > > > > > id:"repGrid",
> > > > > > enableMultipleSelect:true
> > > > > > }, "testDiv");
> > > > > >
> > > > > >
> > > > > > What is it that I don't know about createWidget() that is causing my
> > > > > > call to fail?  They seem identical to me, but I always get an error 
"p
> > > > > > has no properties" dojo.js line 1304 (uncompressed version).  The 
line
> > > > > > in question has nothing resemblling a variable called 'p'
> > > > > >
> > > > > > --sam
> > > > > >
> > > > > >
> > > > > > On 5/4/06, Sam Gendler < [EMAIL PROTECTED] > wrote:
> > > > > > > I've solved the informalParameter thing by just passing the
> > > > > > > renderInformalParameter method an IMarkupWriter which populates a 
Map
> > > > > > > when the attribute() method is called.  Then I retrieve the Map 
and do
> > > > > > > with it what I want.
> > > > > > >
> > > > > > > --sam
> > > > > > >
> > > > > > >
> > > > > > > On 5/4/06, Sam Gendler <[EMAIL PROTECTED] > wrote:
> > > > > > > > I'm not using SortableTable.  I am using ReportGrid, which 
someone
> > > > > > > > attached to a bug in dojo.  We then modified the heck out of 
it, but
> > > > > > > > it is much more functional (and faster) than SortableTable.  It
> > > > > > > > formats numbers and dates using java standard format strings 
that
> > > > can
> > > > > > > > be specified as a parameter (hence, localized), which means that
> > > > even
> > > > > > > > though a number is decorated with currency symbols and thousands
> > > > > > > > separators, it is still sorted and compared as a number.  It 
also
> > > > has
> > > > > > > > a footer which can be used to store column totals.  It has the
> > > > ability
> > > > > > > > to display the data broken up over multiple pages (all rendered 
in
> > > > the
> > > > > > > > client, of course), and it has a filter which allows you to 
specify
> > > > > > > > criteria which limit which rows are actuallt displayed.  It is 
very
> > > > > > > > functional, much more so than I have seen of SortableTable.  
I'll
> > > > > > > > stick a simple demo up somewhere in a few minutes and you can 
check
> > > > it
> > > > > > > > out.
> > > > > > > >
> > > > > > > > I am in GMT-8 timezone, although I am frequently in GMT+3, too, 
and
> > > > my
> > > > > > > > team is in GMT+3, so I tend to be around at pretty much all 
hours.
> > > > > > > >
> > > > > > > > --sam
> > > > > > > >
> > > > > > > >
> > > > > > > > On 5/4/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > > > > > > > > Oh cool you're using the SortableTable!
> > > > > > > > >
> > > > > > > > > For javascript + using .script files you shouldn't need to 
worry
> > > > about when
> > > > > > > > > / where to put it. Tacos captures the script output and makes 
sure
> > > > it only
> > > > > > > > > gets invoked when it's "safe" from the documents perspective.
> > > > > > > > >
> > > > > > > > > You'll notice that almost all of the tacos components pass in 
an
> > > > "ajax"
> > > > > > > > > parameter to the .script files. (This is retrieved by inject
> > > > AjaxWebRequest
> > > > > > > > > and calling isValidRequest()) . This value is then used to
> > > > determine whether
> > > > > > > > > the widget should be created (or have values set if already
> > > > exists) as soon
> > > > > > > > > as it's evaluated (for ajax requests) , or by wrapping it in a
> > > > > > > > > dojo.event.connect(window, "onload" (for normal requests).
> > > > > > > > >
> > > > > > > > > The inherited parameters and such you shouldn't have to worry
> > > > about. The
> > > > > > > > > only properties you need to pass into the SortableTable are 
the
> > > > specific
> > > > > > > > > widget properties (like enablemultiselect, etc..) . The 
author of
> > > > > > > > > SortableTable has a style of coding that will ensure all of 
your
> > > > other
> > > > > > > > > attributes are kept in place and inherited in the widget for 
you
> > > > from the
> > > > > > > > > dom node. (which is almost exactly the way that Tapestry does 
it )
> > > > > > > > >
> > > > > > > > > I'm currently in the middle of a few things right now but can 
sync
> > > > up with
> > > > > > > > > you later. (what timezone are you in ? )
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On 5/4/06, Sam Gendler < [EMAIL PROTECTED]> wrote:
> > > > > > > > > >
> > > > > > > > > OK, I've simplified the problem a bit.  I can leave the table 
data
> > > > the
> > > > > > > > > way it, for now.  I just need to replace the following code:
> > > > > > > > >
> > > > > > > > >         writeScript(cycle, pageRenderSupport);
> > > > > > > > >
> > > > > > > > >         writer.begin("div");
> > > > > > > > >         writer.attribute("dojoType", "ReportGrid");
> > > > > > > > >         writer.attribute("widgetId", getWidgetId());
> > > > > > > > >         if (getPageSize()!=null) {
> > > > > > > > >             writer.attribute("maxRows", getPageSize());
> > > > > > > > >         }
> > > > > > > > >
> > > > > > > > >         writer.attribute ("enableMultipleSelect",
> > > > isEnableMultipleSelect());
> > > > > > > > >         if (getRowAlternateClass()!=null) {
> > > > > > > > >            writer.attribute("rowAlternateClass",
> > > > getRowAlternateClass());
> > > > > > > > >         }
> > > > > > > > >         if (getBodyClass()!=null) {
> > > > > > > > >             writer.attribute("tbodyClass", getBodyClass());
> > > > > > > > >         }
> > > > > > > > >         if (getHeaderClass()!=null) {
> > > > > > > > >             writer.attribute("headClass", getHeaderClass());
> > > > > > > > >         }
> > > > > > > > >         if (getFooterClass()!=null) {
> > > > > > > > >             writer.attribute ("tfootClass", getFooterClass());
> > > > > > > > >         }
> > > > > > > > >         if (getContainerClass()!=null) {
> > > > > > > > >             writer.attribute("containerClass",
> > > > getContainerClass());
> > > > > > > > >         }
> > > > > > > > >         if (getHeaderSortUpClass()!=null) {
> > > > > > > > >             writer.attribute ("headerSortUpClass",
> > > > getHeaderSortUpClass());
> > > > > > > > >         }
> > > > > > > > >         if (getHeaderSortDownClass()!=null) {
> > > > > > > > >             writer.attribute("headerSortDownClass",
> > > > > > > > > getHeaderSortDownClass());
> > > > > > > > >         }
> > > > > > > > >         renderInformalParameters(writer, cycle);
> > > > > > > > >         writer.end ();
> > > > > > > > >
> > > > > > > > > with this:
> > > > > > > > >
> > > > > > > > >  writeScript(cycle, pageRenderSupport);
> > > > > > > > >
> > > > > > > > > and then have the script itself call dojo.widget.createWidget 
()
> > > > with
> > > > > > > > >  the various parameters.  Obviously, the explicit parameters 
are
> > > > easy
> > > > > > > > > enough, but I don't know how to get at the informal 
parameters, of
> > > > > > > > > which there are many that are useful.
> > > > > > > > >
> > > > > > > > > --sam
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On 5/4/06, Sam Gendler < [EMAIL PROTECTED]> wrote:
> > > > > > > > > > OK, I need some help.  I am a little confused about too many
> > > > things.
> > > > > > > > > > Could someone with some tacos component dev experience get 
in
> > > > touch
> > > > > > > > > > with me offline and I'll share the ReportGrid component as 
it
> > > > exists
> > > > > > > > > > in my current app, and then work with me to move it over to
> > > > tacos.
> > > > > > > > > > Once I've done that one (which is by far the most complex), 
the
> > > > rest
> > > > > > > > > > will be easy.
> > > > > > > > > >
> > > > > > > > > > Some questions already raised -
> > > > > > > > > >
> > > > > > > > > > 1. In the current code, which just renders a div with a 
dojoType
> > > > into
> > > > > > > > > > the html, the code passes a bunch of informal parameters 
through
> > > > to
> > > > > > > > > > the div.  How can I collect those informal parameters and 
pass
> > > > them to
> > > > > > > > > > my .script file instead, so that I can pass them to
> > > > > > > > > > dojo.widget.createWidget()?
> > > > > > > > > >
> > > > > > > > > > 2. The widget currently spews a fair amount of javascript 
into
> > > > the
> > > > > > > > > > body of the document straight from the .java file, within a
> > > > <script>
> > > > > > > > > > tag.  This is the code that walks the table model, 
constructing
> > > > a data
> > > > > > > > > > structure which is rendered by the table.  I don't see that 
a
> > > > .script
> > > > > > > > > > file really offers enough control to do the task.  My 
options
> > > > are to
> > > > > > > > > > leave it as it is, or to render the data as a string and 
pass
> > > > the
> > > > > > > > > > string to the .script file.  Since the guy who actually 
wrote
> > > > this
> > > > > > > > > > code is on vacation for the week, I am about stumped about 
how
> > > > to do
> > > > > > > > > > either, effectively.
> > > > > > > > > >
> > > > > > > > > > My AIM id is 'ideasculptor'  Perhaps someone could just 
walk me
> > > > > > > > > > through the process over AIM?
> > > > > > > > > >
> > > > > > > > > > --sam
> > > > > > > > > >
> > > > > > > > > > On 5/4/06, Sam Gendler < [EMAIL PROTECTED]> wrote:
> > > > > > > > > > > Should I add my dojo widgets to the src/js/dtacos package 
or
> > > > create a
> > > > > > > > > > > different package?
> > > > > > > > > > >
> > > > > > > > > > > --sam
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On 5/4/06, Sam Gendler < [EMAIL PROTECTED]> wrote:
> > > > > > > > > > > > On 5/4/06, Jesse Kuhnert < [EMAIL PROTECTED]> wrote:
> > > > > > > > > > > > >
> > > > http://tacoscomponents.jot.com/BuildingTacos
> > > > > > > > > > > > >
> > > > > > > > >  > > > > Don't forget to run "ant fetch-libs" first.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > I can't forget to do so, because there is no mention of 
it
> > > > anywhere on
> > > > > > > > > > > > the tacos site ;-)  Perhaps an error message suggesting 
that
> > > > target
> > > > > > > > > > > > when it fails to find the lib directory would be in 
order?
> > > > > > > > > > > >
> > > > > > > > > > > > How can I get write access to the wiki, so I can add 
steps
> > > > to the
> > > > > > > > > > > > build instructions, which currently only cover building 
dojo
> > > > for
> > > > > > > > > > > > tacos?
> > > > > > > > > > > >
> > > > > > > > > > > > --sam
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > -------------------------------------------------------
> > > > > > > > > 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?cmdlnk&kid0709&bid&3057&dat1642
> > > > > > > > > _______________________________________________
> > > > > > > > > Tacos-devel mailing list
> > > > > > > > > [email protected]
> > > > > > > > >
> > > > https://lists.sourceforge.net/lists/listinfo/tacos-devel
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Jesse Kuhnert
> > > > > > > > > Tacos/Tapestry, team member/developer
> > > > > > > > >
> > > > > > > > > Open source based consulting work centered around
> > > > > > > > > dojo/tapestry/tacos/hivemind.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > -------------------------------------------------------
> > > > > > 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?cmdlnk&kid0709&bid&3057&dat1642
> > > > > > _______________________________________________
> > > > > > Tacos-devel mailing list
> > > > > > [email protected]
> > > > > >
> > > > https://lists.sourceforge.net/lists/listinfo/tacos-devel
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > Jesse Kuhnert
> > > > > Tacos/Tapestry, team member/developer
> > > > >
> > > > > Open source based consulting work centered around
> > > > dojo/tapestry/tacos/hivemind.
> > > >
> > > >
> > > >
> > > > --
> > > > Pedro Viegas
> > >
> >
>



-------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to