Re: Custom tag question

2006-04-11 Thread [EMAIL PROTECTED]
The first thing this makes me think of is why don't you just use an iterate
tag over the bean tag. Can you say more about what you are trying to accomplish?

Bryan LaPlante

-- Original Message ---
From: Aladin Alaily <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Mon, 10 Apr 2006 18:26:30 -0400
Subject: Custom tag question

> Hi,
> 
> I have a question pertaining intregrating a custom tags with a struts 
> tag.  I want to know if there exists a "best practise" when trying to do 
> what I'm doing (other than not doing it).
> 
> I am trying to write a custom tag which wraps another tag in the 
> following way:
> 
> HTML Written: 
> 
> Desired Output: "printout" number of  tags
> 
> Code to do it:
> --
> void doStartTag() ... {
>   ...
>   for(int i=0 ; i   BeanTag b = new BeanTag();
>   // Set tag attributes here
>   b.doStartTag();
>   }
>   ...
> }
> 
> Have you guys come across a situation where you had to do something like 
> this?  and if so, what is the best way of creating such a custom tag? 
> Would you use a .tag to produce the effect described above?
> 
> Thanks.
> Aladin
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--- End of Original Message ---

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



Re: Custom tag question

2006-04-10 Thread Aladin Alaily

... with tag files ...

Aladin Alaily wrote:


Hi Dave,

I'm also wary of doing such a thing (hence why I'm posting here) because 
I would essentially be mimicking the servlet container's job.


Now if it's possible to do what I'm trying to with files then I'll give 
that a shot instead.


Thanks.
Aladin


Dave Newton wrote:


Aladin Alaily wrote:


Would you use a .tag to produce the effect described above?




If you mean a JSP 2.0 custom tag written in JSP, then sure. I'd also be
wary of using other custom tags inside a tag like that, although I guess
I've never tried it.

Dave



-
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: Custom tag question

2006-04-10 Thread Aladin Alaily

Hi Dave,

I'm also wary of doing such a thing (hence why I'm posting here) because 
I would essentially be mimicking the servlet container's job.


Now if it's possible to do what I'm trying to with files then I'll give 
that a shot instead.


Thanks.
Aladin


Dave Newton wrote:


Aladin Alaily wrote:


Would you use a .tag to produce the effect described above?



If you mean a JSP 2.0 custom tag written in JSP, then sure. I'd also be
wary of using other custom tags inside a tag like that, although I guess
I've never tried it.

Dave



-
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: Custom tag question

2006-04-10 Thread Dave Newton
Aladin Alaily wrote:
> Would you use a .tag to produce the effect described above?

If you mean a JSP 2.0 custom tag written in JSP, then sure. I'd also be
wary of using other custom tags inside a tag like that, although I guess
I've never tried it.

Dave



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



Custom tag question

2006-04-10 Thread Aladin Alaily

Hi,

I have a question pertaining intregrating a custom tags with a struts 
tag.  I want to know if there exists a "best practise" when trying to do 
what I'm doing (other than not doing it).


I am trying to write a custom tag which wraps another tag in the 
following way:


HTML Written: 

Desired Output: "printout" number of  tags

Code to do it:
--
void doStartTag() ... {
...
for(int i=0 ; iHave you guys come across a situation where you had to do something like 
this?  and if so, what is the best way of creating such a custom tag? 
Would you use a .tag to produce the effect described above?


Thanks.
Aladin



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



POSSIBLE OT: localised hashtable custom tag question

2004-08-01 Thread Bryan Hunt
Ok here's the scenario 
My (opensource) application is going to be available in the users
language.
All my struts localisation stuff is working fine, all the labels and
stuff are stored in property files etc.
I am using hibernate for persistance.
JSTL does not allow you to call functions on objects.
It only allows you to access the properties of beans. ie you cannot
do ${object.getDesctription("fr")}
One of my hibernate POJO's house has got a hash of descriptions inside it.
The descriptions are going to be referenced by java.util.Locale objects
The reason is so that the description of the house itself is going to be 
localised.

--
So what I want to do is either create or use a tag which will allow me 
to do the
following.


or



The tag will then access the struts session and see what Locale the 
person is
using.

If there is a description that matches that locale it will be outputted ,
if not the description matching the default locale will be used.
Perhaps I am looking in completely the wrong direction.
If I am being stupid here please feel free to alert me
I've been trying to decide the best approach for about 2 weeks.
I don't really think this belongs in the DAO or hibernate layers
as it is kinda a presentation issue.
Is anyone else working with something similar ? Or do I have to
build up a tag lib from scratch ?
Thanks
Bryan

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


Re: OFF Topic -- beginner's custom tag question

2004-03-30 Thread Craig McClanahan
Bender, James wrote:

I am new to Custom tags and am totally confused that "A" works and "B"
doesn't (below).  I'm looking for a way to make "B" work if possible, so I
don't have to use a scriptlet or declaration to keep my presentation code
cleaner.  Is this possible?  Thanks!
A:
<%
String searchTitle = request.getAttribute("searchTitle").toString();
%>

B:
">
	error thrown: 

	JSPG0069E: Attribute searchTitle has no value' 

 

In your "B" caes you're trying to nest double quotes inside double 
quotes, which is not valid syntax.  change the outer set to single 
quotes and this should work fine.

Craig

Thanks again!,

Jim

-Original Message-
From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 2:44 PM
To: [EMAIL PROTECTED]
Subject: Re: OFF-TOPIC - Paging Results
A question that I wondered for long. AFAIK, there are 2 paging policies:

- paging in app server memory, in session scope to enable paging in 
clustered environments, or

- paging in dababase, using scrollable resulsets or related.

I guess, paging in app server, can overload server memory if query results 
are long, so database paging should be better, in such a cases. However, I 
do not know if state of arts in database paging is technologically ready.

I would appreciate comments further on this first impressions.

Regards,

Adolfo.







 

From: Craig McClanahan <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
CC: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: Re: OFF-TOPIC - Paging Results
Date: Tue, 30 Mar 2004 10:01:07 -0800
Joao Batistella wrote:

   

Hello!

Sorry for the off-topic message.

I would like to know if you recommend any good component for paging 
results
and presenting it in a JSP page. I'm using struts, so if you know a
component that integrates well with struts, that's perfect.

Thanks for your help.



 

For working directly with Struts, Matt Raible's display tag is quite 
popular.

http://displaytag.sourceforge.net

If you are using the JavaServer Faces integration library with Struts, the 
standard  component handles paging quite nicely.  In addition,
   

 

it lets you do input fields in the table, not just output.

http://java.sun.com/j2ee/javaserverfaces/
http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/
Craig

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

_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail transmission contains information that is confidential and may be privileged.   It is intended only for the addressee(s) named above. If you receive this e-mail in error, please do not read, copy or disseminate it in any manner. If you are not the intended recipient, any disclosure, copying, distribution or use of the contents of this information is prohibited. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please erase it from your computer system. Your assistance in correcting this error is appreciated.

-
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]


OFF Topic -- beginner's custom tag question

2004-03-30 Thread Bender, James
I am new to Custom tags and am totally confused that "A" works and "B"
doesn't (below).  I'm looking for a way to make "B" work if possible, so I
don't have to use a scriptlet or declaration to keep my presentation code
cleaner.  Is this possible?  Thanks!

A:
<%
String searchTitle = request.getAttribute("searchTitle").toString();
%>


B:
">

error thrown: 

JSPG0069E: Attribute searchTitle has no value' 

Thanks again!,

Jim


-Original Message-
From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 2:44 PM
To: [EMAIL PROTECTED]
Subject: Re: OFF-TOPIC - Paging Results


A question that I wondered for long. AFAIK, there are 2 paging policies:

- paging in app server memory, in session scope to enable paging in 
clustered environments, or

- paging in dababase, using scrollable resulsets or related.

I guess, paging in app server, can overload server memory if query results 
are long, so database paging should be better, in such a cases. However, I 
do not know if state of arts in database paging is technologically ready.

I would appreciate comments further on this first impressions.

Regards,

Adolfo.







>From: Craig McClanahan <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: Struts Users Mailing List <[EMAIL PROTECTED]>
>CC: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: Re: OFF-TOPIC - Paging Results
>Date: Tue, 30 Mar 2004 10:01:07 -0800
>
>Joao Batistella wrote:
>
>>Hello!
>>
>>Sorry for the off-topic message.
>>
>>I would like to know if you recommend any good component for paging 
>>results
>>and presenting it in a JSP page. I'm using struts, so if you know a
>>component that integrates well with struts, that's perfect.
>>
>>Thanks for your help.
>>
>>
>>
>For working directly with Struts, Matt Raible's display tag is quite 
>popular.
>
>  http://displaytag.sourceforge.net
>
>If you are using the JavaServer Faces integration library with Struts, the 
>standard  component handles paging quite nicely.  In addition,

>it lets you do input fields in the table, not just output.
>
>  http://java.sun.com/j2ee/javaserverfaces/
>  http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/
>
>Craig
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


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


This e-mail transmission contains information that is confidential and may be 
privileged.   It is intended only for the addressee(s) named above. If you receive 
this e-mail in error, please do not read, copy or disseminate it in any manner. If you 
are not the intended recipient, any disclosure, copying, distribution or use of the 
contents of this information is prohibited. Please reply to the message immediately by 
informing the sender that the message was misdirected. After replying, please erase it 
from your computer system. Your assistance in correcting this error is appreciated.

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