Re: svn commit: r941139 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r941139 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java

Adrian Crum-2
Time to look at a JackRabbit integration?

;-)

-Adrian

--- On Tue, 5/4/10, [hidden email] <[hidden email]> wrote:

> From: [hidden email] <[hidden email]>
> Subject: svn commit: r941139 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
> To: [hidden email]
> Date: Tuesday, May 4, 2010, 7:25 PM
> Author: lektran
> Date: Wed May  5 02:25:26 2010
> New Revision: 941139
>
> URL: http://svn.apache.org/viewvc?rev=941139&view=rev
> Log:
> Put the null check a little higher so that it actually does
> the check before an NPE can occur. Giving up on this
> transform, I hate the content component.
>
> Modified:
>    
> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
>
> Modified:
> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java?rev=941139&r1=941138&r2=941139&view=diff
> ==============================================================================
> ---
> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
> (original)
> +++
> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
> Wed May  5 02:25:26 2010
> @@ -182,13 +182,15 @@ public class MenuWrapTransform
> implement
>              
>    String menuName =
> (String)templateCtx.get("menuName");
>              
>    String menuWrapperClassName =
> (String)templateCtx.get("menuWrapperClassName");
>              
>    HtmlMenuWrapper menuWrapper =
> HtmlMenuWrapper.getMenuWrapper(request, response, session,
> menuDefFile, menuName, menuWrapperClassName);
> -               
> String associatedContentId =
> (String)templateCtx.get("associatedContentId");
> -               
> menuWrapper.putInContext("defaultAssociatedContentId",
> associatedContentId);
> -               
> menuWrapper.putInContext("currentValue", view);
>  
>              
>    if (menuWrapper == null) {
>                
>      throw new
> IOException("HtmlMenuWrapper with def file:" + menuDefFile +
> " menuName:" + menuName + " and HtmlMenuWrapper class:" +
> menuWrapperClassName + " could not be instantiated.");
>              
>    }
> +
> +               
> String associatedContentId =
> (String)templateCtx.get("associatedContentId");
> +               
> menuWrapper.putInContext("defaultAssociatedContentId",
> associatedContentId);
> +               
> menuWrapper.putInContext("currentValue", view);
> +
>              
>    String menuStr =
> menuWrapper.renderMenuString();
>              
>    out.write(menuStr);
>              }
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r941139 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java

Anil Patel-3
Makes sense
+1

Thanks and Regards
Anil Patel
HotWax Media Inc
Find us on the web at www.hotwaxmedia.com or Google Keyword "ofbiz"

On May 5, 2010, at 1:10 AM, Adrian Crum wrote:

> Time to look at a JackRabbit integration?
>
> ;-)
>
> -Adrian
>
> --- On Tue, 5/4/10, [hidden email] <[hidden email]> wrote:
>
>> From: [hidden email] <[hidden email]>
>> Subject: svn commit: r941139 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
>> To: [hidden email]
>> Date: Tuesday, May 4, 2010, 7:25 PM
>> Author: lektran
>> Date: Wed May  5 02:25:26 2010
>> New Revision: 941139
>>
>> URL: http://svn.apache.org/viewvc?rev=941139&view=rev
>> Log:
>> Put the null check a little higher so that it actually does
>> the check before an NPE can occur. Giving up on this
>> transform, I hate the content component.
>>
>> Modified:
>>    
>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
>>
>> Modified:
>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java?rev=941139&r1=941138&r2=941139&view=diff
>> ==============================================================================
>> ---
>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
>> (original)
>> +++
>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
>> Wed May  5 02:25:26 2010
>> @@ -182,13 +182,15 @@ public class MenuWrapTransform
>> implement
>>              
>>    String menuName =
>> (String)templateCtx.get("menuName");
>>              
>>    String menuWrapperClassName =
>> (String)templateCtx.get("menuWrapperClassName");
>>              
>>    HtmlMenuWrapper menuWrapper =
>> HtmlMenuWrapper.getMenuWrapper(request, response, session,
>> menuDefFile, menuName, menuWrapperClassName);
>> -              
>> String associatedContentId =
>> (String)templateCtx.get("associatedContentId");
>> -              
>> menuWrapper.putInContext("defaultAssociatedContentId",
>> associatedContentId);
>> -              
>> menuWrapper.putInContext("currentValue", view);
>>
>>              
>>    if (menuWrapper == null) {
>>                
>>      throw new
>> IOException("HtmlMenuWrapper with def file:" + menuDefFile +
>> " menuName:" + menuName + " and HtmlMenuWrapper class:" +
>> menuWrapperClassName + " could not be instantiated.");
>>              
>>    }
>> +
>> +              
>> String associatedContentId =
>> (String)templateCtx.get("associatedContentId");
>> +              
>> menuWrapper.putInContext("defaultAssociatedContentId",
>> associatedContentId);
>> +              
>> menuWrapper.putInContext("currentValue", view);
>> +
>>              
>>    String menuStr =
>> menuWrapper.renderMenuString();
>>              
>>    out.write(menuStr);
>>              }
>>
>>
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r941139 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java

