Fórum

problem rendering aui controls using custom tags

Simon Read, modificado 12 Anos atrás.

problem rendering aui controls using custom tags

New Member Postagens: 8 Data de Entrada: 07/09/11 Postagens Recentes
Hello,
I have implemented a portlet and I am attempting to render aui controls in a
jsp that I create in a classic custom tag (see code below).
The aui control is not rendered (I have also tried other aui controls without
success).
However, when I remove the 'aui:' prefix, the text box is displayed correctly.
Is it possible to render aui controls in this way?

public class SampleTag extends TagSupport {

public int doStartTag() throws JspException {

JspWriter out = this.pageContext.getOut();

String outStr = "<aui:input type=\"text\" name=\"nam\" value=\"\" />


try {
out.write(outStr);
}
...

}
}

sample.jsp
...
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
<%@ taglib prefix="sample-ui" uri=".../tld/ui" %>

<sample-ui:sample />

...
Kavita Gupta, modificado 12 Anos atrás.

RE: problem rendering aui controls using custom tags

Junior Member Postagens: 64 Data de Entrada: 12/03/08 Postagens Recentes
Hi,

Try with below code :

String outStr = "<aui:input type=\'text\' name=\'nam\' value=\'\' />";


Regards,
Kavita
Simon Read, modificado 12 Anos atrás.

RE: problem rendering aui controls using custom tags

New Member Postagens: 8 Data de Entrada: 07/09/11 Postagens Recentes
Thanks Kavita for reply.

It doesn't actually fix the problem.

I'm wondering, do I need to import aui package/class at top of tag java class file? if so, which one(s)?

regards,
Simon
Kavita Gupta, modificado 12 Anos atrás.

RE: problem rendering aui controls using custom tags

Junior Member Postagens: 64 Data de Entrada: 12/03/08 Postagens Recentes
Hi,

Are you getting still same error ?

Regards,
Kavita
Simon Read, modificado 12 Anos atrás.

RE: problem rendering aui controls using custom tags

New Member Postagens: 8 Data de Entrada: 07/09/11 Postagens Recentes
Hi Kavita,
yes I am getting same error.
kind regards,
Simon