H:panelGrid and td tag attributes

Hi,
I am using h:panelGrid for a static table with just 2 columns and a few rows. My UI designer created two styles for alternating rows. I added following to the panelGrid:
rowClasses="rowbg1, rowbg2".
The UI designer does not like the fact that those two styles are added to the tr tag instead of td tag in the generated html code. He wants me to add those to the td tag and add a width= attribute to td tag as well. I could not figure out a way to add the styles to the td tag. If I add the styles to panelGroup, it will be added to the span tag in html code. Anybody has any suggestion?
Thanks!
yydd

The columnClasses attribute of <h:panelGrid> will affect the <td> tag, however, you may not be able to get the effect you want using it.
The simplest approach is to build the table using HTML inline with your JSF view.

Similar Messages

  • Repeating Regions and Editable Tag Attributes?

    I want to produce a template that will let users create pages
    that list items as a thumbnail image and a short text description,
    one after the other.
    I can set this up as a repeating region, but I would also
    like to make only certain attributes of the image editable (src and
    alt for example). However, when I use editable tag attributes to do
    this, the image in each repeated region ends up with the same
    attribute values - when I add a new repeat region and then change
    the src tag through the Template Properties dialog,
    all of the images take on the same src value. Looking at the
    code, it looks like the editable instances in each repeated region
    get the same name, and so I can see that DW will get confused.
    Is this a limitation in DW? Is there a work around anyone can
    suggest?
    TIA

    So, you have some number of people who are editing the child
    pages and you
    want to constrain their editing choices? Are you using
    Contribute?
    Anyhow, I am not aware of any convenient way you can do
    something like this
    using DW's Template features.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "manicbananic" <[email protected]> wrote in
    message
    news:g7pimq$fvg$[email protected]..
    >I want to produce a template that will let users create
    pages that list
    >items
    > as a thumbnail image and a short text description, one
    after the other.
    >
    > I can set this up as a repeating region, but I would
    also like to make
    > only
    > certain attributes of the image editable (src and alt
    for example).
    > However,
    > when I use editable tag attributes to do this, the image
    in each repeated
    > region ends up with the same attribute values - when I
    add a new repeat
    > region
    > and then change the src tag through the Template
    Properties dialog,
    >
    all
    > of the images take on the same src value. Looking at the
    code, it looks
    > like
    > the editable instances in each repeated region get the
    same name, and so I
    > can
    > see that DW will get confused.
    >
    > Is this a limitation in DW? Is there a work around
    anyone can suggest?
    >
    > TIA
    >

  • XML Parsing with Java - Only some attributes have start and end tags

    Hello,
    I am trying to interpret the XML response from a server after a HTTP request is sent to it. I have modified an example off Wikipedia below to give an example of what it looks like.
    Example XML:
    <Asset name="bread" prep_time="5 mins" cook_time="3 hours">
    <Attribute name="Ingredient: ">Flour</Attribute>
    <Attribute name="Ingredient: ">Water</Attribute>
    <Attribute name="Used in Recipes:" />
    </recipe>
    I have been trying to display the above XML in a format such as:
    name: bread prep_time: 5 mins cook_time: 3 hours
    Ingredient: Flour
    Ingredient: Water
    Used in Recipes:
    Right now I have been trying to do it manually using indexOf and substring of the XML text, but I would like to find a better way of doing this. I have found some examples online that show had to deal with cases such as
    <person>
    <first>Kiran</first>
    <last>Pai</last>
    <age>22</age>
    </person>
    but I do not know what to do when I encounter something like the last item, when there are no "Used in Recipe" items, and it ends with a />, instead of an ending tag </Attribute>.
    Are there any suggestions as to how to handle the example XML code that I have posted?
    Any help would be appreciated. Thanks.

    jtahlborn wrote:
    Tolls wrote:
    I suppose so, but since the idea is to turn it into text in a different format, XSLT strikes me as a better fit than hand crafting it.i agree if the end goal is formatted text. however, i wasn't sure if the OP was just writing some test code to figure out how to access the data or if the formatted text was the final desired output.No, true. It is open to interpretation.
    jschell wrote:
    (Quoting the same bit)
    As long as one is mindful of the potential performance and maintenance impacts of course.Again, it depends what he's doing...true. I was making some assumptions, since (as usual) we don't really know the requirements beyond a base technical one (ie "I have this, and I need it to look like this"). In general, though, if you have XML data and you need it formatted differently then I'd say your first port of call ought to be transformation.
    As for maintenance, I'd say it's easier to maintain a stylesheet than to modify Java, which is why I say it ought to be the start point.
    Of course, YMMV.

  • Struts2 and Tiles2 - Error executing tag: Attribute 'title' not found.

    I keep getting Error executing tag: Attribute 'title' not found when I go to the baseLayout.jsp page. I am figuring it is not seeing the tiles.xml file, but I have placed it in the /WEB-INF directory like every web page I have found says too. Any help or pointers would be appreciated.
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Error executing tag: Attribute 'title' not found.
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)I am using maven to load my dependency, so here are the version numbers.
            <dependency>
              <groupId>org.apache.struts</groupId>
              <artifactId>struts2-core</artifactId>
              <version>2.2.1</version>
         </dependency>
         <dependency>
              <groupId>org.apache.struts</groupId>
              <artifactId>struts2-tiles-plugin</artifactId>
              <version>2.2.1</version>
         </dependency>
            <dependency>
              <groupId>log4j</groupId>
              <artifactId>log4j</artifactId>
              <version>1.2.16</version>
         </dependency>
            <dependency>
              <groupId>jboss</groupId>
              <artifactId>javassist</artifactId>
              <version>3.1</version>
         </dependency>Struts.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts>
         <constant name="struts.enable.DynamicMethodInvocation"
              value="false" />
         <constant name="struts.devMode" value="false" />
         <constant name="struts.custom.i18n.resources"
              value="forum" />
         <package name="default" namespace="/" extends="struts-default">
              <result-types>
                   <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
              </result-types>
              <action name="login" class="net.game_tech.LoginAction">
                   <result name="success" type="tiles">/login.success.tiles</result>
                   <result name="error" type="tiles">/login.tiles</result>
              </action>
              <action name="login-form">
                   <result name="success" type="tiles">/login.tiles</result>
              </action>
         </package>
    </struts>web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         id="WebApp_ID" version="2.5">
         <display-name>Forum</display-name>
         <listener>
              <listener-class>
                   org.apache.struts2.tiles.StrutsTilesListener
              </listener-class>
         </listener>
         <context-param>
              <param-name>tilesDefinitions</param-name>
              <param-value>/WEB-INF/tiles.xml</param-value>
         </context-param>
         <filter>
              <filter-name>struts2</filter-name>
              <filter-class>
                   org.apache.struts2.dispatcher.FilterDispatcher
              </filter-class>
         </filter>
         <filter-mapping>
              <filter-name>struts2</filter-name>
              <url-pattern>/*</url-pattern>
         </filter-mapping>
         <welcome-file-list>
              <welcome-file>index.jsp</welcome-file>
         </welcome-file-list>
         <resource-ref>
              <description>Mysql Forum</description>
              <res-ref-name>jdbc/Forum</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
              <res-sharing-scope>Shareable</res-sharing-scope>
         </resource-ref>
    </web-app>tiles.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE tiles-definitions PUBLIC
           "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
           "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
    <tiles-definitions>
         <definition name="baseLayout" template="/baseLayout.jsp">
              <put-attribute name="title" value="Simple Java Forums" />
              <put-attribute name="header" value="/common/Header.jsp" />
              <put-attribute name="menu" value="/common/MenuNav.jsp" />
              <put-attribute name="body" value="" />
              <put-attribute name="footer" value="/common/Footer.jsp" />
         </definition>
         <definition name="/login.tiles" extends="baseLayout">
              <put-attribute name="header" value="/pvt/Login.jsp" />
         </definition>
         <definition name="/login.success.tiles" extends="baseLayout">
              <put-attribute name="header" value="/pvt/Welcome.jsp" />
         </definition>
    </tiles-definitions>baseLayout.jsp
    <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
         <title><tiles:insertAttribute name="title" /></title>
         <link href="css/main.css" rel="stylesheet" type="text/css" media="all"/>
    </head>
    <body>
         <div id="page">
              <tiles:insertAttribute name="header" />
              <tiles:insertAttribute name="menu" />
              <tiles:insertAttribute name="body" />
              <tiles:insertAttribute name="footer" />
         </div>
    </body>
    </html>

    I was playing around with it some more and was trying to follow this page:
    http://www.vaannila.com/struts-2/struts-2-example/struts-2-tiles-example-1.html
    I made sure I had the same jar versions. I still get the same exception in the Browser, but I get a few more log messages in the tomcat log;
    Obviously I have something configured wrong. I'll see what searching brings up, and of course any help would be appreciated.
    2010-08-24 10:30:59,885 DEBUG com.opensymphony.xwork2.config.ConfigurationManager.debug:57 - Checking ConfigurationProviders for reload.
    2010-08-24 10:30:59,920 DEBUG com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:57 - Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@4ba76eff], property=struts]
    2010-08-24 10:30:59,956 WARN  com.opensymphony.xwork2.ognl.OgnlValueStack.warn:45 - Could not find property [struts.actionMapping]
    2010-08-24 10:30:59,957 DEBUG com.opensymphony.xwork2.config.ConfigurationManager.debug:57 - Checking ConfigurationProviders for reload.
    2010-08-24 10:30:59,967 DEBUG com.opensymphony.xwork2.config.ConfigurationManager.debug:57 - Checking ConfigurationProviders for reload.
    2010-08-24 10:30:59,969 DEBUG com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:57 - Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@4ba76eff], property=org]
    2010-08-24 10:30:59,969 WARN  com.opensymphony.xwork2.ognl.OgnlValueStack.warn:45 - Could not find property [org.apache.catalina.jsp_file]
    2010-08-24 10:31:00,089 DEBUG com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:57 - Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@4ba76eff], property=org]
    2010-08-24 10:31:00,089 WARN  com.opensymphony.xwork2.ognl.OgnlValueStack.warn:45 - Could not find property [org.apache.tiles.servlet.context.ServletTilesRequestContext.CURRENT_CONTAINER_KEY]
    2010-08-24 10:31:00,099 DEBUG com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:57 - Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@4ba76eff], property=org]
    2010-08-24 10:31:00,100 WARN  com.opensymphony.xwork2.ognl.OgnlValueStack.warn:45 - Could not find property [org.apache.tiles.AttributeContext.STACK]
    2010-08-24 10:31:00,100 DEBUG com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler.debug:57 - Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@4ba76eff], property=org]
    2010-08-24 10:31:00,100 WARN  com.opensymphony.xwork2.ognl.OgnlValueStack.warn:45 - Could not find property [org.apache.tiles.AttributeContext.STACK]
    Aug 24, 2010 10:31:00 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    org.apache.tiles.jsp.taglib.NoSuchAttributeException: Attribute 'title' not found.

  • How to get and set custom tag attributes

    How do i get and set custom tag attributes from a jsp page?

    Not sure if this is what your looking for, but....
    example...
    < taglibprefix:testtag attribute1="x" attribute2="y">
    ...of course, the attributes have to be defined in your taglib (.tld) file

  • Variable Substitution with tag attribute

    Hi,
    is possible to use variable substitution with tag attribute? as follow:
    <root directory="xxx"  filename="yyy">
       <....
    </root>
    using variable substitution for directory : root,1,directory,1
                                                               root,1,filename,1

    Hi,
    I solved my problem using Dynamic Configuration to set the FileName and Directory fields in Adapter Specific Configuration. To use Variable Substitution only accept element in XML.
    Thanks for all.

  • Unable to Deploy WAR file  (Unknown assembly root-tag attribute: version)

    Hello,
    I created a simple web application with eclipse + tomcat plugin + struts2 (JPA Spring Hibernate ) and created the WAR file using the tomcat plugin compiler. When I deploy the war file into Tomcat 6 the file is deployed properly and i can view the website properly. But when I try to deploy the the WAR file from Oracle 9i Application Server I get the following error.
    Failed to deploy web application "mytest". Nested exception Root Cause: Error loading web-app 'mytest' at C:\ora9ias\j2ee\MySystem\applications\mytest\mytest: Unknown assembly root-tag attribute: version; nested exception is: java.lang.InstantiationException: Error loading web-app 'SFPD' at C:\ora9ias\j2ee\MySystem\applications\mytest\mytest: Unknown assembly root-tag attribute: version.
    My Current web.xml is this.
    <?xml version="1.0" ?>
    <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>My Test Project System</display-name>
    <filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    <listener>
    <listener-class>
    org.springframework.web.context.ContextLoaderListener
    </listener-class>
    </listener>
    </web-app>
    thanks in advance,

    Thanks for the reply sasesha,
    I've changed my web.xml to
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
         "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>     
         <display-name>My Test Project System</display-name>
         <filter>
              <filter-name>struts2</filter-name>
              <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
         </filter>
         <filter-mapping>
              <filter-name>struts2</filter-name>
              <url-pattern>/*</url-pattern>
         </filter-mapping>
         <listener>
              <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
         </listener>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
         </welcome-file-list>
    </web-app>
    During the initial upload the previous error doesn't show anymore, however, I'm getting this new error and currently I'm a bit at a loss since i included the spring.jar library file in my war file. I tried the new war file in Tomcat and the war file deploys fine. Am I missing a configuration or setup ?
    Failed to deploy web application "mytest". Nested exception Root Cause: Class not found: org.springframework.beans.factory.BeanDefinitionStoreException; nested exception is: java.lang.ClassNotFoundException: org.springframework.beans.factory.BeanDefinitionStoreException. Class not found: org.springframework.beans.factory.BeanDefinitionStoreException; nested exception is: java.lang.ClassNotFoundException: org.springframework.beans.factory.BeanDefinitionStoreException
    Thanks again,
    sethsera

  • How to tag attribute member with standard dimension member in EIS

    hi,
    would any one please help me how to tag attribute member with standard dimension member in EIS
    THANK U IN ADVANCE

    In your OLAP model, view columns for the base dimension table. Go into the column properties and for the columns that have Attribute values highlight them and click the Attribute button.
    Go into Metadata Model and those fields will be available to drag into your outline as attribute members.
    Once in the outline, go into the properties of the attribute and assign the level of the base dimension they associate with.

  • JSP ${} expressions in JSF tag attributes

    Does anyone know why the expert group decided not to allow ${} style expressions within JSF tag attributes? I understand that a different syntax is needed to implement the 'late binding' #{} expressions used to link input controls to form beans, but not why the JSF tags actually prevent the use of immediately evaluated ${} expressions for accessing variables in the page scope in JSP 2.0.
    I know there has been a lot of discussion about this and other threads mention a security loophole that would be opened up by allowing expressions like #{blah.${someProperty}}, but I'm not sure why this sort of thing would cause a problem. Is there any way to enable this behaviour, such as editing the JSF tag library descriptors to allow runtime expressions (horrible though that sounds)? Or perhaps another JSF implementation that supports both immediately evaluated and late-binding expressions? It seems a rather unnecessary restriction that is going to cause much confusion and mistyping for all...
    Thanks in advance,
    Keith.

    Thanks Adam, I see the problem now. It's a fairly obscure loophole but serious nonetheless. Of course, this problem could also be avoided by not using request parameters within JSF tags as it doesn't affect the majority of legitimate uses for expressions.
    I have to disagree with you about mixing ${} and #{} expressions though. The majority of developers will be used to writing ${} expressions in JSTL and JSP text and so will expect them to do work the same in JSF tags. Judging by the number of posts in this forum about being unable to use page scope variables in JSF tags this issue is already confusing a lot of people.
    As a rule of thumb, "use ${} for expressions that are output to the page and #{} for binding controls to backing beans and invoking methods" (which perform clearly distinct functions) is a lot simpler and easier to learn IMHO than the current one, which is "use ${} for expressions that are output to the page except within a JSF tag, where you use #{} for the same thing and also to update form values and invoke action methods"! (OK, I'm exaggerating a little for effect, but you get the point... :-)
    I agree that mixing both types of expression in the same attribute might be a little confusing, but this is an unlikely edge case that should probably be prevented in value binding or action attributes anyway. It's more of an issue for label values where mistyping one for the other is already very common and, although not especially difficult to debug, is just another pitfall awaiting the unwary JSP developer. I'm not sure that JSP expressions would be much more difficult to debug anyway as the value and method bindings will simply not work, which is pretty obvious as soon as you try and test the thing.
    Is this something that the EG would be prepared to reconsider for the next release of JSF, or perhaps getting the security loophole addressed in the next JSP spec? In the meantime, is there any reason that developers shouldn't enable runtime expressions in the TLD file provided that they're willing to live with the consequences?
    (Sorry to harp on about it, but I've already had several complaints about this after recommending JavaServer Faces for a major development project at ingenta.com.)
    Many thanks,
    Keith.

  • Extract function not working with tag attributes

    Hi all,
    I have an xml document stored in the db as an xmlType. I am trying to use the extract function to retrieve values. The extract will work fine on tags without attributes. Any tags with attributes or tags beyond the tags with attributes will not be accessible.
    <tag1>
    <tag2>hi</tag2>
    <tag3 att="hello">bye</tag3>
    <tag4> hi again </tag4>
    </tag1>
    In the example above I can extract tag2 values but not tag3 or tag4 values.
    here is my select statement
    works
    select e.xmlval.extract('/tag1/tag2').getStringval()
    from test_xml e;
    does not work
    select e.xmlval.extract('/tag1/tag2/tag3').getStringval()
    from test_xml e;
    does not work
    select e.xmlval.extract('/tag1/tag2/tag3/tag4').getStringval()
    from test_xml e;
    Any ideas?

    Hi all,
    Found the issue. The problem was that I was not specifying the second argument to the extract function.
    The tag attribute that I was not handling was xmlns="".
    I used this atttribute as the second argument in the extract function and now I am off and running.
    Hope this helps someone.
    Cheers

  • Custom tag attribute values..

              hi,
              I have created custom tags from my EJB using ejb2jsp tool. I tried the following,
              1 works and the other doesn't,
              a) This works.
              <mytag:foo param1="<%="test"%>" />
              b) this gives me a "ClassCastException" <% String value = "test"; %> <mytag:foo param1="<%=value%>"
              />
              ----++++++ java.lang.ClassCastException: java.lang.Object at javax.servlet.jsp.tagext.TagData.getAttributeString(TagData.java:165)
              at com.niteo.projects.intelXML.xbrl.ejb.jsp_tags._XBRLContentProvider_se tIdTagTEI.isValid(_XBRLContentProvider_setIdTagTEI.java:37)
              at weblogic.servlet.jsp.StandardTagLib.verifyAttributes(StandardTagLib.j ava:443)
              ----++++++
              I have tried all possible tricks, but this doesn't work. Is there something that
              I missed while creating the custom tag Or is it the way I am using the tag..?
              any help pls...
              thx in advance -jay
              

    It seems like you want to be able to clear the default attribute and set an empty attribute in you custom tag. One way around this would be to pass a blank character in. That would force the default to be cleared with the blank. You could take it a step further and trim the attribute value before storing it. Alternatively you could set an overriding attribute such as:
    <slasher:foo name="slasher" ignorewhatever="true" />
    protected String whatever = "some default Value";
    public void setWhatever(String whatever)
         this.whatever = whatever;
    public void setIgnorewhatever(String ignore)
         if(ignore.equals("true"))
              this.whatever = "";
    }Cliff

  • Custom tag attribute calculated by scriptlet expression

    Hi,
              If I set the rtexprvalue subelement of the attribute element in my tld to
              "true", should I be able to dynamically determine the value of my custom tag
              attribute using a scriptlet expression?
              When I include the custom tag reference:
              <prod:getCategory id="category"
              categoryID="<%=request.getParameter("catID")%>" scope="page"/>
              it actually gets written to the html as:
              <prod:getCategory id="category" categoryID="2133" scope="page"/>
              and is not recognized as a jsp tag.
              I am using weblogic 6.0 sp1.
              Thanks in advance!
              daniel
              

    I had the same problem in a design a couple of months ago and could not get around it so I switched the functionality into code and out of the tag lib.
    I take it you are trying to do something like this?
    <%
    String value="hiworld";
    %>
    <mytaglib:saysomething value="<%=value%>"/>

  • Custom tag attribute question

    How to assign value of expression or variable to custom tag attribute in jsp?

    I had the same problem in a design a couple of months ago and could not get around it so I switched the functionality into code and out of the tag lib.
    I take it you are trying to do something like this?
    <%
    String value="hiworld";
    %>
    <mytaglib:saysomething value="<%=value%>"/>

  • Using TAG Attributes within JSF Tags

    I'm using some .tag files for templating purposes. I'm using two tag attributes via <@% attribute %> directive. How can i access this attribute to do something like follows.
    <%@ tag display-name="Area de Trabajo" language="java" %>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
    <%@ attribute name="title" required="true"%>
    <%@ attribute name="location" %>
    <t:div styleClass="zonaArea#{(not empty location) ? location : 'Global'}">
      <h:panelGrid columns="1">
        <h:outputText value="#{title}" />
      </h:panelGrid>
      <jsp:doBody />
    </t:div>

    Hola Alberto.
    Any luck? Did you worked that around?
    I'm just trying to do the same thing...
    Tried to do something like:
    <%@attribute name="enabled" type="java.lang.String" %>
    <h:outputText value="test: #{requestScope['enabled']}" style="font-weight: bold;" /> to no avail...
    Let me know, please!
    Hi,
    Manrico

  • Updating tag attributes in design time

    I have a design time renderer for my custom component... As the component renders itself in design time, I set some of the component properties from within the renderer... The property sheet correctly shows those values... However, the associated JSP tag in the source view does not show those attributes... The JSP tag attributes dictate the runtime behavior and since they are not set properly, my component misbehaves.
    How do I make sure that the tag attributes sync up with the property sheet values?
    Also, what is the motivation behind the property sheet displaying the component values and not the JSP tag values? Having it the way it is right now opens itself up to a bunch of out-of-sync problems like the one I encountered.
    Thanks,
    Keyur

    Ok - here are a couple of scenarios:
    1. I have a component, say chart component associated with a connection component like this:
    <my:connection id="connection1" />
    <my:chart connectionId="connection1" />The user first drags and drops the connection component. The ID connection1 is automatically associated to it. Next he drops the chart component. Now, I would like to automatically populate the connectionId attribute without the user having to type it in manually. I am able to do that (in design time) in the renderer of the chart component - I programmatically look for a connection component on the page and set the connectionId attribute of the control. And when I do that it correctly shows the connectionId attribute populated in the property sheet but the corresponding tag attribute is not.
    Sure enough, at runtime, it is the tag attribute values that count and since those are not updated by the IDE, it does not work as expected.
    2. Creator updates the style attribute when I move or resize the component. Now, I also have position attributes left and top defined on my component and I use these attributes at runtime to position my component. So, in design time I extract the left and top values from the style attribute and set them on the component. But again, the tag attributes are not populated and so the component is not positioned properly.
    #1 is to convenience the user so that he doesn't have to manually enter values for attributes which can be automatically populated at design time.
    In fact for #1, I would ideally like to show the user a drop down list of all the connections available to him in the property sheet and select the first one by default. Is this possible?
    #2 is for backward compatibility reasons - We already have runtime renderers in place which use left and top attributes explicitly to render the components at runtime. And this is not restricted to left and top only but other client attributes as well - such as borders, backgrounds etc. which we expose as separate attributes.

Maybe you are looking for

  • Can this be used on more than one computer?

    Can this be used on more than one computer?  (Multiple-users?)

  • Can't open Canon 7D CR2 files in Bridge

    I have Photoshop and Bridge CS4 running on an iMac.  I just purchased a Canon 7D (great, btw),.  Unfortunately Bridge and Photoshop can't open the files.  The error message says Photoshop can't recognize this type of file.  I can convert them to tiff

  • What is the correct procedure for repairing permissions

    I am getting ready to upgrade to Tiger from Panther. I have used the disk utility to repair permissions after an upgrade or hardware addition. I have always done it using the disk utility and not from a boot up on the OS install dvd. Is there a diffe

  • Is it possible to do PDF merging/splitting functions in command line?

    Hi, Currently we are merging the hundreds of PDF files using Acrobat User Interface and we're trying to automate this process using command line scripts. Does Adobe has built-in this capability in the Acrobat or any other Product? Thanks

  • Accidentally deleted several FCP Projects

    I'm using FCP X 10.1.1. I've been making simple (uncomplicated) videos and have used a lot of space on my HD. I'm new to the program and I inadvertenly deleted 4 large projects in my FCP library bc I was looking for more disc space. I realized my err