View Full Version : Suggestion for documentation
erlando
29 Dec 2007, 12:05 PM
Hi,
I've spent my day "happily" banging my head against getting a form to load via the load-method which is supposed to make it easier to load form-data via json.
Having already banged my head against a missing "success"-field in an earlier json-issue (why on earth this requirement is not PROMINENTLY displayed in the api docs is beyond comprehension) I knew this was not the issue. The request and reply was fine..
Or so I thought. It has taken quite a bit of forum digging to come up with that little gem of information that is "the form data is required to be placed in a field named 'data'".
Again.. This requirement along with the "success-field" requirement absolutely HAS to be written in the api docs. I can imagine that a lot of users new to Ext have these same problems. It would save hours and hours of frustration and resulting resentment towards Ext if simple things like these was easy to find and didn't require extensive forum digging.
On another note: Is it intentional that the forum search function cannot process three letter words? So a search for "bug" fails?
antimatter15
30 Dec 2007, 12:41 PM
that's why you use the google extjs forum search:D
http://www.google.com/coop/cse?cx=014137861241390232302:nr-hhoqhk2g
Animal
31 Dec 2007, 1:22 AM
Hi,
I've spent my day "happily" banging my head against getting a form to load via the load-method which is supposed to make it easier to load form-data via json.
Having already banged my head against a missing "success"-field in an earlier json-issue (why on earth this requirement is not PROMINENTLY displayed in the api docs is beyond comprehension) I knew this was not the issue. The request and reply was fine..
Or so I thought. It has taken quite a bit of forum digging to come up with that little gem of information that is "the form data is required to be placed in a field named 'data'".
Again.. This requirement along with the "success-field" requirement absolutely HAS to be written in the api docs. I can imagine that a lot of users new to Ext have these same problems. It would save hours and hours of frustration and resulting resentment towards Ext if simple things like these was easy to find and didn't require extensive forum digging.
On another note: Is it intentional that the forum search function cannot process three letter words? So a search for "bug" fails?
I don't know what api docs you read, but here is what Action.Load has:
A response packet must contain a boolean success property, and a data property. The data property contains the values of Fields to load. The individual value object for each Field is passed to the Field's setValue method.
Plus a nice example:
{
success: true,
data: {
clientName: "Fred. Olsen Lines",
portOfLoading: "FXT",
portOfDischarge: "OSL"
}
}
What were you saying?
Davepar
1 Jan 2008, 1:02 PM
erlando,
A thousand thanks. I banged my head against this for half an hour. I read the docs for "Action" a dozen times but didn't notice there was an "Action:Load".
I would also suggest making a form example that actually works. All of the examples at http://extjs.com/deploy/dev/examples/form/dynamic.html don't do anything with the Save button. Even having just a commented out chunk of code would be a huge improvement if you don't want to deal with the JSON requests on extjs.com:
buttons: [{
text: 'Save'
// handler: function(){
// simple.getForm().submit();
// }
},{
text: 'Cancel'
}]
Dave
Roger BORDEAUX
3 Jan 2008, 3:15 AM
What I am experiencing is a lack of examples.
Ext JS seems great if you look at the demo examples but these are not present for all the ext features.
After reading presentations, diving in the examples, searching in the forum, asking questions on it, I spent hours to try and try solutions for my needs. Back to the documentation thinking I missed something again and again. But with finally no success, this is a bit discouraging.
The API documentation is easy to search, but this is not enough. The learning path will be greatly improved if for each Ext feature a working example will be provide.
Best regards
Roger
geezman
3 Jan 2008, 10:51 AM
I would love a working example of a simple grid, with pagination and maybe a search field.
Data pulled from a SQL database, using PHP.
There is a user contributed .zip that does this and a whole lot more but a lot of extras in it which just lead to confusion and some things need tweaking within it.
So starting with that and going backwards is not very easy.
If there were an example of this simple approach, moving forward and adding to it would be a much easier process then starting from scratch.
brian.moeskau
3 Jan 2008, 12:31 PM
There is a user contributed .zip that does this and a whole lot more but a lot of extras in it which just lead to confusion and some things need tweaking within it.
So starting with that and going backwards is not very easy.
Perfect illustration of why any examples we make will never be enough or meet everyone's needs. We could have hundreds, and people would still be missing the exact one they need.
geezman
3 Jan 2008, 12:34 PM
Of course and I agree. Nothing will ever be enough but moving your grid examples 1 more step from the data being in an array within the package, have it come from a MySQL DB example.
Maybe I'm just to busy right now to sit down for how many hours and get that part figured out.
RWaters
3 Jan 2008, 2:17 PM
Geezman, it just so happens that I wrote a _very_ simple grid example for The Ajax Experience presentation in October. There is a JSON grid with paging, no search, but at least it is a start. PHP, Javascript, and mysql tables are provided.
I would warn that the PHP code is certainly not production ready, but should serve well as a simple example.
http://www.rich-waters.com/blog/2007/11/ext-tae-boston-examples-and-slides.html
geezman
3 Jan 2008, 2:32 PM
Hey Rich thanks - I'm going to dig into it now.
Thanks again.
geezman
3 Jan 2008, 2:55 PM
Rich , This requires PHP 5?
Can not run on PHP 4?
I have PHP 5 on my localhost. The data is not coming into the grid. Curious if its due to the json issue.
tryanDLS
3 Jan 2008, 3:05 PM
@geezman - Please take the discussion of that example to the specific thread or start a new one if necessary.
Roger BORDEAUX
3 Jan 2008, 11:39 PM
Perfect illustration of why any examples we make will never be enough or meet everyone's needs. We could have hundreds, and people would still be missing the exact one they need.
I agree with you, but there is a difference between ANY and NO examples. Just try to search for AbsoluteLayout on the whole website, you cannot find ONE example to figure how to use it.
Best regards
Roger
geezman
4 Jan 2008, 7:29 AM
I'm almost having to give up as this is not my #1 language and do not have time to take baby steps right now figuring out step #1.
Seems nobody can offer simple examples which I'm sure have already been created by experienced programmers of Ext.
Can not even get any bites on a paid simple project.
RWaters
4 Jan 2008, 9:43 AM
Rich , This requires PHP 5?
Can not run on PHP 4?
I have PHP 5 on my localhost. The data is not coming into the grid. Curious if its due to the json issue.
There's a sticky thread related to the PHP 4 JSON issue here: http://extjs.com/forum/showthread.php?t=2362
iamleppert
5 Jan 2008, 3:47 AM
I would agree on the examples issue. If you look in the PHP manual or even MSDN you can see for every function, every object property, method, event they have a code snippet showing, if nothing else, how to get the syntax right. It doesn't have to be a full on demo, just a little snippet.
This is much improved in ext 2.0 docs where you will find more often a useful snippet, but many entire API pages are devoid of even a single code example, however small.
Also, the ability to comment on nodes similar to PHP would be invaluable as well. I don't know how many times the answer to my question was in the first few comments.
Other than that the ability to do a full text search. Maybe I'm missing it, but I am finding myself going to google when I can't locate something in the manual because it isn't in the TOC.
Maybe it's just me, but I'm also finding using IE7 the API docs sometime stalll on the loading screen and seems to work much better in Firefox.
iLiketoGrid
13 Mar 2008, 8:04 PM
I would love a working example of a simple grid, with pagination and maybe a search field.
Data pulled from a SQL database, using PHP.
There is a user contributed .zip that does this and a whole lot more but a lot of extras in it which just lead to confusion and some things need tweaking within it.
So starting with that and going backwards is not very easy.
If there were an example of this simple approach, moving forward and adding to it would be a much easier process then starting from scratch.
I definitely agree with this. A simple example grid with pagination and maybe a search so that the new users can start learn how this ext's working.
mystix
13 Mar 2008, 8:49 PM
I definitely agree with this. A simple example grid with pagination and maybe a search so that the new users can start learn how this ext's working.
grid examples galore.
http://extjs.com/forum/showthread.php?t=18435
the forum search (in my signature) is your friend.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.