[JBoss JIRA] Reopened: (RF-1289) Getting A4J Undefined though My renderer is properly adding support as child to the component.
by Karthik M (JIRA)
[ http://jira.jboss.com/jira/browse/RF-1289?page=all ]
Karthik M reopened RF-1289:
---------------------------
actually i meant programatically creating child text box components and adding to the parent component (panel)..
see below code
//Delegate from my parent renderer code
private void createAjaxTextBoxComponent(FacesContext context, UIPanel dynamicControlPanel,
Object entity, DynamicControlMetaData contrlMeta, UIDynamicControl dynCtrl)
{
if(willLogDebug)
{
IPSLogger.logDebug(CLASS_NAME + "createAjaxTextBoxComponent-start");
}
UIComponent inputComp;
UIComponent outPutTextComp;
outPutTextComp = getLocalInstance().createOutputText(
contrlMeta.getControlLabel(), context);
dynamicControlPanel.getChildren().add(outPutTextComp);
if(contrlMeta.getRequired().equalsIgnoreCase(TRUE))
{
dynamicControlPanel.getChildren().add(new HtmlBlock(REQD_BLOCK_STRING));
}
//TODO This will need to change to support left-oriented labels.
addHtmlBreak(dynamicControlPanel);
// dynamicControlPanel.getChildren().add(addHtmlSpaces(2));
String value = "";
if(null != entity)
{
Class entityClass = entity.getClass();
value = getControlValuesFromModel(entity, entityClass, contrlMeta);
}
if(willLogDebug)
{
IPSLogger.logDebug(CLASS_NAME + "createAjaxTextBoxComponent-value" + value);
}
boolean disableComp = _disabled || contrlMeta.getDisabled().equalsIgnoreCase(TRUE);
// inputComp = getLocalInstance().createAjaxInputTextLimitSize(value,
// contrlMeta.getControlId()+dynamicId, context, disableComp,contrlMeta.getEvent(),contrlMeta.getAction(),contrlMeta.getOnComplete(),contrlMeta.getReRender(),contrlMeta.getAjaxSupportItem());
inputComp = getLocalInstance().createAjaxInputTextLimitSize(value,
dynamicId, context, disableComp,contrlMeta.getEvent(),contrlMeta.getAction(),contrlMeta.getOnComplete(),contrlMeta.getReRender(),contrlMeta.getAjaxSupportItem());
//R205 / CR 1414
applyJSEvents(dynCtrl, inputComp);
dynamicControlPanel.getChildren().add(inputComp);
dynamicControlPanel.getChildren().add(addHtmlSpaces(3)); //TODO Make this configurable
if(willLogDebug)
{
IPSLogger.logDebug(CLASS_NAME + "createAjaxTextBoxComponent-end");
}
}
//Create input text as follows
public UIComponent createAjaxInputTextLimitSize(String value, String id,
FacesContext context, boolean isDisabled, String event,
String action, String onComplete, String reRender,
List ajaxSupportItem)
{
UIAjaxInputText input = (UIAjaxInputText) context.getApplication().createComponent("ips.component.AjaxInputText");
input.setId(id);
ValueBinding vb = context.getApplication().createValueBinding("#{ajaxInputBean.textValue}");
input.setValueBinding("value",vb);
input.setEvent(event);
input.setAction(action);
input.setOnComplete(onComplete);
input.setReRender(reRender);
input.setAjaxSupportItem(ajaxSupportItem);
if(isDisabled)
{
input.setOnfocus("this.blur();");
input
.setStyle("border-style: solid; border-color:darkgray; color:darkgray; padding: .1em; margin: .1em; border-width: 1px; text-align: left;");
}
return input;
}
//finally when renderer code is called on my parent it triggers renderer of underling text box..
Note: The text box created here (my custom text box extends JSF tag) programatically adds support on itself..as sown below
if (inputText.getAction() != null
&& inputText.getEvent() != null) {
org.ajax4jsf.ajax.UIAjaxSupport support = null;
if (inputText.getAjaxSupportId() == null) {
support = (org.ajax4jsf.ajax.UIAjaxSupport) context
.getApplication().createComponent(
"org.ajax4jsf.ajax.Support");
} else {
inputText.getChildren().remove(0);
support = (org.ajax4jsf.ajax.UIAjaxSupport) context
.getApplication().createComponent(
"org.ajax4jsf.ajax.Support");
}
support.setId(inputText.getId() + "inputTextSupport");
MethodBinding mb = context.getApplication().createMethodBinding(
inputText.getAction(), null);
support.setAction(mb);
support.setEvent(inputText.getEvent());
support.setReRender(inputText.getReRender());
support.setOncomplete(inputText.getOnComplete());
inputText.getChildren().add(support);
inputText.setAjaxSupportId(support.getClientId(context));
}
super.encodeEnd(context, inputText);
Please suggest why this is not working..
> Getting A4J Undefined though My renderer is properly adding support as child to the component.
> ----------------------------------------------------------------------------------------------
>
> Key: RF-1289
> URL: http://jira.jboss.com/jira/browse/RF-1289
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.2.0
> Environment: Windows , Tomcat , Java 1.5, ajax4jsf1.1.0 , oscacche2.3.2
> Reporter: Karthik M
> Assigned To: Nick Belaevski
> Fix For: 3.2.0
>
> Attachments: ajax4jsf Help.zip
>
> Original Estimate: 4 days
> Remaining Estimate: 4 days
>
> To replicate this behaviour follow these steps:
> 1) create a custom component and its rendrerer.
> 2) In this parent renderere code try to create 2 child components to this parent component programatically (say 2 input texts..).
> 3) Each of this individual child components has to be ajax aware. So we add support objects to it with neccessary metadata.
> 4) in the xhtml try to verfy whether all the components are rendrered correctly and whether their defined events fire AJAX call.
> There is a thread on this forum where i have staed ths problem...URL is attached..
> I have already set code to sergeysmirnov(a)dev.java.net with subject Query on ajax4jsf.
> I have noted that till the last line of my renderer code all flow is correct..only whne HTML is generated it has no AJAX script declaration or support objects...but the A4J submit function exists...
> I have tried with several beta as well as stable versions but it did not work.
> Please help with this issue..kindly suggest any ideas to make this work..
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 4 months
[JBoss JIRA] Resolved: (RF-1289) Getting A4J Undefined though My renderer is properly adding support as child to the component.
by Nick Belaevski (JIRA)
[ http://jira.jboss.com/jira/browse/RF-1289?page=all ]
Nick Belaevski resolved RF-1289.
--------------------------------
Resolution: Cannot Reproduce Bug
That works fine for me:
public static final class UIEventsOutput extends UIOutput {
final class Event extends FacesEvent {
/**
*
*/
private static final long serialVersionUID = -1390611902280951049L;
private Object value;
private String clientId;
public Event(UIComponent component, Object value, String clientId, PhaseId phaseId) {
super(component);
this.value = value;
this.clientId = clientId;
setPhaseId(phaseId);
}
public boolean isAppropriateListener(FacesListener listener) {
return false;
}
public void processListener(FacesListener listener) {
throw new UnsupportedOperationException();
}
public Object getValue() {
return value;
}
public String getClientId() {
return clientId;
}
}
private UIOrderingList getList() {
UIComponent component = getParent();
while (component != null && !(component instanceof UIOrderingList)) {
component = component.getParent();
}
return (UIOrderingList) component;
}
private void queueEvent(PhaseId phaseId) {
new Event(this, getList().getRowData(),
getList().getClientId(FacesContext.getCurrentInstance()), phaseId).queue();
}
public void processDecodes(FacesContext context) {
super.processDecodes(context);
queueEvent(PhaseId.PROCESS_VALIDATIONS);
queueEvent(PhaseId.UPDATE_MODEL_VALUES);
queueEvent(PhaseId.INVOKE_APPLICATION);
}
public void processUpdates(FacesContext context) {
super.processUpdates(context);
queueEvent(PhaseId.INVOKE_APPLICATION);
}
public void processValidators(FacesContext context) {
super.processValidators(context);
queueEvent(PhaseId.UPDATE_MODEL_VALUES);
queueEvent(PhaseId.INVOKE_APPLICATION);
}
public void broadcast(FacesEvent event)
throws AbortProcessingException {
if (event instanceof Event) {
String cid = getList().getClientId(FacesContext.getCurrentInstance());
if (!cid.equals(((Event) event).getClientId())) {
System.out.println(cid + " !!! " + ((Event) event).getClientId());
}
Object rd = getList().getRowData();
if (!rd.equals(((Event) event).getValue())) {
System.out.println(rd + " !!! " + ((Event) event).getValue());
}
} else {
super.broadcast(event);
}
}
@Override
public void encodeEnd(FacesContext context) throws IOException {
if (getChildCount() == 0) {
UIAjaxSupport support = (org.ajax4jsf.component.UIAjaxSupport) context
.getApplication().createComponent(
UIAjaxSupport.COMPONENT_TYPE);
support.setEvent("click");
getChildren().add(support);
}
super.encodeEnd(context);
}
}
Tried on 3.2.0. Please try upgrading.
If that doesn't help, please reopen the issue and attach web.xml
> Getting A4J Undefined though My renderer is properly adding support as child to the component.
> ----------------------------------------------------------------------------------------------
>
> Key: RF-1289
> URL: http://jira.jboss.com/jira/browse/RF-1289
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.2.0
> Environment: Windows , Tomcat , Java 1.5, ajax4jsf1.1.0 , oscacche2.3.2
> Reporter: Karthik M
> Assigned To: Nick Belaevski
> Fix For: 3.2.0
>
> Attachments: ajax4jsf Help.zip
>
> Original Estimate: 4 days
> Remaining Estimate: 4 days
>
> To replicate this behaviour follow these steps:
> 1) create a custom component and its rendrerer.
> 2) In this parent renderere code try to create 2 child components to this parent component programatically (say 2 input texts..).
> 3) Each of this individual child components has to be ajax aware. So we add support objects to it with neccessary metadata.
> 4) in the xhtml try to verfy whether all the components are rendrered correctly and whether their defined events fire AJAX call.
> There is a thread on this forum where i have staed ths problem...URL is attached..
> I have already set code to sergeysmirnov(a)dev.java.net with subject Query on ajax4jsf.
> I have noted that till the last line of my renderer code all flow is correct..only whne HTML is generated it has no AJAX script declaration or support objects...but the A4J submit function exists...
> I have tried with several beta as well as stable versions but it did not work.
> Please help with this issue..kindly suggest any ideas to make this work..
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 4 months
[JBoss JIRA] Assigned: (RF-1289) Getting A4J Undefined though My renderer is properly adding support as child to the component.
by Nick Belaevski (JIRA)
[ http://jira.jboss.com/jira/browse/RF-1289?page=all ]
Nick Belaevski reassigned RF-1289:
----------------------------------
Assignee: Nick Belaevski (was: Sergey Halipov)
> Getting A4J Undefined though My renderer is properly adding support as child to the component.
> ----------------------------------------------------------------------------------------------
>
> Key: RF-1289
> URL: http://jira.jboss.com/jira/browse/RF-1289
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.2.0
> Environment: Windows , Tomcat , Java 1.5, ajax4jsf1.1.0 , oscacche2.3.2
> Reporter: Karthik M
> Assigned To: Nick Belaevski
> Fix For: 3.2.0
>
> Attachments: ajax4jsf Help.zip
>
> Original Estimate: 4 days
> Remaining Estimate: 4 days
>
> To replicate this behaviour follow these steps:
> 1) create a custom component and its rendrerer.
> 2) In this parent renderere code try to create 2 child components to this parent component programatically (say 2 input texts..).
> 3) Each of this individual child components has to be ajax aware. So we add support objects to it with neccessary metadata.
> 4) in the xhtml try to verfy whether all the components are rendrered correctly and whether their defined events fire AJAX call.
> There is a thread on this forum where i have staed ths problem...URL is attached..
> I have already set code to sergeysmirnov(a)dev.java.net with subject Query on ajax4jsf.
> I have noted that till the last line of my renderer code all flow is correct..only whne HTML is generated it has no AJAX script declaration or support objects...but the A4J submit function exists...
> I have tried with several beta as well as stable versions but it did not work.
> Please help with this issue..kindly suggest any ideas to make this work..
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 4 months
[JBoss JIRA] Updated: (RF-1289) Getting A4J Undefined though My renderer is properly adding support as child to the component.
by Nick Belaevski (JIRA)
[ http://jira.jboss.com/jira/browse/RF-1289?page=all ]
Nick Belaevski updated RF-1289:
-------------------------------
Fix Version/s: 3.2.0
Assignee: Sergey Halipov
Priority: Major (was: Critical)
> Getting A4J Undefined though My renderer is properly adding support as child to the component.
> ----------------------------------------------------------------------------------------------
>
> Key: RF-1289
> URL: http://jira.jboss.com/jira/browse/RF-1289
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.2.0
> Environment: Windows , Tomcat , Java 1.5, ajax4jsf1.1.0 , oscacche2.3.2
> Reporter: Karthik M
> Assigned To: Sergey Halipov
> Fix For: 3.2.0
>
> Attachments: ajax4jsf Help.zip
>
> Original Estimate: 4 days
> Remaining Estimate: 4 days
>
> To replicate this behaviour follow these steps:
> 1) create a custom component and its rendrerer.
> 2) In this parent renderere code try to create 2 child components to this parent component programatically (say 2 input texts..).
> 3) Each of this individual child components has to be ajax aware. So we add support objects to it with neccessary metadata.
> 4) in the xhtml try to verfy whether all the components are rendrered correctly and whether their defined events fire AJAX call.
> There is a thread on this forum where i have staed ths problem...URL is attached..
> I have already set code to sergeysmirnov(a)dev.java.net with subject Query on ajax4jsf.
> I have noted that till the last line of my renderer code all flow is correct..only whne HTML is generated it has no AJAX script declaration or support objects...but the A4J submit function exists...
> I have tried with several beta as well as stable versions but it did not work.
> Please help with this issue..kindly suggest any ideas to make this work..
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 4 months
[JBoss JIRA] Created: (RF-1316) Tooltip: Attribute delay invalid for tag toolTip according to TLD
by Aleksej Yanul (JIRA)
Tooltip: Attribute delay invalid for tag toolTip according to TLD
-----------------------------------------------------------------
Key: RF-1316
URL: http://jira.jboss.com/jira/browse/RF-1316
Project: RichFaces
Issue Type: Bug
Environment: tomcat 5.5.17
FF 2.0.0.9
facelets 1.1
https://svn.jboss.org/repos/richfaces/branches/3.1.x/test-applications/jsp
Reporter: Aleksej Yanul
Assigned To: Nick Belaevski
Fix For: 3.1.3
exception
org.apache.jasper.JasperException: /Tooltip/Tooltip.jsp(56,3) Attribute delay invalid for tag toolTip according to TLD
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 5 months