You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Kevin Brown <et...@google.com> on 2008/07/02 08:06:33 UTC

Re: container.js question.

The best option is to create your own container configuration and just
override the values that you need. Modify web.xml to point to both the base
configuration and your own (colon-separated). Shindig will take care of
ensuring inheritance works correctly.

On Tue, Jul 1, 2008 at 6:28 PM, Viji Subramanian <
Viji.Subramanian@corp.aol.com> wrote:

> Kevin,
>
> How do i override the default container.js..
>
> I need to update the views and parentRelayUrl   ..
>
> looks like i need to update the gadgets.properties as well...
> what is the correct way of overriding the properties.. and including them..
>
> any help is greatly appreciated..
>
> thanks
>

Re: container.js question.

Posted by Erel Segal <er...@gmail.com>.
I think I also found a bug:
https://issues.apache.org/jira/browse/SHINDIG-450

(unless I totally misunderstood the concept)




2008/7/15, Erel Segal <er...@gmail.com>:
>
> I updated the documentation, see:
> https://issues.apache.org/jira/browse/SHINDIG-449
> can you look at it?
>
> 2008/7/3, Viji Subramanian <Vi...@corp.aol.com>:
>>
>> Yes.. the web.xml comment is what got us to this discussion.. and perhaps
>> ..some confusion..
>>
>> if you can update the comment, that would be useful ..
>>
>> thanks
>>
>> Chris Chabot wrote:
>>
>>> For PHP that comment is perfectly valid.
>>>
>>> Just create a myContainer.js, copy the contents of container.js to it,
>>> change
>>> {"gadgets.container" : ["default"],
>>> to
>>> {"gadgets.container" : ["myContainer"],
>>>
>>> And make your changes that you need to myContainer.js. This was you can
>>> keep svn updating, etc, plus have a configuration per 'container'. Just
>>> make sure on the iframe URL you specify &container=myContainer for it to
>>> use that config :)
>>>
>>> Ps, web.xml is purely Java build stuff and not related to the PHP
>>> version.
>>>
>>>    -- Chris
>>>
>>> On Thu, 2008-07-03 at 14:38 +0300, Erel Segal wrote:
>>>
>>>
>>>
>>>> OK, so, can you please change the comment in container.js to reflect
>>>> this?
>>>> (the current comment reads: "Rather than replacing this file, you
>>>> should
>>>> create your own container.js file and load it directly by modifying
>>>> the
>>>> value of web.xml").
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>

Re: container.js question.

Posted by Erel Segal <er...@gmail.com>.
I updated the documentation, see:
https://issues.apache.org/jira/browse/SHINDIG-449
can you look at it?

2008/7/3, Viji Subramanian <Vi...@corp.aol.com>:
>
> Yes.. the web.xml comment is what got us to this discussion.. and perhaps
> ..some confusion..
>
> if you can update the comment, that would be useful ..
>
> thanks
>
> Chris Chabot wrote:
>
>> For PHP that comment is perfectly valid.
>>
>> Just create a myContainer.js, copy the contents of container.js to it,
>> change
>> {"gadgets.container" : ["default"],
>> to
>> {"gadgets.container" : ["myContainer"],
>>
>> And make your changes that you need to myContainer.js. This was you can
>> keep svn updating, etc, plus have a configuration per 'container'. Just
>> make sure on the iframe URL you specify &container=myContainer for it to
>> use that config :)
>>
>> Ps, web.xml is purely Java build stuff and not related to the PHP
>> version.
>>
>>    -- Chris
>>
>> On Thu, 2008-07-03 at 14:38 +0300, Erel Segal wrote:
>>
>>
>>
>>> OK, so, can you please change the comment in container.js to reflect
>>> this?
>>> (the current comment reads: "Rather than replacing this file, you
>>> should
>>> create your own container.js file and load it directly by modifying
>>> the
>>> value of web.xml").
>>>
>>>
>>
>>
>>
>
>

Re: container.js question.

Posted by Viji Subramanian <Vi...@corp.aol.com>.
Yes.. the web.xml comment is what got us to this discussion.. and 
perhaps ..some confusion..

if you can update the comment, that would be useful ..

thanks

Chris Chabot wrote:
> For PHP that comment is perfectly valid.
>
> Just create a myContainer.js, copy the contents of container.js to it,
> change
> {"gadgets.container" : ["default"],
> to
> {"gadgets.container" : ["myContainer"],
>
> And make your changes that you need to myContainer.js. This was you can
> keep svn updating, etc, plus have a configuration per 'container'. Just
> make sure on the iframe URL you specify &container=myContainer for it to
> use that config :)
>
> Ps, web.xml is purely Java build stuff and not related to the PHP
> version.
>
>     -- Chris
>
> On Thu, 2008-07-03 at 14:38 +0300, Erel Segal wrote:
>
>   
>> OK, so, can you please change the comment in container.js to reflect
>> this?
>> (the current comment reads: "Rather than replacing this file, you
>> should
>> create your own container.js file and load it directly by modifying
>> the
>> value of web.xml").
>>     
>
>   


Re: container.js question.

Posted by Chris Chabot <ch...@xs4all.nl>.
For PHP that comment is perfectly valid.

Just create a myContainer.js, copy the contents of container.js to it,
change
{"gadgets.container" : ["default"],
to
{"gadgets.container" : ["myContainer"],

And make your changes that you need to myContainer.js. This was you can
keep svn updating, etc, plus have a configuration per 'container'. Just
make sure on the iframe URL you specify &container=myContainer for it to
use that config :)

Ps, web.xml is purely Java build stuff and not related to the PHP
version.

    -- Chris

On Thu, 2008-07-03 at 14:38 +0300, Erel Segal wrote:

> OK, so, can you please change the comment in container.js to reflect
> this?
> (the current comment reads: "Rather than replacing this file, you
> should
> create your own container.js file and load it directly by modifying
> the
> value of web.xml").

Re: container.js question.

Posted by Erel Segal <er...@gmail.com>.
"Sorry -- modifying web.xml is unnecessary, I wasn't thinking. You just need
to add it to the properties file and you're good to go."

OK, so, can you please change the comment in container.js to reflect this?
(the current comment reads: "Rather than replacing this file, you should
create your own container.js file and load it directly by modifying the
value of web.xml").

Also, is the change in web.xml / properties file for Java only, or will it
work for PHP too?



2008/7/3, Kevin Brown <et...@google.com>:
>
> On Wed, Jul 2, 2008 at 12:38 PM, Viji Subramanian <
> Viji.Subramanian@corp.aol.com> wrote:
>
> > Re:-  /config/container.js
> >
> > sorry.. Can i please have a sample few lines of web.xml - so that i
> > understand what u are referring here..
>
>
>
> Sorry -- modifying web.xml is unnecessary, I wasn't thinking. You just need
> to add it to the properties file and you're good to go.
>
>
>
> >
> >
> > The only way I understand this is :-
> > i can copy the gadgets.properties and call it myown.properties file and
> add
> > mycontainer.js so that containers.default has mycontainer.js as well as
> the
> > default container.js separated by comma..
> >
> > If I do the above.., in mycontainer.js, do I need to change
> > gadgets.container and gadgets.parent.. ? and what should those values be
> ?..
>
>
>
> You'd want to modify gadgets.container (give your container a unique name),
> as well as overriding any appropriate values. If you don't anything to
> override, you don't need a custom configuration.
>
> To give an example, this is the configuration that we use for Orkut:
>
>   {"gadgets.container": ["orkut"],
>   "gadgets.features" : {
>     "core.io" : {
>       "proxyUrl" : "http://www.gmodules.com/gadgets/proxy?refresh=
> <
> http://www.google.com/url?sa=D&q=http://www.gmodules.com/gadgets/proxy%3Frefresh%3D
> >%refresh%&url=%url%"
>     },
>     "rpc" : {
>       "parentRelayUrl" : "/rpc_relay.html",
>     },
>   }}
>
> So, not much change over the base configuration. Other containers might
> want
> even more extensive
>
>
>
> >
> >
> > Thanks..
> >
> > Kevin Brown wrote:
> >
> >> The best option is to create your own container configuration and just
> >> override the values that you need. Modify web.xml to point to both the
> base
> >> configuration and your own (colon-separated). Shindig will take care of
> >> ensuring inheritance works correctly.
> >>
> >> On Tue, Jul 1, 2008 at 6:28 PM, Viji Subramanian <
> >> Viji.Subramanian@corp.aol.com <ma...@corp.aol.com>>
> >> wrote:
> >>
> >>    Kevin,
> >>
> >>    How do i override the default container.js..
> >>
> >>    I need to update the views and parentRelayUrl   ..
> >>
> >>    looks like i need to update the gadgets.properties as
> well...      what
> >> is the correct way of overriding the properties.. and
> >>    including them..
> >>
> >>    any help is greatly appreciated..
> >>
> >>    thanks
> >>
> >>
> >>
> >
>

Re: container.js question.

Posted by Kevin Brown <et...@google.com>.
On Wed, Jul 2, 2008 at 12:38 PM, Viji Subramanian <
Viji.Subramanian@corp.aol.com> wrote:

> Re:-  /config/container.js
>
> sorry.. Can i please have a sample few lines of web.xml - so that i
> understand what u are referring here..


Sorry -- modifying web.xml is unnecessary, I wasn't thinking. You just need
to add it to the properties file and you're good to go.


>
>
> The only way I understand this is :-
> i can copy the gadgets.properties and call it myown.properties file and add
> mycontainer.js so that containers.default has mycontainer.js as well as the
> default container.js separated by comma..
>
> If I do the above.., in mycontainer.js, do I need to change
> gadgets.container and gadgets.parent.. ? and what should those values be ?..


You'd want to modify gadgets.container (give your container a unique name),
as well as overriding any appropriate values. If you don't anything to
override, you don't need a custom configuration.

To give an example, this is the configuration that we use for Orkut:

 {"gadgets.container": ["orkut"],
  "gadgets.features" : {
    "core.io" : {
      "proxyUrl" : "http://www.gmodules.com/gadgets/proxy?refresh=
<http://www.google.com/url?sa=D&q=http://www.gmodules.com/gadgets/proxy%3Frefresh%3D>%refresh%&url=%url%"
    },
    "rpc" : {
      "parentRelayUrl" : "/rpc_relay.html",
    },
 }}

So, not much change over the base configuration. Other containers might want
even more extensive


>
>
> Thanks..
>
> Kevin Brown wrote:
>
>> The best option is to create your own container configuration and just
>> override the values that you need. Modify web.xml to point to both the base
>> configuration and your own (colon-separated). Shindig will take care of
>> ensuring inheritance works correctly.
>>
>> On Tue, Jul 1, 2008 at 6:28 PM, Viji Subramanian <
>> Viji.Subramanian@corp.aol.com <ma...@corp.aol.com>>
>> wrote:
>>
>>    Kevin,
>>
>>    How do i override the default container.js..
>>
>>    I need to update the views and parentRelayUrl   ..
>>
>>    looks like i need to update the gadgets.properties as well...      what
>> is the correct way of overriding the properties.. and
>>    including them..
>>
>>    any help is greatly appreciated..
>>
>>    thanks
>>
>>
>>
>

Re: container.js question.

Posted by Viji Subramanian <Vi...@corp.aol.com>.
Re:-  /config/container.js

sorry.. Can i please have a sample few lines of web.xml - so that i 
understand what u are referring here..

The only way I understand this is :-
i can copy the gadgets.properties and call it myown.properties file and 
add mycontainer.js so that containers.default has mycontainer.js as well 
as the default container.js separated by comma..

If I do the above.., in mycontainer.js, do I need to change 
gadgets.container and gadgets.parent.. ? and what should those values be ?..

Thanks..

Kevin Brown wrote:
> The best option is to create your own container configuration and just 
> override the values that you need. Modify web.xml to point to both the 
> base configuration and your own (colon-separated). Shindig will take 
> care of ensuring inheritance works correctly.
>
> On Tue, Jul 1, 2008 at 6:28 PM, Viji Subramanian 
> <Viji.Subramanian@corp.aol.com <ma...@corp.aol.com>> 
> wrote:
>
>     Kevin,
>
>     How do i override the default container.js..
>
>     I need to update the views and parentRelayUrl   ..
>
>     looks like i need to update the gadgets.properties as well...  
>     what is the correct way of overriding the properties.. and
>     including them..
>
>     any help is greatly appreciated..
>
>     thanks
>
>