Re: logic:iterate inside a logic:iterate ??

2003-12-18 Thread Jan Vervecken
try something similar to this

(of course all the Java code to construct the lists should be in (or called by) a 
Struts Action class, so focus on the use of the logic:iterate tag)

--8<loop.jsp--
<%@ page import="java.util.*" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%!
public class Person
{
String fName = null;
LinkedList fEmailList = new LinkedList();
public String getName() { return fName; }
public LinkedList getEmailList() { return fEmailList; }
}
%>
<%
LinkedList vPersonList = new LinkedList();
Person vPerson = new Person();
vPerson.fName = "Jan Vervecken";
vPerson.fEmailList.add("[EMAIL PROTECTED]");
vPerson.fEmailList.add("[EMAIL PROTECTED]");
vPersonList.add(vPerson);
vPerson = new Person();
vPerson.fName = "Genty Jean-Paul";
vPerson.fEmailList.add("[EMAIL PROTECTED]");
vPerson.fEmailList.add("[EMAIL PROTECTED]");
vPerson.fEmailList.add("[EMAIL PROTECTED]");
vPersonList.add(vPerson);
request.setAttribute("personList", vPersonList);
%>




loop


loop


















--8<--

success
-Jan

*** REPLY SEPARATOR  ***

On 12/18/2003 at 6:16 PM gentyjp wrote:

>Hi
>
>  I'am a Struts newbie, sorry if it is a "classic" question.
>
>  My question is about logic:iterate
>
>  I have a vector of documents.
>  In my application a document is a vector of LabelValueBean. I wish to
>write both the label and the value.
>
>  I wish to write all my documents so I iterate through my vector of
>documents.
>But after that how can I iterate through my vector of LabelValueBean ???
>
>Basically here's what I want to do :
>
>for_each_document
>{
> for_each_LabelValueBean_in_the_current_document
> {
>  write LabelValueBean.Label;
>  write LabelValueBean.Value;
> }
>}
>
>thanks for you help
>
>
>   Genty Jean-Paul
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [RE-POST]: HOW TO Use Tiles parameters in Java

2003-10-13 Thread Jan Vervecken
maybe try to put this in pageLayout.jsp






hope this helps
-Jan Vervecken

*** REPLY SEPARATOR  ***

On 10/13/2003 at 5:41 PM Sudip Kumar Bhattacharya(HOTPOP) wrote:

>Hi,
>
>I sent the mail earlier but recieved no reply. So I am posting it again
>with
>more code details.
>
>My login.jsp given below assigns the parameter *pageid* a value of 1001. I
>need to retrieve this pageid value in tile menu.jsp. How can I do that? I
>am
>able to retrieve the pageid parameter in my pageLayout.jsp using
>tiles:useAttribute, but it is not accessible in menu.jsp.
>Can somebody guide me in this??
>
>-login.jsp--
><%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
>
>  
>  
>  
>  
>  
>  
>
>
>
>
>Thanks in advance,
>Sudip
>
>-Original Message-
>From: Sudip Kumar Bhattacharya(HOTPOP) [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 13, 2003 12:21 PM
>To: Struts Users Mailing List
>Subject: Tiles and Java
>
>
>Hi Everybody,
>
>I just wanted to know if I can use the parameters passed to a tile in java
>code? Can someone provide me some sample code which demonstrates this?
>
>To elaborate, I am passing some parameters to a tile. The tile is a JSP
>page
>and in that JSP page I have some java code as well. I would like to access
>the value of the tile parameter in my Java code. That's it!!
>
>Any type of help will be appreciated.
>
>Sudip
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Urgent

2003-01-29 Thread Jan Vervecken
hi

I've recently written a tag that solves these problems and works
together with the html:link tag, see c-html:parameter tag below.


   
 <%=CorsoSId%>
 <%=CorsoSName%>
 <%=CorsoSFacolta%>
 <%=CorsoSCrediti%>
 



Vis. Corsi
Insegn.


   


You can write yours in a similar way.
A tag like this might be a useful Struts tag if you ask me.

succes
-Jan

>>> [EMAIL PROTECTED] 01/29/03 10:57AM >>>
Good day!
I'm new to struts and i need to help..:

   
 <%=CorsoSId%>
 <%=CorsoSName%>
 <%=CorsoSFacolta%>
 <%=CorsoSCrediti%>
 
<%
String url = "corsiIA.do?IDFacolta="+request.getParameter("IDFacolta")
+"&CorsoSId="+CorsoSId;
%>
Vis. Corsi Insegn.

   


where corsoSIter is an customtag that i create for iterate on a
collection 
of "course of study"(i pass it and IDFacolta in the request from my
first 
Action)and IDFacolta is an ID that i need to next jsp.Now i need
to pass to action the CorsoSId(the user's select course from jsp) and
the 
IDFacolta.I tryed to pas an HashMap:
 
HashMap mappaOld=(HashMap)request.getAttribute("mappa");
/*the Attribute mappa contains now only IDFacolta and the next HashMap
i would 
like to contains the IDFacolta and the CorsoSId that my user will
select from 
jsp*/

   
<%=CorsoSId%>
<%=CorsoSName%>
<%=CorsoSFacolta%>
<%=CorsoSCrediti%>

<%
HashMap mappa = new HashMap();
mappa.putAll(mappaOld);
mappa.put(CorsoSId);
pageContext.setAttribute(mappa);
%>
Vis. Insegn.

   


This is corectly,but i create an HashMap for each cycle..i'd like using
only 
one HashMap..it's very heavy using more HashMap for each page in my 
WebApplication...
Plese help me..is very important.
Sorry for the my horrible English.
Thanks in advance
Alessio.

-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: html:errors

2002-07-16 Thread Jan Vervecken

ah ... "Since : Struts 1.1" ... sorry, I checked some older documentation

tnx
-Jan

>>> [EMAIL PROTECTED] 16-07-02 15:39 >>>

Maybe I am misunderstanding you, but the tags I put in below exist 
already (the sample is right out of a working jsp page)




-Original Message-
From: Jan.Vervecken [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 16, 2002 9:27 AM
To: struts-user
Subject: RE: html:errors


Something like this would make Struts more MVC-like I think, more 
flexible toward graphical design.

Has anyone implemented tags that allow for this approach, or is it 
possible with existing Struts tags?

tnx
-Jan

>>> [EMAIL PROTECTED] 11-07-02 16:37 >>>

Like so?







--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:errors

2002-07-16 Thread Jan Vervecken

Something like this would make Struts more MVC-like I think, more flexible toward 
graphical design.

Has anyone implemented tags that allow for this approach, or is it possible with 
existing Struts tags?

tnx
-Jan

>>> [EMAIL PROTECTED] 11-07-02 16:37 >>>

Like so?







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Installation in JDeveloper

2002-07-03 Thread Jan Vervecken

maybe this can help

http://technet.oracle.com/products/jdev/howtos/jsp/StrutsHowTo.html

-Jan

>>> [EMAIL PROTECTED] 03-07-02 19:40 >>>
I am new having tough time in installing Struct in JDeveloper and running my
first JSP page. I would appreciate if any one  can give some info or provide
a link for installtion.
Thanks



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Why would I want to maintain my JSP's in a JSP-SRC directory?

2002-07-03 Thread Jan Vervecken

JV> Maybe to prevent losing your JSP files when you let Ant clean up a previous build?

>Can anyone think of a good reason why I would want to maintain all of my 
>JSP files in a JSP-SRC directory and have ant move them during the 
>compile to a real JSP dir?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: