You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Leon Torres (JIRA)" <ji...@apache.org> on 2006/10/06 19:49:21 UTC

[jira] Created: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Let form widget treat input list as a subset of a larger list
-------------------------------------------------------------

                 Key: OFBIZ-364
                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
             Project: OFBiz (The Open for Business Project)
          Issue Type: Improvement
          Components: framework
            Reporter: Leon Torres
            Priority: Minor


Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.

Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.

As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-364?page=all ]

Jacopo Cappellato closed OFBIZ-364.
-----------------------------------

    Resolution: Fixed

David,

ok, in rev. 469408 I've implemented what you have suggested: there is now a new attribute (that can contain the ${} notation) named "override-list-size" that can be used to to the form a custom list size.
Let me know if you see any issues and I'll do my best to fix them asap.


> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>         Assigned To: Jacopo Cappellato
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-364?page=comments#action_12443021 ] 
            
Anil K Patel commented on OFBIZ-364:
------------------------------------

Leon,
I need to do similar thing in findInventoryByProduct screen in Facility. As you suggested in above patch, I did put following line in bsh.

context.put("overrideFormListSize", new Integer(iterator.currentIndex()));

what's missing is using this data in list form while displaying the data. I did not find any attribute on form tag that can take this value. row-count attribute is a good candidate!

your response to this will help me to finish patch for other issue. 

> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Reopened: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-364?page=all ]

Jacopo Cappellato reopened OFBIZ-364:
-------------------------------------

             
I'm reopening this issue after getting the following comment from David Jones:

===================================================================
That is a good point. An attribute on the form definition element would be better, and can be a constant or parameterized as needed (even if it would almost always be parameterized...). Something like the current name would be great, though we can probably leave out the "Form" since that is redundant, so we'd just have "override-list-size".

Of course, if the intent is just to get a partial list from the database and display it with the form widget there are ways of doing that without all of this manual stuff... I haven't looked at this specific scenario enough to know if all the manual stuff is really required, but in general it's nice to keep the code as simple as possible and let it take care of the pagination and getting partial results from the database using the built in stuff.

Whatever the case is, this additional flexibility of being able to put the list together manually does sound like a nice feature (I guess I just haven't run into a need for it yet).

-David 


> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>         Assigned To: Jacopo Cappellato
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Leon Torres (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-364?page=comments#action_12443038 ] 
            
Leon Torres commented on OFBIZ-364:
-----------------------------------

It's working without issues for me, although I don't know if putting a magical parameter in the context is the right way to invoke this ability.  Maybe a form widget attribute would be better?

> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>         Assigned To: Jacopo Cappellato
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Leon Torres (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-364?page=all ]

Leon Torres updated OFBIZ-364:
------------------------------

    Attachment: subset-form-list.patch

Here's a patch that implements this feature. 

To test it, get all values of an entity, say StatusItem, and set "overrideFormListSize" to the size of that list in the context.  Then pass it a subset of the list.  As an example,

iterator = delegator.findListIteratorByCondition("StatusItem", null, null, null, null,
        new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true));

viewSize = Integer.parseInt(context.get("viewSize"));
viewIndex = Integer.parseInt(context.get("viewIndex"));

// advance cursor to position of first item
iterator.relative(viewIndex * viewSize);

// process 20 rows and put in context (this will be used as input to the form widget list)
statuses = new java.util.ArrayList(viewSize);
while ((status = iterator.next()) != null) {
    statuses.add(status);
    if (statuses.size() == viewSize) break;
}
context.put("statuses", statuses);

// override the form widget list size so it knows that the input list is a subset
iterator.last();
context.put("overrideFormListSize", new Integer(iterator.currentIndex()));

iterator.close();


> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-364?page=comments#action_12444215 ] 
            
David E. Jones commented on OFBIZ-364:
--------------------------------------

Yes, this would be the idea. It is a little bit awkward to have the value in an attribute, but it does have a few key benefits like documenting the availability of the feature. Using the FlexibleStringExpander to allow a variable to be used is a good way to go. Another option would be to have the attribute point directly to a field name, something like "override-list-size-name".

> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>         Assigned To: Jacopo Cappellato
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-364?page=comments#action_12443041 ] 
            
Anil K Patel commented on OFBIZ-364:
------------------------------------

The row-count attribute on form tag seems to have no effect. May be it was intended for this Purpose.

> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>         Assigned To: Jacopo Cappellato
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-364?page=comments#action_12443020 ] 
            
Anil K Patel commented on OFBIZ-364:
------------------------------------

Leon,
I need to do similar thing in findInventoryByProduct screen in Facility. As you suggested in above patch,  I did put  following line in bsh. 

context.put("overrideFormListSize", new Integer(iterator.currentIndex())); 

what's missing is using this data in list from while displaying the data.  I did not find any attribute on from tag that can take this value. row-count attribute is a good candidate!

your response to this will help me to finish patch for other issue.



> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-364?page=comments#action_12443779 ] 
            
Jacopo Cappellato commented on OFBIZ-364:
-----------------------------------------

David,

I'd like to correct the patch I've committed following your suggestions.
If we add a new attribute called "override-list-size" to the form definition, we could have something like this:

<form name="ExampleForm" type="list" list-name="records" override-list-size="100">

In this way we will have a constant value set (not very useful, but maybe it could under some circumstances).

But if I need to pass a parametrized value, how should I do this? Maybe in this way:

<form name="ExampleForm" type="list" list-name="records" override-list-size="${manualListSize}">

and then put in the context something like this:

context.put("manualListSize", new Integer(iterator.currentIndex())); 

?

Is this that you mean? If so, I'll try to implement it (I think it is just a matter of adding the new attribute to the xsd definition and using a flexibleString to store the value).
Just one doubt about this approach: if I'm not wrong the form definition is cached into memory the first time the form is loaded from the xml file... could this make difficult to make the override-list-size a dinamic value ? (maybe not now that I think a bit more about this)
Thanks


> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>         Assigned To: Jacopo Cappellato
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-364?page=all ]

Jacopo Cappellato closed OFBIZ-364.
-----------------------------------

    Resolution: Fixed

This is now in svn with rev. 465282

I've tested it and it seems to work fine; if you'll see any problems I'll take care of reverting the commit.
Thanks Leon!

> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>         Assigned To: Jacopo Cappellato
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-364?page=comments#action_12443035 ] 
            
Jacopo Cappellato commented on OFBIZ-364:
-----------------------------------------

I'd like to review and commit this patch (since it is needed by OFBIZ-379) but before I begin I'd like to know from Leon and others if they are using it (without problems).
Is it ok?

> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by Jacopo Cappellato <ti...@sastau.it>.
Leon,

in my opinion, even if the widgets have not been designed to be used as 
a reporting tool, they are an excellent tool for simple reports.
About BI: I do agree with you that we should not even try to achieve 
these using the widgets, in fact, in my opinion the highly normalized 
OFBiz data model is also not well suited for this kind of data 
analysis... sooner or later we should consider to implement (or 
integrate) a data warehousing tool to export data (in an external 
denormalized system) and then create reports (complex ones such as cubes 
etc...) on it.
However I don't think that the applicability of OFBIZ-364 is limited to 
the reports...

Jacopo

David E Jones wrote:
> 
> Leon,
> 
> That's interesting. I wasn't thinking of reporting at all for this 
> discussion and my comments on it, just a more custom screen/form.
> 
> -David
> 
> 
> On Oct 18, 2006, at 6:49 PM, Leon Torres wrote:
> 
>> Hi David et al,
>>
>> For what it's worth, I've been developing some pretty sophisticated 
>> reports and stretching the view entity and form widget system to their 
>> limits, sometimes breaking them and having to create improvements such 
>> as this issue and the complex-alias one.  :-)
>>
>> It's been a lot of fun so far but I fear it's getting me nowhere.  I 
>> just realized even with all the recent improvements to reporting 
>> capability, there is simply no way we can adequately address the needs 
>> of Business Intelligence reporting with just the entity and form system.
>>
>> We can certainly continue making incremental improvements until we get 
>> something useful for reporting, but I think it will end up being a 
>> poor approximation to a full featured BI tool.
>>
>> Until we find a good way to plug a BI framework into OFBiz, it might 
>> be better if we have some stopgap system such as the ability to write 
>> SQL queries that get transformed into EntityEngine calls, otherwise we 
>> are trying to shove a square peg (the entity + form system) into a 
>> round hole (BI reporting).
>>
>> Just my 2 cents.
>>
>> - Leon
>>
>>
>>
>>
>> David E Jones wrote:
>>> On Oct 18, 2006, at 7:30 AM, Jacopo Cappellato (JIRA) wrote:
>>>>     [ 
>>>> http://issues.apache.org/jira/browse/OFBIZ-364?page=comments#action_12443180 
>>>> ]
>>>>
>>>> Jacopo Cappellato commented on OFBIZ-364:
>>>> -----------------------------------------
>>>>
>>>> Leon Wrote:
>>>>
>>>>> It's working without issues for me, although I don't know if 
>>>>> putting a magical parameter in the context
>>>>> is the right way to invoke this ability.  Maybe a form widget 
>>>>> attribute would be better?
>>>>
>>>> This is a good question... and I'd love to get a comment from David 
>>>> Jones about it since I'm not totally sure about the best way of 
>>>> doing this.
>>> That is a good point. An attribute on the form definition element 
>>> would be better, and can be a constant or parameterized as needed 
>>> (even if it would almost always be parameterized...). Something like 
>>> the current name would be great, though we can probably leave out the 
>>> "Form" since that is redundant, so we'd just have "override-list-size".
>>> Of course, if the intent is just to get a partial list from the 
>>> database and display it with the form widget there are ways of doing 
>>> that without all of this manual stuff... I haven't looked at this 
>>> specific scenario enough to know if all the manual stuff is really 
>>> required, but in general it's nice to keep the code as simple as 
>>> possible and let it take care of the pagination and getting partial 
>>> results from the database using the built in stuff.
>>> Whatever the case is, this additional flexibility of being able to 
>>> put the list together manually does sound like a nice feature (I 
>>> guess I just haven't run into a need for it yet).
>>> -David


Re: [jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by David E Jones <jo...@undersunconsulting.com>.
Leon,

That's interesting. I wasn't thinking of reporting at all for this  
discussion and my comments on it, just a more custom screen/form.

-David


On Oct 18, 2006, at 6:49 PM, Leon Torres wrote:

> Hi David et al,
>
> For what it's worth, I've been developing some pretty sophisticated  
> reports and stretching the view entity and form widget system to  
> their limits, sometimes breaking them and having to create  
> improvements such as this issue and the complex-alias one.  :-)
>
> It's been a lot of fun so far but I fear it's getting me nowhere.   
> I just realized even with all the recent improvements to reporting  
> capability, there is simply no way we can adequately address the  
> needs of Business Intelligence reporting with just the entity and  
> form system.
>
> We can certainly continue making incremental improvements until we  
> get something useful for reporting, but I think it will end up  
> being a poor approximation to a full featured BI tool.
>
> Until we find a good way to plug a BI framework into OFBiz, it  
> might be better if we have some stopgap system such as the ability  
> to write SQL queries that get transformed into EntityEngine calls,  
> otherwise we are trying to shove a square peg (the entity + form  
> system) into a round hole (BI reporting).
>
> Just my 2 cents.
>
> - Leon
>
>
>
>
> David E Jones wrote:
>> On Oct 18, 2006, at 7:30 AM, Jacopo Cappellato (JIRA) wrote:
>>>     [ http://issues.apache.org/jira/browse/OFBIZ-364? 
>>> page=comments#action_12443180 ]
>>>
>>> Jacopo Cappellato commented on OFBIZ-364:
>>> -----------------------------------------
>>>
>>> Leon Wrote:
>>>
>>>> It's working without issues for me, although I don't know if  
>>>> putting a magical parameter in the context
>>>> is the right way to invoke this ability.  Maybe a form widget  
>>>> attribute would be better?
>>>
>>> This is a good question... and I'd love to get a comment from  
>>> David Jones about it since I'm not totally sure about the best  
>>> way of doing this.
>> That is a good point. An attribute on the form definition element  
>> would be better, and can be a constant or parameterized as needed  
>> (even if it would almost always be parameterized...). Something  
>> like the current name would be great, though we can probably leave  
>> out the "Form" since that is redundant, so we'd just have  
>> "override-list-size".
>> Of course, if the intent is just to get a partial list from the  
>> database and display it with the form widget there are ways of  
>> doing that without all of this manual stuff... I haven't looked at  
>> this specific scenario enough to know if all the manual stuff is  
>> really required, but in general it's nice to keep the code as  
>> simple as possible and let it take care of the pagination and  
>> getting partial results from the database using the built in stuff.
>> Whatever the case is, this additional flexibility of being able to  
>> put the list together manually does sound like a nice feature (I  
>> guess I just haven't run into a need for it yet).
>> -David


Re: [jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by Leon Torres <le...@oss.minimetria.com>.
Hi David et al,

For what it's worth, I've been developing some pretty sophisticated reports and 
stretching the view entity and form widget system to their limits, sometimes 
breaking them and having to create improvements such as this issue and the 
complex-alias one.  :-)

It's been a lot of fun so far but I fear it's getting me nowhere.  I just 
realized even with all the recent improvements to reporting capability, there is 
simply no way we can adequately address the needs of Business Intelligence 
reporting with just the entity and form system.

We can certainly continue making incremental improvements until we get something 
useful for reporting, but I think it will end up being a poor approximation to a 
full featured BI tool.

Until we find a good way to plug a BI framework into OFBiz, it might be better 
if we have some stopgap system such as the ability to write SQL queries that get 
transformed into EntityEngine calls, otherwise we are trying to shove a square 
peg (the entity + form system) into a round hole (BI reporting).

Just my 2 cents.

- Leon




David E Jones wrote:
> 
> On Oct 18, 2006, at 7:30 AM, Jacopo Cappellato (JIRA) wrote:
> 
>>     [ 
>> http://issues.apache.org/jira/browse/OFBIZ-364?page=comments#action_12443180 
>> ]
>>
>> Jacopo Cappellato commented on OFBIZ-364:
>> -----------------------------------------
>>
>> Leon Wrote:
>>
>>> It's working without issues for me, although I don't know if putting 
>>> a magical parameter in the context
>>> is the right way to invoke this ability.  Maybe a form widget 
>>> attribute would be better?
>>
>> This is a good question... and I'd love to get a comment from David 
>> Jones about it since I'm not totally sure about the best way of doing 
>> this.
> 
> That is a good point. An attribute on the form definition element would 
> be better, and can be a constant or parameterized as needed (even if it 
> would almost always be parameterized...). Something like the current 
> name would be great, though we can probably leave out the "Form" since 
> that is redundant, so we'd just have "override-list-size".
> 
> Of course, if the intent is just to get a partial list from the database 
> and display it with the form widget there are ways of doing that without 
> all of this manual stuff... I haven't looked at this specific scenario 
> enough to know if all the manual stuff is really required, but in 
> general it's nice to keep the code as simple as possible and let it take 
> care of the pagination and getting partial results from the database 
> using the built in stuff.
> 
> Whatever the case is, this additional flexibility of being able to put 
> the list together manually does sound like a nice feature (I guess I 
> just haven't run into a need for it yet).
> 
> -David
> 
> 

Re: [jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by David E Jones <jo...@undersunconsulting.com>.
On Oct 18, 2006, at 7:30 AM, Jacopo Cappellato (JIRA) wrote:

>     [ http://issues.apache.org/jira/browse/OFBIZ-364? 
> page=comments#action_12443180 ]
>
> Jacopo Cappellato commented on OFBIZ-364:
> -----------------------------------------
>
> Leon Wrote:
>
>> It's working without issues for me, although I don't know if  
>> putting a magical parameter in the context
>> is the right way to invoke this ability.  Maybe a form widget  
>> attribute would be better?
>
> This is a good question... and I'd love to get a comment from David  
> Jones about it since I'm not totally sure about the best way of  
> doing this.

That is a good point. An attribute on the form definition element  
would be better, and can be a constant or parameterized as needed  
(even if it would almost always be parameterized...). Something like  
the current name would be great, though we can probably leave out the  
"Form" since that is redundant, so we'd just have "override-list-size".

Of course, if the intent is just to get a partial list from the  
database and display it with the form widget there are ways of doing  
that without all of this manual stuff... I haven't looked at this  
specific scenario enough to know if all the manual stuff is really  
required, but in general it's nice to keep the code as simple as  
possible and let it take care of the pagination and getting partial  
results from the database using the built in stuff.

Whatever the case is, this additional flexibility of being able to  
put the list together manually does sound like a nice feature (I  
guess I just haven't run into a need for it yet).

-David


[jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-364?page=comments#action_12443180 ] 
            
Jacopo Cappellato commented on OFBIZ-364:
-----------------------------------------

Leon Wrote:

> It's working without issues for me, although I don't know if putting a magical parameter in the context 
> is the right way to invoke this ability.  Maybe a form widget attribute would be better?

This is a good question... and I'd love to get a comment from David Jones about it since I'm not totally sure about the best way of doing this.

Jacopo

> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>         Assigned To: Jacopo Cappellato
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Leon Torres (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-364?page=comments#action_12443048 ] 
            
Leon Torres commented on OFBIZ-364:
-----------------------------------

I don't know how this change affects the row-count feature.  Can someone check?  I'm a little short on time to deal with this.

> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>         Assigned To: Jacopo Cappellato
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-364?page=all ]

Jacopo Cappellato reassigned OFBIZ-364:
---------------------------------------

    Assignee: Jacopo Cappellato

> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>         Assigned To: Jacopo Cappellato
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-364) Let form widget treat input list as a subset of a larger list

Posted by "Anil K Patel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-364?page=comments#action_12443023 ] 
            
Anil K Patel commented on OFBIZ-364:
------------------------------------

Sorry, it works for me. What are the chances that this patch will go in Ofbiz? 

> Let form widget treat input list as a subset of a larger list
> -------------------------------------------------------------
>
>                 Key: OFBIZ-364
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-364
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Leon Torres
>            Priority: Minor
>         Attachments: subset-form-list.patch
>
>
> Allow a programmer to specify a parameter "overrideFormListSize=1000" to make the FormWidget think the list size is 1000.
> Then, when a list of size 20 is passed in, the FormWidget treats it as a subset of the size 1000 list with its position given by viewIndex as usual.
> As an example, suppose a complex product report requires the user to process each product by hand.  There are 1000 products and the viewSize is 20.  The user gets the viewIndex of 10 from the context, so he should be processing the range (200, 219). He builds a new list containing the processed data, which is size 20.  Since this list is only 20 items, the form widget thinks the entire report is 20 lines.  There won't be pagination over the 1000 products.  So the user specifies "overrideFormListSize=1000" and now the FormWidget understands that this input list of 20 items are the items (200, 219) of a size 1000 list.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira