You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com> on 2009/11/20 01:06:25 UTC

Progress...

I've done several changes to the code. I'm near form the whole change.

But, I have a problem with the panel. I don't know what's the best way
to put
portlet information on web. 

It's supposed that I have to use the table already created but I don't
know how
te set information via YUI3:

+<table id="portlet-body-html" style="border-collapse: collapse; width:
100%; margin-top: 0px; margin-bottom: 0px; float: left;">
+    <tr>
+       <td rowspan="2" width="20%" class="portlet-section-body">
+           <img src='${portalContextPath}' />
+       </td>
+       <td id="name" width="80%" class="portlet-section-body">#</td>
+    </tr>       
+    <tr>
+       <td class="portlet-section-body">
+           <a href="#">Preview</a>  
+           <a href="#">Add</a>
+       </td>
+    </tr>
+</table>
+

I only managed to set the images. Normally a custom widget should be
created but I have
not enough knowledge about YUI. 

The rest works well... The only change needed is to do the filter to be
able to load on category click
but this will be trivial. 

If you help me to put information in each field I will finish this.


The rest of the changes:



        Prepatch-j2-admin-JS2-1057: 
        
                * Removed server retrieve of portlets (famous two lines)
                * Modified a bit the jsp code.
                
        
        Prepatch-jetspeed-2-JS2-1057:
        
                * portal.js - added ajax request and load using JSON
                * modified getportlets to handle json output.
                * GetPortletsAction - added support for JSON
                * Fixed a bug that caused xml and json fail when bad
                escaped texts found in description or name of the
                portlet.
                
                

It's not much but it took me a lot of time figure out how everything
glue, and setting dev environment caused some trouble :D

Your ideas will be welcome...

Tnx

Re: Progress...

Posted by David Sean Taylor <d....@onehippo.com>.
On Nov 20, 2009, at 12:46 AM, Gonzalo Aguilar Delgado wrote:

>
>
> El jue, 19-11-2009 a las 19:46 -0800, David Sean Taylor escribió:
>
>>> On Nov 19, 2009, at 4:06 PM, Gonzalo Aguilar Delgado wrote:
>>>
>>>> I've done several changes to the code. I'm near form the whole
>>>> change.
>>>>
>>>> But, I have a problem with the panel. I don't know what's the best
>>>> way to put
>>>> portlet information on web.
>>>>
>>>> It's supposed that I have to use the table already created but I
>>>> don't know how
>>>> te set information via YUI3:
>>>>
>>>> +<table id="portlet-body-html" style="border-collapse: collapse;
>>>> width: 100%; margin-top: 0px; margin-bottom: 0px; float: left;">
>>>> +    <tr>
>>>> +       <td rowspan="2" width="20%" class="portlet-section-body">
>>>> +           <img src='${portalContextPath}' />
>>>> +       </td>
>>>> +       <td id="name" width="80%" class="portlet-section-body">#</ 
>>>> td>
>>
>> We should be careful about node ids, id='name' is not the best  
>> choice,
>> could use some namespace or prefixing
>> Also we will be getting a whole set of nodes with the same id, not
>> sure if that was the desired effect or not...
>
>
> I know, I cannot handle this correctly because not enough knowledge of
> YUI. That's why I
> requested help. I suppose that we should pass context in a variable  
> and
> change ids via YUI.
>
> Any other way to do it?

Just set the node id on the node:  node.setAttribute('id', 'some id  
value');
>
> I have a question. How do we handle preview? Is there any way of doing
> preview "on the fly"?

There is the portlet pipeline. You can retrieve the content of a  
portlet in a popup window. Oh I just saw Woonsan already responded to  
this.....





Re: Progress...

Posted by Woonsan Ko <wo...@yahoo.com>.
Hi David,

Thanks for the pointer. The img tag doesn't have to have src attribute because it is used as a template source.
I will remove the attribute.

Regards,

Woonsan



----- Original Message ----
> From: David Sean Taylor <d....@onehippo.com>
> To: Jetspeed Developers List <je...@portals.apache.org>
> Sent: Mon, December 7, 2009 7:33:21 AM
> Subject: Re: Progress...
> 
> Woonsan,
> 
> Not sure what was intended here in toolbox.jsp:
> 
> 

>     

>         

>             
>                 
> 
> the img src is causing an extra pipeline hit
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


      

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Progress...

Posted by David Sean Taylor <d....@onehippo.com>.
Woonsan,

Not sure what was intended here in toolbox.jsp:

<div id="<portlet:namespace/>portletItemTemplate" style="display: none">
     <table style="border-collapse: collapse; width: 100%; margin-top:  
0px; margin-bottom: 0px; float: left;">
	    <tr>
	        <td rowspan="2" width="20%" class="portlet-section-body">
	            <img src='' />

the img src is causing an extra pipeline hit


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Progress...

Posted by Woonsan Ko <wo...@yahoo.com>.
Hi Gonzalo,

--- On Fri, 11/20/09, Gonzalo Aguilar Delgado <ga...@aguilardelgado.com> wrote:

> From: Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>
> Subject: Re: Progress...
> To: "Jetspeed Developers List" <je...@portals.apache.org>
> Date: Friday, November 20, 2009, 6:42 PM
> 
> 
> > I've just committed something to separate YUI
> instantiation and event handlers from the portal.js. Event
> handlers for toolbox portlet are now defined in
> toolbox.jsp.
> > Also, the ids are not duplicated any more by using
> portlet namespace and portlet unique names.
> > By the way, I see the following problems now:
> > - The portlets list table contains table element for
> each portlet item.
> >   I think it should have tr and td
> before adding the table element.
> >   FYI, we cannot leverage data table
> with YUI3 yet because it's not ported yet.
> 
> I didn't find anyway to handle this, that's why I left this
> way for now.
> I don't want to forget add tr's and td's.
> But I think it will be better create a yui widget that will
> handle all
> for us. Even preview think will be a good think
> to be handled by this widget. 
> 
> Is possible create widgets in YUI?

Yes, I think it would be easy to add widgets.
However, I've just committed one more. I replaced the container panel tag by div instead of table, and I wrapped the portlet item table by div. So, we don't have to consider tr and td any more. I think it would be okay for now before we have better widgets.

> 
> 
> > - When search button is clicked, it should remove
> existing rows.
> 
> But they will be loaded again when click on panel right?

Yes. I think we need to do like that. Please review my recent changes.

> 
> > - Preview link
> 
> I think this one will be difficult but...
> 

As I mentioned in other email, I think it would be better to support 'preview' custom mode and invoke a portlet with 'preview' custom mode when we need preview page for the portlet.
If a portlet implements 'preview' custom mode, then we can just render the output in an area. Otherwise, we can do some default handling. For example, we can define a metadata like 'thumbnail' in jetspeed-portlet.xml...

Kind regards,

Woonsan



      

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Progress...

Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.

> I've just committed something to separate YUI instantiation and event handlers from the portal.js. Event handlers for toolbox portlet are now defined in toolbox.jsp.
> Also, the ids are not duplicated any more by using portlet namespace and portlet unique names.
> By the way, I see the following problems now:
> - The portlets list table contains table element for each portlet item.
>   I think it should have tr and td before adding the table element.
>   FYI, we cannot leverage data table with YUI3 yet because it's not ported yet.

I didn't find anyway to handle this, that's why I left this way for now.
I don't want to forget add tr's and td's.
But I think it will be better create a yui widget that will handle all
for us. Even preview think will be a good think
to be handled by this widget. 

Is possible create widgets in YUI?


> - When search button is clicked, it should remove existing rows.

But they will be loaded again when click on panel right?

> - Preview link

I think this one will be difficult but...

I will take a look to the changes later, today was not much productive
day.


Tnx guys. Good weekend..

Re: Progress...

Posted by Woonsan Ko <wo...@yahoo.com>.
Hi Gonzalo and David,

I've just committed something to separate YUI instantiation and event handlers from the portal.js. Event handlers for toolbox portlet are now defined in toolbox.jsp.
Also, the ids are not duplicated any more by using portlet namespace and portlet unique names.
By the way, I see the following problems now:
- The portlets list table contains table element for each portlet item.
  I think it should have tr and td before adding the table element.
  FYI, we cannot leverage data table with YUI3 yet because it's not ported yet.
- When search button is clicked, it should remove existing rows.
- Preview link
- ...

Cheers,

Woonsan


--- On Fri, 11/20/09, Woonsan Ko <wo...@yahoo.com> wrote:

> From: Woonsan Ko <wo...@yahoo.com>
> Subject: Re: Progress...
> To: "Jetspeed Developers List" <je...@portals.apache.org>
> Date: Friday, November 20, 2009, 1:44 PM
> Hi Gonzalo,
> 
> --- On Fri, 11/20/09, Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>
> wrote:
> 
> > From: Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>
> > Subject: Re: Progress...
> > To: "Jetspeed Developers List" <je...@portals.apache.org>
> > Date: Friday, November 20, 2009, 9:46 AM
> > 
> > 
> > El jue, 19-11-2009 a las 19:46 -0800, David Sean
> Taylor
> > escribió:
> > 
> > > > On Nov 19, 2009, at 4:06 PM, Gonzalo
> Aguilar
> > Delgado wrote:
> > > >
> > > >> I've done several changes to the code.
> I'm
> > near form the whole  
> > > >> change.
> > > >>
> > > >> But, I have a problem with the panel. I
> don't
> > know what's the best  
> > > >> way to put
> > > >> portlet information on web.
> > > >>
> > > >> It's supposed that I have to use the
> table
> > already created but I  
> > > >> don't know how
> > > >> te set information via YUI3:
> > > >>
> > > >> +<table id="portlet-body-html"
> > style="border-collapse: collapse;  
> > > >> width: 100%; margin-top: 0px;
> margin-bottom:
> > 0px; float: left;">
> > > >> +    <tr>
> > > >> +       <td
> > rowspan="2" width="20%"
> class="portlet-section-body">
> > > >> +       
> >    <img src='${portalContextPath}' />
> > > >> +       </td>
> > > >> +       <td
> > id="name" width="80%"
> > class="portlet-section-body">#</td>
> > > 
> > > We should be careful about node ids, id='name' is
> not
> > the best choice,  
> > > could use some namespace or prefixing
> > > Also we will be getting a whole set of nodes with
> the
> > same id, not  
> > > sure if that was the desired effect or not...
> > 
> > 
> > I know, I cannot handle this correctly because not
> enough
> > knowledge of
> > YUI. That's why I 
> > requested help. I suppose that we should pass context
> in a
> > variable and
> > change ids via YUI.
> > 
> > Any other way to do it?
> 
> I think we need to have separate YUI global object instance
> in toolbox.jsp without mixing the custom event handlers for
> toolbox into the global portal.js.
> It says, "a page can share a single YUI instance or can use
> different, insular instances for each piece of functionality
> on the page." [1]
> In a portlet, the second approach seems better.
> Anyway, if we go this way, then it would be easier to pass
> context namespace or attaching custom events.
> I'll try to find a solution around this.
> 
> [1] http://developer.yahoo.com/yui/3/yui/
> 
> 
> Regards,
> 
> Woonsan
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
> 
> 


      

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Progress...

Posted by Woonsan Ko <wo...@yahoo.com>.
Hi Gonzalo,

--- On Fri, 11/20/09, Gonzalo Aguilar Delgado <ga...@aguilardelgado.com> wrote:

> From: Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>
> Subject: Re: Progress...
> To: "Jetspeed Developers List" <je...@portals.apache.org>
> Date: Friday, November 20, 2009, 9:46 AM
> 
> 
> El jue, 19-11-2009 a las 19:46 -0800, David Sean Taylor
> escribió:
> 
> > > On Nov 19, 2009, at 4:06 PM, Gonzalo Aguilar
> Delgado wrote:
> > >
> > >> I've done several changes to the code. I'm
> near form the whole  
> > >> change.
> > >>
> > >> But, I have a problem with the panel. I don't
> know what's the best  
> > >> way to put
> > >> portlet information on web.
> > >>
> > >> It's supposed that I have to use the table
> already created but I  
> > >> don't know how
> > >> te set information via YUI3:
> > >>
> > >> +<table id="portlet-body-html"
> style="border-collapse: collapse;  
> > >> width: 100%; margin-top: 0px; margin-bottom:
> 0px; float: left;">
> > >> +    <tr>
> > >> +       <td
> rowspan="2" width="20%" class="portlet-section-body">
> > >> +       
>    <img src='${portalContextPath}' />
> > >> +       </td>
> > >> +       <td
> id="name" width="80%"
> class="portlet-section-body">#</td>
> > 
> > We should be careful about node ids, id='name' is not
> the best choice,  
> > could use some namespace or prefixing
> > Also we will be getting a whole set of nodes with the
> same id, not  
> > sure if that was the desired effect or not...
> 
> 
> I know, I cannot handle this correctly because not enough
> knowledge of
> YUI. That's why I 
> requested help. I suppose that we should pass context in a
> variable and
> change ids via YUI.
> 
> Any other way to do it?

I think we need to have separate YUI global object instance in toolbox.jsp without mixing the custom event handlers for toolbox into the global portal.js.
It says, "a page can share a single YUI instance or can use different, insular instances for each piece of functionality on the page." [1]
In a portlet, the second approach seems better.
Anyway, if we go this way, then it would be easier to pass context namespace or attaching custom events.
I'll try to find a solution around this.

[1] http://developer.yahoo.com/yui/3/yui/


Regards,

Woonsan



      

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Progress...

Posted by Woonsan Ko <wo...@yahoo.com>.
Hi Gonzalo,

--- On Fri, 11/20/09, Gonzalo Aguilar Delgado <ga...@aguilardelgado.com> wrote:

> From: Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>
> Subject: Re: Progress...
> To: "Jetspeed Developers List" <je...@portals.apache.org>
> Date: Friday, November 20, 2009, 6:39 PM
> > I think you can try Jetspeed
> portlet pipeline urls like the following example:
> > 
> > http://localhost:8080/jetspeed/portlet/?entity=demo::PickANumberPortlet&portlet=demo::PickANumberPortlet
> > 
> > The servlet path, '/portlet/*', is handled by Jetspeed
> portlet pipeline.
> > The entity parameter should be unique and portlet
> parameter is the unique name of the portlet definition.
> > You can just read responseText from the url response
> in your AJAX codes.
> > We need to think it over for a better solution anyway,
> but I think it would be okay for now.
> > 
> > Kind regards,
> > 
> > Woonsan
> 
> 
> But it should be a small thumbnail... It will look much
> better...

I agree. 
Currently, Jetspeed-2 supports "about", "edit_defaults" and "config" mode, 
Now, I think we'd better support one more custom portlet mode, "preview", as the portlet spec mentioned as an example.

Regards,

Woonsan

> 
> Read my answer to the other question, please...
> 


      

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Progress...

Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.
> I think you can try Jetspeed portlet pipeline urls like the following example:
> 
> http://localhost:8080/jetspeed/portlet/?entity=demo::PickANumberPortlet&portlet=demo::PickANumberPortlet
> 
> The servlet path, '/portlet/*', is handled by Jetspeed portlet pipeline.
> The entity parameter should be unique and portlet parameter is the unique name of the portlet definition.
> You can just read responseText from the url response in your AJAX codes.
> We need to think it over for a better solution anyway, but I think it would be okay for now.
> 
> Kind regards,
> 
> Woonsan


But it should be a small thumbnail... It will look much better...

Read my answer to the other question, please...

Re: Progress...

Posted by Woonsan Ko <wo...@yahoo.com>.
Hi Gonzalo,

--- On Fri, 11/20/09, Gonzalo Aguilar Delgado <ga...@aguilardelgado.com> wrote:

> From: Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>
> Subject: Re: Progress...
> To: "Jetspeed Developers List" <je...@portals.apache.org>
> Date: Friday, November 20, 2009, 9:46 AM
> 
> 
> El jue, 19-11-2009 a las 19:46 -0800, David Sean Taylor
> escribió:
> 
> > > On Nov 19, 2009, at 4:06 PM, Gonzalo Aguilar
> Delgado wrote:
> > >
> > >> I've done several changes to the code. I'm
> near form the whole  
> > >> change.
> > >>
> > >> But, I have a problem with the panel. I don't
> know what's the best  
> > >> way to put
> > >> portlet information on web.
> > >>
> > >> It's supposed that I have to use the table
> already created but I  
> > >> don't know how
> > >> te set information via YUI3:
> > >>
> > >> +<table id="portlet-body-html"
> style="border-collapse: collapse;  
> > >> width: 100%; margin-top: 0px; margin-bottom:
> 0px; float: left;">
> > >> +    <tr>
> > >> +       <td
> rowspan="2" width="20%" class="portlet-section-body">
> > >> +       
>    <img src='${portalContextPath}' />
> > >> +       </td>
> > >> +       <td
> id="name" width="80%"
> class="portlet-section-body">#</td>
> > 
> > We should be careful about node ids, id='name' is not
> the best choice,  
> > could use some namespace or prefixing
> > Also we will be getting a whole set of nodes with the
> same id, not  
> > sure if that was the desired effect or not...
> 
> 
> I know, I cannot handle this correctly because not enough
> knowledge of
> YUI. That's why I 
> requested help. I suppose that we should pass context in a
> variable and
> change ids via YUI.
> 
> Any other way to do it?
> 
> 
> > 
> > >> +    </tr>
> > >> +    <tr>
> > >> +       <td
> class="portlet-section-body">
> > >> +       
>    <a href="#">Preview</a>
> > >> +       
>    <a href="#">Add</a>
> > 
> > Propose using the addportlet api for these two hrefs
> (there is no  
> > preview written, yet)
> > (The addportlet api will require the portlet name from
> the json result)
> 
> 
> I have a question. How do we handle preview? Is there any
> way of doing
> preview "on the fly"?

I think you can try Jetspeed portlet pipeline urls like the following example:

http://localhost:8080/jetspeed/portlet/?entity=demo::PickANumberPortlet&portlet=demo::PickANumberPortlet

The servlet path, '/portlet/*', is handled by Jetspeed portlet pipeline.
The entity parameter should be unique and portlet parameter is the unique name of the portlet definition.
You can just read responseText from the url response in your AJAX codes.
We need to think it over for a better solution anyway, but I think it would be okay for now.

Kind regards,

Woonsan

> 
> Tnx
> 
> 
> 
> 


      

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Progress...

Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.

El jue, 19-11-2009 a las 19:46 -0800, David Sean Taylor escribió:

> > On Nov 19, 2009, at 4:06 PM, Gonzalo Aguilar Delgado wrote:
> >
> >> I've done several changes to the code. I'm near form the whole  
> >> change.
> >>
> >> But, I have a problem with the panel. I don't know what's the best  
> >> way to put
> >> portlet information on web.
> >>
> >> It's supposed that I have to use the table already created but I  
> >> don't know how
> >> te set information via YUI3:
> >>
> >> +<table id="portlet-body-html" style="border-collapse: collapse;  
> >> width: 100%; margin-top: 0px; margin-bottom: 0px; float: left;">
> >> +    <tr>
> >> +       <td rowspan="2" width="20%" class="portlet-section-body">
> >> +           <img src='${portalContextPath}' />
> >> +       </td>
> >> +       <td id="name" width="80%" class="portlet-section-body">#</td>
> 
> We should be careful about node ids, id='name' is not the best choice,  
> could use some namespace or prefixing
> Also we will be getting a whole set of nodes with the same id, not  
> sure if that was the desired effect or not...


I know, I cannot handle this correctly because not enough knowledge of
YUI. That's why I 
requested help. I suppose that we should pass context in a variable and
change ids via YUI.

Any other way to do it?


> 
> >> +    </tr>
> >> +    <tr>
> >> +       <td class="portlet-section-body">
> >> +           <a href="#">Preview</a>
> >> +           <a href="#">Add</a>
> 
> Propose using the addportlet api for these two hrefs (there is no  
> preview written, yet)
> (The addportlet api will require the portlet name from the json result)


I have a question. How do we handle preview? Is there any way of doing
preview "on the fly"?

Tnx




Re: Progress...

Posted by David Sean Taylor <d....@onehippo.com>.
> On Nov 19, 2009, at 4:06 PM, Gonzalo Aguilar Delgado wrote:
>
>> I've done several changes to the code. I'm near form the whole  
>> change.
>>
>> But, I have a problem with the panel. I don't know what's the best  
>> way to put
>> portlet information on web.
>>
>> It's supposed that I have to use the table already created but I  
>> don't know how
>> te set information via YUI3:
>>
>> +<table id="portlet-body-html" style="border-collapse: collapse;  
>> width: 100%; margin-top: 0px; margin-bottom: 0px; float: left;">
>> +    <tr>
>> +       <td rowspan="2" width="20%" class="portlet-section-body">
>> +           <img src='${portalContextPath}' />
>> +       </td>
>> +       <td id="name" width="80%" class="portlet-section-body">#</td>

We should be careful about node ids, id='name' is not the best choice,  
could use some namespace or prefixing
Also we will be getting a whole set of nodes with the same id, not  
sure if that was the desired effect or not...

>> +    </tr>
>> +    <tr>
>> +       <td class="portlet-section-body">
>> +           <a href="#">Preview</a>
>> +           <a href="#">Add</a>

Propose using the addportlet api for these two hrefs (there is no  
preview written, yet)
(The addportlet api will require the portlet name from the json result)



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Progress...

Posted by David Sean Taylor <d....@onehippo.com>.
On Nov 20, 2009, at 12:44 AM, Gonzalo Aguilar Delgado wrote:

> Hi,
>
> Great... I will check your changes. hehe I forgot remove the tests I  
> did
> (like the onClick Handler) sorry.
>
> About how to build the table. I know that dojo uses a templating  
> system
> for widgets. Do you know if
> there is something similar with YUI?
>
There are widgets: http://developer.yahoo.com/yui/3/widget/
They look very easy to code, haven't tried yet


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Progress...

Posted by Gonzalo Aguilar Delgado <ga...@aguilardelgado.com>.
Hi, 

Great... I will check your changes. hehe I forgot remove the tests I did
(like the onClick Handler) sorry.

About how to build the table. I know that dojo uses a templating system
for widgets. Do you know if
there is something similar with YUI?


El jue, 19-11-2009 a las 19:23 -0800, David Sean Taylor escribió:

> I committed this to trunk (after modifying some things) so you can  
> continue to work on it. From the commit message:
> 
> Reviewed. I've modified and fixed a few things...
> - fixed the display names to display
> - rewrote the row population script to use YUI Node api replacing  
> direct DOM manipulation
> - dont' use a onclick handler, simply call the first load of portlets  
> directly inline
>   im actually not sure what should be populated first, perhaps a  
> "Whats New" category
> - added some TODOs for you, see source code for details
> 
> Im also thinking that it might be better to create the nodes directly  
> from javascript, and not pass in the hidden table (I added a  
> display:none attribute on it) although the hidden table is definitely  
> easier. Optionally you may want to consider loading from a string,  
> something like:
> 
> var clone = Y.Node.create("<table><tr>....etc....");



Re: Progress...

Posted by David Sean Taylor <d....@onehippo.com>.
I committed this to trunk (after modifying some things) so you can  
continue to work on it. From the commit message:

Reviewed. I've modified and fixed a few things...
- fixed the display names to display
- rewrote the row population script to use YUI Node api replacing  
direct DOM manipulation
- dont' use a onclick handler, simply call the first load of portlets  
directly inline
  im actually not sure what should be populated first, perhaps a  
"Whats New" category
- added some TODOs for you, see source code for details

Im also thinking that it might be better to create the nodes directly  
from javascript, and not pass in the hidden table (I added a  
display:none attribute on it) although the hidden table is definitely  
easier. Optionally you may want to consider loading from a string,  
something like:

var clone = Y.Node.create("<table><tr>....etc....");


On Nov 19, 2009, at 4:06 PM, Gonzalo Aguilar Delgado wrote:

> I've done several changes to the code. I'm near form the whole change.
>
> But, I have a problem with the panel. I don't know what's the best  
> way to put
> portlet information on web.
>
> It's supposed that I have to use the table already created but I  
> don't know how
> te set information via YUI3:
>
> +<table id="portlet-body-html" style="border-collapse: collapse;  
> width: 100%; margin-top: 0px; margin-bottom: 0px; float: left;">
> +    <tr>
> +       <td rowspan="2" width="20%" class="portlet-section-body">
> +           <img src='${portalContextPath}' />
> +       </td>
> +       <td id="name" width="80%" class="portlet-section-body">#</td>
> +    </tr>
> +    <tr>
> +       <td class="portlet-section-body">
> +           <a href="#">Preview</a>
> +           <a href="#">Add</a>
> +       </td>
> +    </tr>
> +</table>
> +
>
> I only managed to set the images. Normally a custom widget should be  
> created but I have
> not enough knowledge about YUI.
>
> The rest works well... The only change needed is to do the filter to  
> be able to load on category click
> but this will be trivial.
>
> If you help me to put information in each field I will finish this.
>
>
> The rest of the changes:
>
>
> Prepatch-j2-admin-JS2-1057:
> * Removed server retrieve of portlets (famous two lines)
> * Modified a bit the jsp code.
>
> Prepatch-jetspeed-2-JS2-1057:
> * portal.js - added ajax request and load using JSON
> * modified getportlets to handle json output.
> * GetPortletsAction - added support for JSON
> * Fixed a bug that caused xml and json fail when bad escaped texts  
> found in description or name of the portlet.
>
>
> It's not much but it took me a lot of time figure out how everything  
> glue, and setting dev environment caused some trouble <face-smile- 
> big.png>
>
> Your ideas will be welcome...
>
> Tnx
> <Prepatch-j2-admin-JS2-1057.txt><Prepatch-jetspeed-2-JS2-1057.txt>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org