You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lucas Bern <lu...@yahoo.com.ar> on 2005/08/18 15:39:29 UTC

Struts and Laszlo

Hia guys...

I´would it be a nosense to integrate Laszlo with struts???

I think Laszlo is responsible for controlling the application, so, may be we can hav struts incharge of generating data in XML format so that Laszlo presentation server show it???

I´m thinking of extending struts so that its output be XML for laszlo (or who ever), abstracting it form HTML...

am I making a mountain from a stone ...

I mean, a servlet would be enough???

Luc

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

Re: Struts and Laszlo

Posted by "C.F. Scheidecker Antunes" <na...@antunes.eti.br>.
Luc,

I have designed Laszlo applications having both PHP and Servlets as 
controllers.
It worked great and your idea is right on.
In fact I am starting a Struts/Laszlo app pretty soon.
Have in mind that Laszlo is the View of the MVC model.
I understand that you can also use Laszlo as the controler.
But I had a project done for School with laszlo and Servlets and the way 
I've used Laszlo was to
act as the view model and do browser validation as you can have 
Javascript with Laszlo.
Other than that all the logic and interaction with the business layer 
were done by my servlets.
With Struts the principle is the same.

Keep in mind one thing for Laszlo. Even if you only post data to your 
Struts action you have to return some
sort of xml structure or your Laszlo app will crash.
Something like:
<result>
<status>success</status>
</result>
or <result status="success"/>

Basicaly instead of having a JSP front end you will have a Laszlo front end.
However programming it with Laszlo is more like doing a GUI app with 
events and all other
than a CGI application.

good luck Luc

Lucas Bern wrote:

>Hia guys...
>
>I´would it be a nosense to integrate Laszlo with struts???
>
>I think Laszlo is responsible for controlling the application, so, may be we can hav struts incharge of generating data in XML format so that Laszlo presentation server show it???
>
>I´m thinking of extending struts so that its output be XML for laszlo (or who ever), abstracting it form HTML...
>
>am I making a mountain from a stone ...
>
>I mean, a servlet would be enough???
>
>Luc
>
>__________________________________________________
>Correo Yahoo!
>Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
>¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
>  
>

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


Re: How can I refer a control in javascript which hava a "." in its name

Posted by Jeff Beal <jb...@gmail.com>.
You also have the option of doing document.form[0]['myobject.subobject']. 

On 8/18/05, BHansard@powersystems.rockwell.com
<BH...@powersystems.rockwell.com> wrote:
>  
> 
>  <html:text name="myForm"
>  property="myobject.subobject" styleId="subobject" .../>
>  
>  then get the field by using
>  
>  document.getElementById("subobject");
>  
>  
>  Tony Smith <qu...@yahoo.com>
>  
>  
>    
>  
>  
>  
>  
> Tony Smith <qu...@yahoo.com>  
> 
> 08/18/2005 01:07 PM  
> 
> Please respond to
>  "Struts Users Mailing List" <us...@struts.apache.org>        
> 
>  
> To
>  Struts Users Mailing List <us...@struts.apache.org>  
> 
>  
> cc
>    
> 
>  
> Subject
>  How can I refer a control  in javascript which hava a "." in its name    
>    
>  
>  Hi everyone:
>  
>  Here is my jsp:
>  
>  <html:form>
>    ...
>     <html:select ... onChange="change(this)">
>  ...
>  
>     </html:select>
>  
>     <html:text name="myForm"
>  property="myobject.subobject" .../>
>  
>  
>  </html:form>
>  
>  If user change the selection in the "select", I would
>  like to change the content of the "text". Thus, I
>  write my change() function in javascript:
>  
>  <script language="javascript">
>  
>  function change(select){
>  
>      document.form[0].myobject.subobject =
>  select.options[select.selectedIndex];
>  }
>  
>  But looks like this does not work. The problem is the
>  name of the "text". In the html it is
>  "myobject.subobject". But seems that javascript does
>  not take that....
>  
>  How can I refer the "text" in javascript?
>  
>  Thanks,
>  
>  
>  
>  
>  		 		 
>  ____________________________________________________
>  Start your day with Yahoo! - make it your home page 
>  http://www.yahoo.com/r/hs 
>   
>  
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>  For additional commands, e-mail: user-help@struts.apache.org
>  
>  
>    
> 
>

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


Re: How can I refer a control in javascript which hava a "." in its name

Posted by BH...@powersystems.rockwell.com.
 <html:text name="myForm"
property="myobject.subobject" styleId="subobject" .../>

then get the field by using

document.getElementById("subobject");




                                                                           
             Tony Smith                                                    
             <quickcur@yahoo.c                                             
             om>                                                        To 
                                       Struts Users Mailing List           
             08/18/2005 01:07          <us...@struts.apache.org>            
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         How can I refer a control  in       
               "Struts Users           javascript which hava a "." in its  
               Mailing List"           name                                
             <user@struts.apac                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           




Hi everyone:

Here is my jsp:

<html:form>
  ...
   <html:select ... onChange="change(this)">
...

   </html:select>

   <html:text name="myForm"
property="myobject.subobject" .../>


</html:form>

If user change the selection in the "select", I would
like to change the content of the "text". Thus, I
write my change() function in javascript:

<script language="javascript">

function change(select){

    document.form[0].myobject.subobject =
select.options[select.selectedIndex];
}

But looks like this does not work. The problem is the
name of the "text". In the html it is
"myobject.subobject". But seems that javascript does
not take that....

How can I refer the "text" in javascript?

Thanks,





____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


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


How can I refer a control in javascript which hava a "." in its name

Posted by Tony Smith <qu...@yahoo.com>.
Hi everyone:

Here is my jsp:

<html:form>
  ...
   <html:select ... onChange="change(this)">
...

   </html:select>

   <html:text name="myForm"
property="myobject.subobject" .../>


</html:form>

If user change the selection in the "select", I would
like to change the content of the "text". Thus, I
write my change() function in javascript:

<script language="javascript">

function change(select){

    document.form[0].myobject.subobject =
select.options[select.selectedIndex];
}

But looks like this does not work. The problem is the
name of the "text". In the html it is
"myobject.subobject". But seems that javascript does
not take that....

How can I refer the "text" in javascript?

Thanks,




		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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


Re: Struts and Laszlo

Posted by Guillaume Lederrey <gu...@gmail.com>.
On 8/18/05, Lucas Bern <lu...@yahoo.com.ar> wrote:
> I´would it be a nosense to integrate Laszlo with struts???

  Not a complete non-sense, but maybe an overkill ...

> I think Laszlo is responsible for controlling the application, so, may be we can hav struts incharge of generating data in XML format so that Laszlo presentation server show it???

  Struts is great for the controller model it provides. If you develop
a Laszlo application, Laszlo will probably take the role of the
controller (at least that's how I would do it). The the server side
should only serve stateless XML data. That's pretty easy to do with
whatever technology.

> I´m thinking of extending struts so that its output be XML for laszlo (or who ever), abstracting it form HTML...
> 
> am I making a mountain from a stone ...

  More or less yes. There's not much HTML dependant in Struts. I would
say that the tag libs are the only really HTML dependant parts of
Struts. And it's pretty easy to output XML with just the JSTL ...

> I mean, a servlet would be enough???

  Yo uhave to think at which parts of Struts will be usefull for you.
The input checking forms are probably usefull, the taglibs probably
not ...

  I hope that helps a bit ...

     Guillaume

PS : I've worked with Laszlo for a few month before abandoning it and
coming back to Struts (with the help of AndroMDA - team.andromda.org).
There was too many problems with memory management, asynchronous
execution ...  be carefull !

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


Re: Struts and Laszlo

Posted by BH...@powersystems.rockwell.com.
I am not sure I follow what you are wanting to do.  You can already return
data in XML from struts.  It is all in how you create your output.  You can
return XML in the response.  As for presentation, Struts is primarily a
controller framework.  You can implement any model or view structure you
wish.  I have used Struts with XML so that I can generate HTML, PDF, or
Excel reports through XML:FO many times.




                                                                           
             Lucas Bern                                                    
             <lucjb@yahoo.com.                                             
             ar>                                                        To 
                                       Struts Users Mailing List           
             08/18/2005 10:39          <us...@struts.apache.org>            
             AM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Struts and Laszlo                   
               "Struts Users                                               
               Mailing List"                                               
             <user@struts.apac                                             
                  he.org>                                                  
                                                                           
                                                                           





Hia guys...

I´would it be a nosense to integrate Laszlo with struts???

I think Laszlo is responsible for controlling the application, so, may be
we can hav struts incharge of generating data in XML format so that Laszlo
presentation server show it???

I´m thinking of extending struts so that its output be XML for laszlo (or
who ever), abstracting it form HTML...

am I making a mountain from a stone ...

I mean, a servlet would be enough???

Luc

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar