You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pancham Singh <pa...@gmail.com> on 2007/04/01 19:36:18 UTC

Struts AJAX tags not working in light portal

I am trying to use struts portlet example along with light portal, an AJAX
based portlet container which uses Rico and Prototype to load contents of
individual portlets. The struts ajax tags use dojo, wheare as ligh portal
which loads contents of my portlet uses Rico + Prototype. My portlet content
does not display properly, essentially dojo widgets are not displayed. I am
using the formExample portlet sample and when I click AjaxExample link, the
tabbedpane is not displayed. Instead, all the divs are displayed one after
the other.

When light portal loads the contents, it does execute the dojo.require calls
in the script (struts tags emit those). This is done under the covers by
prototype framework. In response to dojo.require calls the relevant .js
files such as {TabContainer.js, LinkContainer.js...} are also downloaded by
dojo framework. However, individual widget template and css files are never
loaded (as revealed by debugging with FireBug). As an example,
TabContainer.js file has TabContainer.html and TabContainer.css as the
template and CSS files respectively. These files are never loaded and the
widget is not displayed properly.
Any suggestions on what could be wrong and what I need to do differently?
Light Portal uses Prototype 1.4.0 and Rico 1.1.1. I have also tried it with
Prototype 1.5.0 without any success.

Note: To make the sample work, I had to move "<s:head theme="ajax" />" line
from ajaxExample.jsp file so that right script files could be included.
Otherwise, prototype framework was stripping those out.

Thanks.

Re: Struts AJAX tags not working in light portal

Posted by Pancham Singh <pa...@gmail.com>.
I have tried application with straight dojo and it works - there are no
issues, I run into this issue only when I am using it along with Light
Portal which uses Rico and Prototype to load  portlet contents.

On 4/1/07, Musachy Barroso <mu...@gmail.com> wrote:
>
> I'd suggest trying to get your app running using Dojo directly first (to
> make sure that everything works), and then start using the AJAX tags, I
> think you will have the same problems if you try straight Dojo.
>
> musachy
>
> On 4/1/07, Pancham Singh <pa...@gmail.com> wrote:
> >
> > I am trying to use struts portlet example along with light portal, an
> AJAX
> > based portlet container which uses Rico and Prototype to load contents
> of
> > individual portlets. The struts ajax tags use dojo, wheare as ligh
> portal
> > which loads contents of my portlet uses Rico + Prototype. My portlet
> > content
> > does not display properly, essentially dojo widgets are not displayed. I
> > am
> > using the formExample portlet sample and when I click AjaxExample link,
> > the
> > tabbedpane is not displayed. Instead, all the divs are displayed one
> after
> > the other.
> >
> > When light portal loads the contents, it does execute the
> dojo.requirecalls
> > in the script (struts tags emit those). This is done under the covers by
> > prototype framework. In response to dojo.require calls the relevant .js
> > files such as {TabContainer.js, LinkContainer.js...} are also downloaded
> > by
> > dojo framework. However, individual widget template and css files are
> > never
> > loaded (as revealed by debugging with FireBug). As an example,
> > TabContainer.js file has TabContainer.html and TabContainer.css as the
> > template and CSS files respectively. These files are never loaded and
> the
> > widget is not displayed properly.
> > Any suggestions on what could be wrong and what I need to do
> differently?
> > Light Portal uses Prototype 1.4.0 and Rico 1.1.1. I have also tried it
> > with
> > Prototype 1.5.0 without any success.
> >
> > Note: To make the sample work, I had to move "<s:head theme="ajax" />"
> > line
> > from ajaxExample.jsp file so that right script files could be included.
> > Otherwise, prototype framework was stripping those out.
> >
> > Thanks.
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>

Re: Struts AJAX tags not working in light portal

Posted by Musachy Barroso <mu...@gmail.com>.
I'd suggest trying to get your app running using Dojo directly first (to
make sure that everything works), and then start using the AJAX tags, I
think you will have the same problems if you try straight Dojo.

musachy

On 4/1/07, Pancham Singh <pa...@gmail.com> wrote:
>
> I am trying to use struts portlet example along with light portal, an AJAX
> based portlet container which uses Rico and Prototype to load contents of
> individual portlets. The struts ajax tags use dojo, wheare as ligh portal
> which loads contents of my portlet uses Rico + Prototype. My portlet
> content
> does not display properly, essentially dojo widgets are not displayed. I
> am
> using the formExample portlet sample and when I click AjaxExample link,
> the
> tabbedpane is not displayed. Instead, all the divs are displayed one after
> the other.
>
> When light portal loads the contents, it does execute the dojo.requirecalls
> in the script (struts tags emit those). This is done under the covers by
> prototype framework. In response to dojo.require calls the relevant .js
> files such as {TabContainer.js, LinkContainer.js...} are also downloaded
> by
> dojo framework. However, individual widget template and css files are
> never
> loaded (as revealed by debugging with FireBug). As an example,
> TabContainer.js file has TabContainer.html and TabContainer.css as the
> template and CSS files respectively. These files are never loaded and the
> widget is not displayed properly.
> Any suggestions on what could be wrong and what I need to do differently?
> Light Portal uses Prototype 1.4.0 and Rico 1.1.1. I have also tried it
> with
> Prototype 1.5.0 without any success.
>
> Note: To make the sample work, I had to move "<s:head theme="ajax" />"
> line
> from ajaxExample.jsp file so that right script files could be included.
> Otherwise, prototype framework was stripping those out.
>
> Thanks.
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Re: Iterator Problem: how to get the changed values ?

Posted by Dave Newton <ne...@yahoo.com>.
--- Syed Ibrahim <sy...@paradyne.co.in> wrote:
> I am using iterator to list some values in textfilds
> in tabular format, following way.
> 
> <s:iterator value="myList">
> 	<s:properties value="Id"/>	
> 	<s:textfield value="%{name}"
> </s:iterator>
> 
> How can I achieve that in Struts 2 ?

You should be able to just make myList be something
List-y (and if you use generics I don't think you need
to do anything w/ the conversion properties file) and
use the status.index to create array-ish property
names.

<s:iterator value="beanList" status="stat">
  <s:textfield name="beanList[%{stat.index}].propName"
/>
</s:iterator>

(Or something like that; I don't have any of my code
in front of me, but hopefully that's enough to get you
started :/

See:

http://struts.apache.org/2.x/docs/type-conversion.html

d.



 
____________________________________________________________________________________
Don't get soaked.  Take a quick peek at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Iterator Problem: how to get the changed values ?

Posted by Syed Ibrahim <sy...@paradyne.co.in>.
Hi,

I am using iterator to list some values in textfilds in tabular format,
following way.

<s:iterator value="myList">
	<s:properties value="Id"/>	
	<s:textfield value="%{name}"
</s:iterator>


Here "myList" is a Arraylist and contains a bean(say TestBean) with two
attributes Id and name. Id is displayed as text and Name is displayed in
textfields.

Now if user changes the values of the names in the iterated textfields, I
need to get all the values back in the "myList" so that I can have it in the
ActionSupport class to process further.

It was possible in Struts 1.x

How can I achieve that in Struts 2 ?

Thanks in advance

Ibrahim.....



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org