You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "a.elansari@prefamaroc.com (JIRA)" <ji...@apache.org> on 2010/04/14 12:07:50 UTC

[jira] Updated: (OFBIZ-3698) Browse sub-categories exception

     [ https://issues.apache.org/jira/browse/OFBIZ-3698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

a.elansari@prefamaroc.com updated OFBIZ-3698:
---------------------------------------------

    Attachment: patch

> Browse sub-categories exception
> -------------------------------
>
>                 Key: OFBIZ-3698
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3698
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: SVN trunk
>            Reporter: a.elansari@prefamaroc.com
>             Fix For: SVN trunk
>
>         Attachments: patch
>
>
> When browsing sub categories (for example,  click on Large Gizmos [102] --> https://demo-trunk.ofbiz.apache.org/catalog/control/EditCategory?productCategoryId=102&pcategory=100), we get the following exception : 
> :ERROR MESSAGE:
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://product/widget/catalog/CommonScreens.xml#sidedeepcategory]: java.lang.UnsupportedOperationException (null)
> Here's the patch : 
> Index: applications/product/src/org/ofbiz/product/category/CategoryWorker.java
> ===================================================================
> --- applications/product/src/org/ofbiz/product/category/CategoryWorker.java	(revision 931207)
> +++ applications/product/src/org/ofbiz/product/category/CategoryWorker.java	(working copy)
> @@ -25,7 +25,6 @@
>  import javax.servlet.ServletRequest;
>  import javax.servlet.http.HttpServletRequest;
>  import javax.servlet.http.HttpSession;
> -import javax.servlet.jsp.PageContext;
>  
>  import javolution.util.FastList;
>  
> @@ -293,7 +292,9 @@
>          } else {
>              // remove all categories after the previous category, preparing for adding the current category
>              int index = trail.indexOf(previousCategoryId);
> -            trail = trail.subList(0, index);
> +            List<String> subList = trail.subList(0, index+1);
> +            trail = FastList.newInstance();
> +            trail.addAll(subList);
>          }
>  
>          // add the current category to the end of the list

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