tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Another doubt about taglibs
Date Fri, 13 Aug 2004 18:45:42 GMT
Thats one way to do it. My prefence is to stuff most of the data that is in 
scriptlets into a single java object, then into the HttpServletRequest (or 
pageContext).

Then the custom tag can query the HttpServletRequest or PageContext. To get 
the dynamic data. It avoids the <%%> hell that you see below.

Another alternative is to use EL with custom tags in tomcat 5. Then
"<%= (request.getParameter( "hdnTypeCTRL" ) != null ) ?
     request.getParameter( "hdnTypeCTRL" ) :"texto" %>"

becomes the slightly less ugly: "${param.hdnTypeCTRL?param.hdnTypeCTRL:'texto'}"

-Tim

Edson Alves Pereira wrote:

> 	Hey dudes, is this the correct way to mixe taglibs with JSP code?
> 
> <panfinance:tab-control>
> 	<panfinance:tab-sheet name="<%= stTitle %>">
> 		<tr>
> 			<th width="20%"><label><%= stTitle %></label></th>
> 			<td><panfinance:variant
> 						name="<%= "ed" + stCtrl %>"
> 						type="<%= (
> request.getParameter( "hdnTypeCTRL" ) != null ) ?
> 	
> request.getParameter( "hdnTypeCTRL" ) :
> 							"texto" %>"
> 						size="<%= (
> request.getParameter( "hdnSizeCTRL" ) != null ) ?
> 							Integer.parseInt(
> request.getParameter( "hdnSizeCTRL" )) :
> 							10 %>"/></td>
> 			<td><button name		="<%= "bt" + stCtrl
> %>"
> 	
> onClick	="onClick_efetuarPesquisa( this );">Pesquisar</button></td>
> 			<td width="60%"></td><tr>
> 	</panfinance:tab-sheet>
> 
> 	Regards,
> 	Edson
> 

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


Mime
View raw message