Scott Gray-2
At some point for sure.

The real and big problem with the content component is that it's almost impossible to figure out what the hell half the methods do.  They're poorly written, poorly documented and in a lot of cases isn't doing things correctly anyway.  How do you write backwards compatible code for something thats undecipherable?

I would say about 80-90% of the content code fits into the above description and IMO should just be ripped out and a fresh start made.

Regards
Scott

On 5/05/2010, at 5:13 PM, Anil Patel wrote:

> Makes sense
> +1
>
> Thanks and Regards
> Anil Patel
> HotWax Media Inc
> Find us on the web at www.hotwaxmedia.com or Google Keyword "ofbiz"
>
> On May 5, 2010, at 1:10 AM, Adrian Crum wrote:
>
>> Time to look at a JackRabbit integration?
>>
>> ;-)
>>
>> -Adrian
>>
>> --- On Tue, 5/4/10, [hidden email] <[hidden email]> wrote:
>>
>>> From: [hidden email] <[hidden email]>
>>> Subject: svn commit: r941139 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
>>> To: [hidden email]
>>> Date: Tuesday, May 4, 2010, 7:25 PM
>>> Author: lektran
>>> Date: Wed May  5 02:25:26 2010
>>> New Revision: 941139
>>>
>>> URL: http://svn.apache.org/viewvc?rev=941139&view=rev
>>> Log:
>>> Put the null check a little higher so that it actually does
>>> the check before an NPE can occur. Giving up on this
>>> transform, I hate the content component.
>>>
>>> Modified:
>>>
>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
>>>
>>> Modified:
>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java?rev=941139&r1=941138&r2=941139&view=diff
>>> ==============================================================================
>>> ---
>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
>>> (original)
>>> +++
>>> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
>>> Wed May  5 02:25:26 2010
>>> @@ -182,13 +182,15 @@ public class MenuWrapTransform
>>> implement
>>>
>>>   String menuName =
>>> (String)templateCtx.get("menuName");
>>>
>>>   String menuWrapperClassName =
>>> (String)templateCtx.get("menuWrapperClassName");
>>>
>>>   HtmlMenuWrapper menuWrapper =
>>> HtmlMenuWrapper.getMenuWrapper(request, response, session,
>>> menuDefFile, menuName, menuWrapperClassName);
>>> -              
>>> String associatedContentId =
>>> (String)templateCtx.get("associatedContentId");
>>> -              
>>> menuWrapper.putInContext("defaultAssociatedContentId",
>>> associatedContentId);
>>> -              
>>> menuWrapper.putInContext("currentValue", view);
>>>
>>>
>>>   if (menuWrapper == null) {
>>>
>>>     throw new
>>> IOException("HtmlMenuWrapper with def file:" + menuDefFile +
>>> " menuName:" + menuName + " and HtmlMenuWrapper class:" +
>>> menuWrapperClassName + " could not be instantiated.");
>>>
>>>   }
>>> +
>>> +              
>>> String associatedContentId =
>>> (String)templateCtx.get("associatedContentId");
>>> +              
>>> menuWrapper.putInContext("defaultAssociatedContentId",
>>> associatedContentId);
>>> +              
>>> menuWrapper.putInContext("currentValue", view);
>>> +
>>>
>>>   String menuStr =
>>> menuWrapper.renderMenuString();
>>>
>>>   out.write(menuStr);
>>>             }
>>>
>>>
>>>
>>
>>
>>
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r941139 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java

Adrian Crum-2
--- On Tue, 5/4/10, Scott Gray <[hidden email]> wrote:
> At some point for sure.
>
> The real and big problem with the content component is that
> it's almost impossible to figure out what the hell half the
> methods do.  They're poorly written, poorly documented
> and in a lot of cases isn't doing things correctly
> anyway.  How do you write backwards compatible code for
> something thats undecipherable?

Don't worry about backwards compatibility - there is very little chance anyone is using it - since it is so broken.

> I would say about 80-90% of the content code fits into the
> above description and IMO should just be ripped out and a
> fresh start made.

That's why I wrote my own forum application. I kept the data structure, but modified how the data is stored. Then I wrote all of my own screens - the existing ones are confusing and often don't work.

-Adrian


> On 5/05/2010, at 5:13 PM, Anil Patel wrote:
>
> > Makes sense
> > +1
> >
> > Thanks and Regards
> > Anil Patel
> > HotWax Media Inc
> > Find us on the web at www.hotwaxmedia.com or Google
> Keyword "ofbiz"
> >
> > On May 5, 2010, at 1:10 AM, Adrian Crum wrote:
> >
> >> Time to look at a JackRabbit integration?
> >>
> >> ;-)
> >>
> >> -Adrian
> >>
> >> --- On Tue, 5/4/10, [hidden email]
> <[hidden email]>
> wrote:
> >>
> >>> From: [hidden email]
> <[hidden email]>
> >>> Subject: svn commit: r941139 -
> /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
> >>> To: [hidden email]
> >>> Date: Tuesday, May 4, 2010, 7:25 PM
> >>> Author: lektran
> >>> Date: Wed May  5 02:25:26 2010
> >>> New Revision: 941139
> >>>
> >>> URL: http://svn.apache.org/viewvc?rev=941139&view=rev
> >>> Log:
> >>> Put the null check a little higher so that it
> actually does
> >>> the check before an NPE can occur. Giving up
> on this
> >>> transform, I hate the content component.
> >>>
> >>> Modified:
> >>>
> >>>
> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
> >>>
> >>> Modified:
> >>>
> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
> >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java?rev=941139&r1=941138&r2=941139&view=diff
> >>>
> ==============================================================================
> >>> ---
> >>>
> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
> >>> (original)
> >>> +++
> >>>
> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java
> >>> Wed May  5 02:25:26 2010
> >>> @@ -182,13 +182,15 @@ public class
> MenuWrapTransform
> >>> implement
> >>>
> >>>   String menuName =
> >>> (String)templateCtx.get("menuName");
> >>>
> >>>   String menuWrapperClassName
> =
> >>>
> (String)templateCtx.get("menuWrapperClassName");
> >>>
> >>>   HtmlMenuWrapper menuWrapper
> =
> >>> HtmlMenuWrapper.getMenuWrapper(request,
> response, session,
> >>> menuDefFile, menuName, menuWrapperClassName);
> >>> -           
>    
> >>> String associatedContentId =
> >>>
> (String)templateCtx.get("associatedContentId");
> >>> -           
>    
> >>>
> menuWrapper.putInContext("defaultAssociatedContentId",
> >>> associatedContentId);
> >>> -           
>    
> >>> menuWrapper.putInContext("currentValue",
> view);
> >>>
> >>>
> >>>   if (menuWrapper == null) {
> >>>
> >>>     throw new
> >>> IOException("HtmlMenuWrapper with def file:" +
> menuDefFile +
> >>> " menuName:" + menuName + " and
> HtmlMenuWrapper class:" +
> >>> menuWrapperClassName + " could not be
> instantiated.");
> >>>
> >>>   }
> >>> +
> >>> +           
>    
> >>> String associatedContentId =
> >>>
> (String)templateCtx.get("associatedContentId");
> >>> +           
>    
> >>>
> menuWrapper.putInContext("defaultAssociatedContentId",
> >>> associatedContentId);
> >>> +           
>    
> >>> menuWrapper.putInContext("currentValue",
> view);
> >>> +
> >>>
> >>>   String menuStr =
> >>> menuWrapper.renderMenuString();
> >>>
> >>>   out.write(menuStr);
> >>>         
>    }
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >
>
>



Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r941139 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java

Erwan de FERRIERES
In reply to this post by Adrian Crum-2
Le 05/05/2010 07:10, Adrian Crum a écrit :
> Time to look at a JackRabbit integration?
>
> ;-)
>

+1


--
Erwan de FERRIERES
www.nereide.biz
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r941139 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransf orm.java

Chris Snow-3

> Le 05/05/2010 07:10, Adrian Crum a écrit :
> Time to look at a JackRabbit integration?
>
> ;-)
>

+1


Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r941139 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java

Scott Gray-2
In reply to this post by Erwan de FERRIERES
Let's not kid ourselves though, jackrabbit is not the cure for all that ails us.  It's simply a repository; a place where you put stuff, you still have to design and build content models and systems to manage them.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 5/05/2010, at 8:19 PM, Erwan de FERRIERES wrote:

> Le 05/05/2010 07:10, Adrian Crum a écrit :
>> Time to look at a JackRabbit integration?
>>
>> ;-)
>>
>
> +1
>
>
> --
> Erwan de FERRIERES
> www.nereide.biz


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r941139 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuWrapTransform.java

Erwan de FERRIERES
Le 05/05/2010 10:35, Scott Gray a écrit :
> Let's not kid ourselves though, jackrabbit is not the cure for all that ails us.  It's simply a repository; a place where you put stuff, you still have to design and build content models and systems to manage them.
>
Yeah, sure, but if the basics are already done, it's easier to build upon !

--
Erwan de FERRIERES
www.nereide.biz