Doubt in <rich:listshuttle>? - jsf

In my application i am using <rich:listshuttle> component and I had provided a blank space for the Label. My doubt is when i keep the mouse pointer in the Copy,Remove,Up and Down button i am getting a tool tip namely copyControl,removeControl,upControl and downControl, when checked the HTML source code these are the ALT name provided in the <IMG>. Is there any possibility to change these ALT data's. I am using RichFaces 3.1.4.
JSP Code
enter code here
<rich:listShuttle id="resultCustomizelist"
sourceValue="#{Bean.selectItem}"
targetValue="#{Bean.selectedItem}" var="custRows"
listsHeight="150" sourceListWidth="180" targetListWidth="180"
sourceCaptionLabel="#{label.selectFields}"
targetCaptionLabel="#{label.selectedFields}"
converter="Listconverter" copyControlLabel=" " removeControlLabel=" "
fastMoveControlsVisible="false" downControlLabel=" "
upControlLabel=" " fastOrderControlsVisible="false">
<rich:column>
<h:outputText value="#{custRows.label}"></h:outputText>
</rich:column>
</rich:listShuttle>
HTML SOURCE CODE
enter code here
<table cellpadding="0" cellspacing="0" class="rich-list-shuttle " id="customizePanelId:resultCustomizelist">
<tbody>
<tr>
<td class="rich-list-shuttle-caption" colspan="2">
<div class="rich-shuttle-source-caption">Available Columns</div>
</td>
<td class="rich-list-shuttle-caption" colspan="2">
<div class="rich-shuttle-target-caption">Displayed Columns</div>
</td>
</tr>
<tr>
<td>
<div class="rich-shuttle-source-items ">
<input id="customizePanelId:resultCustomizelistfocusKeeper" style="width: 1px; position: absolute; left: -32767px;" type="button" />
<table cellpadding="0" cellspacing="0" class="rich-shuttle-body" id="customizePanelId:resultCustomizelisttable"><tbody><tr><td style="border:0px;padding : 0px;"> <div class="rich-shuttle-list" id="customizePanelId:resultCustomizelistheaderBox"><div class="rich-shuttle-list-content" id="customizePanelId:resultCustomizelistcontentBox" style="width:180px;height:150px;"><table cellpadding="0" cellspacing="0" class="rich-shuttle-internal-tab" id="customizePanelId:resultCustomizelistinternal_tab"><tbody id="customizePanelId:resultCustomizelisttbody"></tbody></table></div></div></td></tr></tbody></table></div></td><td style="vertical-align: middle;"><div class="rich-shuttle-controls"><div id="customizePanelId:resultCustomizelistcopy" class=" rich-shuttle-control-copy" style="display:none;"><div class="rich-list-shuttle-button" onmouseover="this.className='rich-list-shuttle-button-light'" onmousedown="this.className='rich-list-shuttle-button-press'" onmouseup="this.className='rich-list-shuttle-button'" onmouseout="this.className='rich-list-shuttle-button'">
<a id="customizePanelId:resultCustomizelistcopylink" href="#" onclick="return false;" class="rich-list-shuttle-button-selection" onblur="Control.onblur(this);" onfocus="Control.onfocus(this);"><div class="rich-list-shuttle-button-content" onclick="">
<img width="15" height="15" border="0" alt="copyControl" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.ListShuttleIconCopy/DATB/eAFjYGD4f-.Y....ARNrBaE_.faces" /> </div></a></div></div><div id="customizePanelId:resultCustomizelistdiscopy" class=" rich-shuttle-control-disabled" style="display:block;"><div class="rich-list-shuttle-button-disabled"><a id="customizePanelId:resultCustomizelistdiscopylink" href="#" onclick="return false;" disabled="disabled" class="rich-list-shuttle-button-a-disabled"><a><div class="rich-list-shuttle-button-content">
<img width="15" height="15" border="0" alt="copyControlDisabled" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.ListShuttleIconCopyDisabled/DATB/eAH7vL33.71j....BwAliQfY.faces" /> </div></a></a></div></div><div id="customizePanelId:resultCustomizelistremove" class=" rich-shuttle-control-remove" style="display:none;"><div class="rich-list-shuttle-button" onmouseover="this.className='rich-list-shuttle-button-light'" onmousedown="this.className='rich-list-shuttle-button-press'" onmouseup="this.className='rich-list-shuttle-button'" onmouseout="this.className='rich-list-shuttle-button'">
<a id="customizePanelId:resultCustomizelistremovelink" href="#" onclick="return false;" class="rich-list-shuttle-button-selection" onblur="Control.onblur(this);" onfocus="Control.onfocus(this);"><div class="rich-list-shuttle-button-content" onclick="">
<img width="15" height="15" border="0" alt="removeControl" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.ListShuttleIconRemove/DATB/eAFjYGD4f-.Y....ARNrBaE_.faces" /> </div></a></div></div><div id="customizePanelId:resultCustomizelistdisremove" class=" rich-shuttle-control-disabled" style="display:block;"><div class="rich-list-shuttle-button-disabled"><a id="customizePanelId:resultCustomizelistdisremovelink" href="#" onclick="return false;" disabled="disabled" class="rich-list-shuttle-button-a-disabled"><a><div class="rich-list-shuttle-button-content">
<img width="15" height="15" border="0" alt="removeControlDisabled" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.ListShuttleIconRemoveDisabled/DATB/eAH7vL33.71j....BwAliQfY.faces" /> </div></a></a></div></div></div></td><td><div class="rich-shuttle-target-items "><input name="customizePanelId:resultCustomizelist" style="display: none;" type="hidden" value=":" />
<input id="customizePanelId:resultCustomizelisttlFocusKeeper" style="width: 1px; position: absolute; left: -32767px;" type="button" /><table cellpadding="0" cellspacing="0" class="rich-shuttle-body" id="customizePanelId:resultCustomizelisttlTable"><tbody><tr><td style="border:0px;padding : 0px;"><div class="rich-shuttle-list" id="customizePanelId:resultCustomizelisttlHeaderBox"><div class="rich-shuttle-list-content" id="customizePanelId:resultCustomizelisttlContentBox" style="width:180px;height:150px;"> <table cellpadding="0" cellspacing="0" class="rich-shuttle-internal-tab" id="customizePanelId:resultCustomizelisttlInternal_tab"><tbody id="customizePanelId:resultCustomizelisttlTbody"></tbody></table></div></div></td></tr></tbody></table></div></td><td style="vertical-align: middle;"><div class="rich-shuttle-controls"><div id="customizePanelId:resultCustomizelistup" class=" rich-shuttle-control-up" style="display:none;"><div class="rich-list-shuttle-button" onmouseover="this.className='rich-list-shuttle-button-light'" onmousedown="this.className='rich-list-shuttle-button-press'" onmouseup="this.className='rich-list-shuttle-button'" onmouseout="this.className='rich-list-shuttle-button'"><a id="customizePanelId:resultCustomizelistuplink" href="#" onclick="return false;" class="rich-list-shuttle-button-selection" onblur="Control.onblur(this);" onfocus="Control.onfocus(this);"><div class="rich-list-shuttle-button-content" onclick="">
<img width="15" height="15" border="0" alt="upControl" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.OrderingListIconUp/DATB/eAFjYGD4f-.Y....ARNrBaE_.faces" /> </div></a></div></div><div id="customizePanelId:resultCustomizelistdisup" class=" rich-shuttle-control-disabled" style="display:block;"><div class="rich-list-shuttle-button-disabled"><a id="customizePanelId:resultCustomizelistdisuplink" href="#" onclick="return false;" disabled="disabled" class="rich-list-shuttle-button-a-disabled"><a><div class="rich-list-shuttle-button-content">
<img width="15" height="15" border="0" alt="upControlDisabled" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.OrderingListIconUpDisabled/DATB/eAH7vL33.71j....BwAliQfY.faces" /> </div></a></a></div></div><div id="customizePanelId:resultCustomizelistdown" class=" rich-shuttle-control-down" style="display:none;"><div class="rich-list-shuttle-button" onmouseover="this.className='rich-list-shuttle-button-light'" onmousedown="this.className='rich-list-shuttle-button-press'" onmouseup="this.className='rich-list-shuttle-button'" onmouseout="this.className='rich-list-shuttle-button'"><a id="customizePanelId:resultCustomizelistdownlink" href="#" onclick="return false;" class="rich-list-shuttle-button-selection" onblur="Control.onblur(this);" onfocus="Control.onfocus(this);"><div class="rich-list-shuttle-button-content" onclick="">
<img width="15" height="15" border="0" alt="downControl" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.OrderingListIconDown/DATB/eAFjYGD4f-.Y....ARNrBaE_.faces" /> </div></a></div></div><div id="customizePanelId:resultCustomizelistdisdown" class=" rich-shuttle-control-disabled" style="display:block;"><div class="rich-list-shuttle-button-disabled"><a id="customizePanelId:resultCustomizelistdisdownlink" href="#" onclick="return false;" disabled="disabled" class="rich-list-shuttle-button-a-disabled"><a><div class="rich-list-shuttle-button-content">
<img width="15" height="15" border="0" alt="downControlDisabled" src="/rvb-web/a4j_3_1_4.GAorg.richfaces.renderkit.html.images.OrderingListIconDownDisabled/DATB/eAH7vL33.71j....BwAliQfY.faces" /> </div></a></a></div></div></div><script type="text/javascript"><!--
var clientId = 'customizePanelId:resultCustomizelist';
Event.onReady(function() {
var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
var listShuttleCotrolsIdPrefix = [['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']];
var sourceLayoutManager = new LayoutManager('customizePanelId:resultCustomizelistinternal_header_tab', 'customizePanelId:resultCustomizelistinternal_tab');
var targetLayoutManager = new LayoutManager('customizePanelId:resultCustomizelisttlInternal_header_tab', 'customizePanelId:resultCustomizelisttlInternal_tab');
var listShuttle = new Richfaces.ListShuttle(new Richfaces.ListShuttle.Target('customizePanelId:resultCustomizelist', 'customizePanelId:resultCustomizelisttlInternal_tab', 'customizePanelId:resultCustomizelisttlInternal_header_tab', 'customizePanelId:resultCustomizelisttlFocusKeeper', cotrolsIdPrefix, 'customizePanelId:resultCustomizelistsortLabel', null, Richfaces.ListShuttle.Target.SelectItem, null, null),
new Richfaces.ListShuttle.Source('customizePanelId:resultCustomizelist', 'customizePanelId:resultCustomizelistinternal_tab', 'customizePanelId:resultCustomizelistinternal_header_tab', 'customizePanelId:resultCustomizelistfocusKeeper', undefined, Richfaces.ListShuttle.Source.SelectItem, null, null),
"customizePanelId:resultCustomizelist", listShuttleCotrolsIdPrefix, "false", sourceLayoutManager, targetLayoutManager, null);
var sourceLayoutManager = new LayoutManager('customizePanelId:resultCustomizelistinternal_header_tab', 'customizePanelId:resultCustomizelistinternal_tab');
var targetLayoutManager = new LayoutManager('customizePanelId:resultCustomizelisttlInternal_header_tab', 'customizePanelId:resultCustomizelisttlInternal_tab');
sourceLayoutManager.widthSynchronization();
targetLayoutManager.widthSynchronization();
});
//setTimeout(init, 0);
//-->

Try using this attribute to rich:listshuttle
copyAllTitle=""
copyTitle=""
removeAllTitle=""
removeTitle=""
downTitle=""
upTitle=""

Found a solution for the lower versions, we can replace the excisting images with over own images and can provide the alt data.
<f:facet name="copyControl">
<t:graphicImage url="" alt="" border="0"></t:graphicImage>
</f:facet>
<f:facet name="copyControlDisabled">
<t:graphicImage url="" alt="" border="0"></t:graphicImage>
</f:facet>
<f:facet name="removeControl">
<t:graphicImage url="" alt="" border="0"></t:graphicImage>
</f:facet>
<f:facet name="removeControlDisabled">
<t:graphicImage url="" alt="" border="0"></t:graphicImage>
</f:facet>
<f:facet name="upControl">
<t:graphicImage url="" alt="" border="0"></t:graphicImage>
</f:facet>
<f:facet name="upControlDisabled">
<t:graphicImage url="" alt="" border="0"></t:graphicImage>
</f:facet>
<f:facet name="downControl">
<t:graphicImage url="" alt="" border="0"></t:graphicImage>
</f:facet>
<f:facet name="downControlDisabled">
<t:graphicImage url="" alt="" border="0"></t:graphicImage>
</f:facet>

Related

How to update a form that contains pivot tables with timer?

I am using a bootstrap carousel to pass the tables (these are generated from the db), I tried to use the prime-faces poll but it only recharges me once and after that the first table remains static and loses transition effect . Any recommendation...
psdta: Primefaces 4.0, and bootstrap 4 are part of the design.
<h:form id="tablas">
<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>
<p:dialog modal="true" widgetVar="statusDialog" resizable="false" draggable="false" closable="false"
showHeader="false" style="border: none; opacity: 0.75;">
<p:graphicImage id="refreshTable" value="./../resources/images/cargandoLogin.gif" style="width: 100px; height: 100px; " />
</p:dialog>
<div id="carouselExampleInterval" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="limiter">
<div class="container-table100">
<h:outputText value="#{beansSeguimientoRelease.dateTable}" escape="false"/>
<div class="carousel-item" data-interval="#{beansSeguimientoRelease.contTabla}">
<div id="main-container">
<div class="tituloN">NOTAS</div>
<table class="table table-bordered" style="text-orientation: upright;">
<thead>
<tr>
<th scope="col" style="background-color: #0f7ff4">TEMAS PENDIENTES</th>
<th scope="col" style="background-color: #0f7ff4">NOTAS</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left; border-left: 15px black !important;">
<h:outputText value="#{beansSeguimientoRelease.itemNotas.tareas}" escape="false"/> </td>
<td style="text-align: left;">
<h:outputText value="#{beansSeguimientoRelease.itemNotas.notas}" escape="false"/></td>
</tr>
<tr>
<td style="text-align: right;">Disponibilidad:</td>
<td><h:outputText value= "#{beansSeguimientoRelease.itemNotas.disponibilidad}" escape="false"/></td>
</tr>
<tr>
<td style="text-align: right;">Operador Noc:</td>
<td><h:outputText value="#{beansSeguimientoRelease.itemNotas.operador_noc}" escape="false"/> </td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<a id="aPrev" class="carousel-control-prev" href="#carouselExampleInterval" role="button" data-slide="prev" style="width: 5%">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a id="aNext" class="carousel-control-next" href="#carouselExampleInterval" role="button" data-slide="next" style="width: 5%">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<p:poll id="Tpoll" interval="#{beansSeguimientoRelease.cont}" update="tablas"/>
</h:form>
I assume that problem is caused by fact that p:poll is inside h:form and that, by updating entire form, it updates itself too and stops working (maybe you can see something in JS debug console).
Try to wrap up carousel div into h:panelGroup like this
<h:panelGroup id="wrapper" layout="block">
<div id="carouselExampleInterval" class="carousel slide"...>
...
</div>
</h:panelGroup>
and then, when poll interval expires, update only newly added h:panelGroup
<p:poll id="Tpoll" interval="#{beansSeguimientoRelease.cont}" update=":tablas:wrapper"/>

How to get the text from this element?

I use selenium webdriver with node js.
I cannot get the text from this site. I need the "In progress" text.
I don't want to use absolute xpath, because I want use the code in other tests.
Thank you. :)
<div class="issuePanelContainer" id="issue_actions_container"
style="height: auto;">
<table cellpadding="0" cellspacing="0" border="0" width="100%"> .
</table>
<div class="issue-data-block">
<div class="actionContainer">
<div class="action-details">
<span class="aui-avatar aui-avatar-xsmall">
<span class="aui-avatar-inner">
<img alt="" src="https://jira.au.flitech.net/secure/useravatar?size=xsmall&ownerId=jan.plzak%40flightcentre.co.uk&avatarId=12582">
</span>
</span>
<a class="user-hover" rel="jan.plzak#flightcentre.co.uk" id="email_jan.plzak#flightcentre.co.uk" href="/secure/ViewProfile.jspa?name=jan.plzak%40flightcentre.co.uk">Jan Plzak</a>
made transition
- <span class="date" title="18/Jun/19 4:57 PM"><time class="livestamp" datetime="2019-06-18T16:57:08+1000">18/Jun/19 4:57 PM</time></span>
</div>
<div class="changehistory action-body">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody><tr>
<td width="60%">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody><tr>
<td width="47%" align="right">
<span class=" jira-issue-status-lozenge aui-lozenge jira-issue-status-lozenge-blue-gray jira-issue-status-lozenge-new jira-issue-status-lozenge-max-width-medium" data-tooltip="<span class="jira-issue-status-tooltip-title">Open</span>" title="" original-title="">Open</span> </td>
<td align="center" nowrap="nowrap" width="6%">
<img src="/images/icons/arrow_right_small.gif" align="absmiddle" border="0" height="16" width="16">
</td>
<td width="47%">
<span class=" jira-issue-status-lozenge aui-lozenge jira-issue-status-lozenge-yellow jira-issue-status-lozenge-indeterminate jira-issue-status-lozenge-max-width-medium" data-tooltip="<span class="jira-issue-status-tooltip-title">In Progress</span><br><span class="jira-issue-status-tooltip-desc">The development task is currently in progress</span>" title="" original-title="">In Progress</span></td>
</tr>
</tbody></table>
</td>
<td width="20%">
13d 21h 18m
</td>
<td width="20%" align="center">
1
</td>
</tr>
</tbody></table>
</div>
List<WebElement> list=driver.findElement(By.xpath("//span[contains(#class,'status')]"));
for(WebElement li:list)
{
if(li.getText().equals("In progress")
{
li.click(); // or assert or whatever
}
}
This is my answer, which is working fine, and content free. :)
driver.findElements(By.xpath('//div[#class="changehistory action-body"]/table/tbody/tr/td/table/tbody/tr/td[1]/span'));

when i try to refresh a form component from another form using <p:ajax update=""/> it shows error "Cannot find component [duplicate]

This question already has answers here:
How to find out client ID of component for ajax update/render? Cannot find component with expression "foo" referenced from "bar"
(6 answers)
Closed 4 years ago.
Can any one help me out of my problem? though i have been seen semilar problem from this site but i'm unable to fix my problem. here is my code..
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<meta charset="utf-8"/>
<meta name="viewport" content="width=device.width, initial-scale=1"/>
<meta http-equiv="X-UA-Conpatible" content="IE=edge"/>
<h:outputStylesheet library="css" name="bootstrap.css"/>
<link href="resources/css/w3.css" rel="stylesheet" type="text/css"/>
<link href="resources/css/w3-theme-teal.css" rel="stylesheet" type="text/css"/>
<div class="panel panel-info">
<!-- Default panel contents -->
<div class="panel-heading">Student Wise Fees Collection Details</div>
<div class="panel-body">
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-3">
<div class="panel panel-info" >
<div class="panel-heading">Payment Details</div>
<div class="panel-body">
<div class="col-lg-12 col-md-12 col-sm-12" style="padding-top: 4%">
<h:form id="form1">
<div class="input-group input-group-lg input-group-sm" style="padding-bottom: 6%;">
<span class="input-group-addon" id="sizing-addon1" style="color: blue;">Student Id:</span>
<p:inputText id="student_id" value="#{controllerBean.selectedfee.stuId}" type="text" readonly="true" style="width: 85%; color: blue;" class="form-control" placeholder="Student Id"/>
</div>
<div class="input-group input-group-lg input-group-sm" style="padding-bottom: 6%;">
<span class="input-group-addon" id="sizing-addon1">Name:</span>
<p:inputText id="stname" type="text" readonly="true" value="#{controllerBean.selectedfee.name}" class="form-control" placeholder="Name of the student" />
</div>
<div class="input-group input-group-lg input-group-sm" style="padding-bottom: 6%;">
<span class="input-group-addon" id="sizing-addon1">Program:</span>
<p:inputText id="pname" type="text" readonly="true" value="#{controllerBean.selectedfee.program}" class="form-control" placeholder="Program Name" />
</div>
<div class="input-group input-group-lg input-group-sm" style="padding-bottom: 6%;">
<span class="input-group-addon" id="sizing-addon1">Session:</span>
<p:inputText id="s_name" type="text" readonly="true" value="#{controllerBean.selectedfee.session}" class="form-control" placeholder="Session Name" />
</div>
<div class="input-group input-group-lg input-group-sm" style="padding-bottom: 6%;">
<span class="input-group-addon" id="sizing-addon1">Recept No:</span>
<p:inputText id="recptno" type="text" value="#{controllerBean.selectedfee.recptNo}" readonly="true" class="form-control" placeholder="Recept Number" />
</div>
<div class="input-group input-group-lg input-group-sm" style="padding-bottom: 6%;">
<span class="input-group-addon" id="sizing-addon1">Amount:</span>
<p:inputText id="a_mnt" type="text" value="#{controllerBean.selectedfee.amount}" readonly="true" class="form-control" placeholder="Paid Amount" />
</div>
<div class="input-group input-group-lg input-group-sm" style="padding-bottom: 6%;">
<span class="input-group-addon" id="sizing-addon1" style="color: green;">Voucher:</span>
<p:inputText id="voucher" type="text" value="#{controllerBean.selectedfee.AIBLVoucher}" readonly="true" style="color: green;" class="form-control" placeholder="AIBL Voucher Number" />
</div>
<div class="input-group input-group-lg input-group-sm" style="padding-bottom: 4%;">
<span class="input-group-addon" id="sizing-addon1" style="color: red;">AUB Token:</span>
<p:inputText id="aub_token" type="text" value="#{controllerBean.selectedfee.stud_pay_rec_mid}" style="color: red;" readonly="true" class="form-control" placeholder="AUB TXN ID Number" />
</div>
</h:form>
</div>
</div>
</div>
</div>
<div class="col-lg-9 col-md-9 col-sm-9" >
<div class="col-lg-12 col-md-12 col-sm-12" >
<div class="panel panel-info">
<div class="panel-heading">Student's Payment Record</div>
<div class="panel-body">
<h:form id="form2">
<input type="text" class="form-control" id="task-table-filter" data-action="filter" data-filters="#task-table" placeholder="Filter Tasks" />
<p:dataTable class="table table-hover" value="#{controllerBean.listofunifees}" var="FEES_COLLECTION" selection="#{controllerBean.selectedfee}" id="task-table" rowKey="#{FEES_COLLECTION.stud_pay_rec_mid}" selectionMode="single" paginator="true" paginatorPosition="bottom" rows="7" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" >
<p:ajax event="rowSelect" update=":form1" />
<p:column headerText="StuId" width="11%">
<h:outputText value="#{FEES_COLLECTION.stuId}" />
</p:column>
<p:column headerText="Student Name">
<h:outputText value="#{FEES_COLLECTION.name}" />
</p:column>
<p:column headerText="Program" width="15%">
<h:outputText value="#{FEES_COLLECTION.program}" />
</p:column>
<p:column headerText="Session" width="11%">
<h:outputText value="#{FEES_COLLECTION.session}" />
</p:column>
<p:column headerText="Rcpt No" width="10%">
<h:outputText value="#{FEES_COLLECTION.recptNo}" />
</p:column>
<p:column headerText="Amount" width="10%">
<h:outputText value="#{FEES_COLLECTION.amount}" />
</p:column>
<p:column headerText="Voucher" width="11%">
<h:outputText value="#{FEES_COLLECTION.AIBLVoucher}" />
</p:column>
</p:dataTable>
</h:form>
</div>
</div>
</div>
</div>
<div class="col-lg-12 col-md-12 col-sm-12" style="padding-top: 0px;">
<div class="col-lg-4 col-md-4 col-sm-4">
</div>
<div class="col-lg-4 col-md-4 col-sm-4">
<h:form id="form3">
<button type="button" class="btn btn-success btn-sm col-lg-5 col-md-5 col-sm-5">Save</button>
<div class="col-lg-2 col-md-2 col-sm-2"></div>
<button type="button" class="btn btn-danger btn-sm col-lg-5 col-md-5 col-sm-5">Cancel</button>
</h:form>
</div>
<div class="col-lg-4 col-md-4 col-sm-4">
</div>
</div>
</div>
</div>
</div>
</ui:composition>
When i run this code, it shows javax.faces.FacesException: Cannot find component with expression ":form1:st_id" referenced from "centrepage:form2:task-table".
Now i've got my answer. The should be ":centrepage:form1:st_id, .., ..." and so on. bottom line is update="centrepage:form1:st_id". thanks for every one

'Check' not displayed on selected items from a p:selectManyMenu

I'm using the selectManyMenu widget from Primefaces 5.3 to display the list of roles users can have in each of our apps.
<p:outputLabel value="Roles:" rendered="#{controller.enabledApp[app.id] and not empty app.roles}"/>
<p:selectManyMenu converter="#{roleConverter}" var="r" filter="true" filterMatchMode="contains" showCheckbox="true"
rendered="#{controller.enabledApp[app.id] and not empty app.roles}" value="#{app.selectedRoles}">
<f:selectItems value="#{app.roles}" var="role" itemLabel="#{role.name}" itemValue="#{role}"/>
<p:column>
<h:outputText value="#{r.name}"/>
</p:column>
</p:selectManyMenu>
The problem is, when I preload these roles from the database, populating the selectedRoles field of the app entity, Primefaces adds the ui-state-highlight CSS class to the table rows used to represent these selected roles, but it doesn't add the ui-state-active to the div that represents the checkbox.
This is what I get:
<tr class="ui-selectlistbox-item ui-corner-all ui-state-highlight" style="">
<td>
<div class="ui-chkbox ui-widget">
<div class="ui-chkbox-box ui-widget ui-corner-all ui-state-default">
<span class="ui-chkbox-icon ui-icon ui-icon-check ui-c"/>
</div>
</div>
</td>
<td>Admin</td>
</tr>
And this is what I should get:
<tr class="ui-selectlistbox-item ui-corner-all ui-state-highlight" style="">
<td>
<div class="ui-chkbox ui-widget">
<div class="ui-chkbox-box ui-widget ui-corner-all ui-state-default ui-state-active">
<span class="ui-chkbox-icon ui-icon ui-c ui-icon-check"/>
</div>
</div>
</td>
<td>Admin</td>
</tr>
I could just change the CSS to display a checked checkbox when the parent tr has the ui-state-highlight class, but I'd much rather solve the problem.
Can this be a bug in Primefaces? Do I have some error that I'm not aware of?

hx:ajaxRefreshSubmit doesn't work in Firefox, Chrome

I am using IBM JSF 1.2.
This is snippet of main jsp page:
<hx:panelBox rendered="#{pc_DispositionDOTVC.forEdit.type ne pc_DispositionDOTVC.VIEW}">
<h:outputLabel styleClass="outputLabel" for="selectCargoWarehouse" value="#{msg.lblWarehouse}" />
<h:selectOneMenu id="selectCargoWarehouse" styleClass="selectOneMenu" required="true"
value="#{pc_DispositionDOTVC.forEditCargo.cargo.warehouse.warehouseName}">
<f:selectItems value="#{selectItemsFactory.warehousesByCompanyTerminalSpecial}" />
</h:selectOneMenu>
<h:message styleClass="message" for="selectCargoWarehouse" />
<hx:commandExButton type="submit" styleClass="commandExButton" value="#{msg.buttonAttachNewCargo}" id="cargoButtonAdd">
<hx:behavior event="onclick" behaviorAction="get;show" onActionFunction="openDialog()" id="cargoBehaviorAdd"
targetAction="addCargoDialog;addCargoDialog" /></hx:panelBox>
<hx:panelBox id="helpBox2">
<hx:ajaxRefreshSubmit id="ajaxRefreshSubmitCargo" target="helpBox2" />
</hx:panelBox> <%-- insert new cargo --%>
<jsp:include page="addCargoFromWarehouseDialog.jsp" />
And this is dialog jsp page (addCargoFromWarehouseDialog.jsp):
<%#page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%#taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%#taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%#taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
<%-- insert new cargo --%>
<hx:panelDialog type="modal" id="addCargoDialog" styleClass="panelDialog" showTitleCloseButton="false"
onshow="openDialog()" onhide="closeDialog()" noKeybindings="true" title="#{msg.buttonAttachNewCargo}">
<h:panelGroup style="display:block; height:400px; overflow-y:scroll; overflow-x:hidden;" >
<h:panelGrid id="addCargoGrid1" styleClass="panelGrid">
<h:outputText id="cargoText01" styleClass="outputText" value="#{pc_DispositionEditCargoDialog.incomingCargosByWarehouseNameAndCargoCompany}"></h:outputText>
<hx:dataTableEx border="0" cellpadding="2" cellspacing="0" columnClasses="columnClass" headerClass="headerClass"
footerClass="footerClass" rowClasses="rowClass1, rowClass2" id="addCargoTable1"
rendered="#{!empty pc_DispositionEditCargoDialog.incomingCargosByWarehouseNameAndCargoCompany}"
value="#{pc_DispositionEditCargoDialog.incomingCargosByWarehouseNameAndCargoCompany}"
styleClass="dataTableEx2" var="freeCargo">
<hx:columnEx id="cargoColumnEx1">
<f:facet name="header">
<h:outputText id="cargoText01" styleClass="outputText" value="#{msg.lblCargoId}"></h:outputText>
</f:facet>
<h:outputText id="cargoDynText01" styleClass="outputText" value="#{freeCargo.cargoId}"></h:outputText>
</hx:columnEx>
<hx:columnEx id="cargoColumnEx41">
<f:facet name="header">
<h:outputText id="cargoText041" styleClass="outputText" value="#{msg.lblDispositionWeightOfGoods}"></h:outputText>
</f:facet>
<h:outputText id="cargoDynText041" styleClass="outputText" value="#{freeCargo.availableWeightOfGoods}">
<hx:convertNumber maxFractionDigits="2" type="number" pattern="#,###,###,###,##0.00" />
</h:outputText>
</hx:columnEx>
<hx:columnEx id="cargoColumnEx5">
<f:facet name="header">
</f:facet>
<h:panelGroup id="addCargoGroup1" styleClass="buttonGroup">
<h:commandLink id="saveCargoLink1" immediate="true" styleClass="positive"
action="#{pc_DispositionEditCargoDialog.addDispositionCargo}" value="#{msg.buttonAddCargo}">
<f:param id="paramCargoId" name="cargoId" value="#{freeCargo.cargoId}"/>
</h:commandLink>
</h:panelGroup>
</hx:columnEx>
</hx:dataTableEx>
</h:panelGrid>
</h:panelGroup>
<h:panelGroup id="addCargoGroup2" styleClass="buttonGroup">
<hx:commandExButton id="buttonCancelCargoAdd" immediate="true" styleClass="negative" value="#{msg.buttonCancel}"
action="#{pc_DispositionEditCargoDialog.clearCargos}" type="submit">
<hx:behavior event="onclick" behaviorAction="get;hide"
id="cargoBehavior2"
targetAction="subview1:panelForm:helpBox2;subview1:panelForm:addCargoDialog">
</hx:behavior>
</hx:commandExButton>
</h:panelGroup>
</hx:panelDialog>
<hx:ajaxRefreshSubmit id="ajaxRefreshSubmitCargo2" target="addCargoDialog" />
<%-- / insert new cargo --%>
I have a combobox to select warehouse and button to open dialog and select cargo from cargo list of available cargos from the warehouse.
When I select warehouse which has cargos and select add cargo button, the list of cargos appear.
When I select warehouse, which has no cargos, it opens an empty dialog (which is ok). But selecting the warehouse, which has cargo, again, I get en empty list(which is not ok). If I click browser refresh button than list of cargos appears normally.
This only happens in Mozilla Firefox and Chrome, in IE 11 it works fine.
It seems to me that jsf ajaxRefreshSubmit is not working properly.
Please take a look, any kind of help is very much appreciated.
Thanks in advance,
mismas
[EDIT1]:
There is nothing abnormal in the web console or firebug (when I click F12)
This is the response which I get in both cases (200 POST http://localhost:8080/ExtComConWeb/pages/secure/disposition/dispositionDOTVC.faces?%24%24ajaxid=subview1%3ApanelForm%3AaddCargoDialog&%24%24ajaxmode=axfull):
<div id="subview1:panelForm:addCargoDialog" class="panelDialog" style="position:absolute; display:none;"><div id="subview1:panelForm:addCargoDialog_tb" title="Dodaj teret">Dodaj teret</div><div id="subview1:panelForm:addCargoDialog_ca"><span style="display:block; height:400px; overflow-y:scroll; overflow-x:hidden;"> <table id="subview1:panelForm:addCargoGrid1" class="panelGrid">
<tbody>
<tr>
<td><span id="subview1:panelForm:cargoText01" class="outputText"> [hr.combis.comcon.persistency.hibernate.impl.crg.Cargo#58996c54, hr.combis.comcon.persistency.hibernate.impl.crg.Cargo#2468c3d]</span></td>
</tr>
<tr>
<td><table id="subview1:panelForm:addCargoTable1" class="dataTableEx2" border="0" cellpadding="2" cellspacing="0" ><thead ><tr ><th class="headerClass" scope="col" ><span id="subview1:panelForm:addCargoTable1:cargoText01" class="outputText">Broj tereta</span></th><th class="headerClass" scope="col" ><span class="outputText">K447</span></th><th class="headerClass" scope="col" ><span class="outputText">JCD</span></th><th class="headerClass" scope="col" ><span class="outputText">MRN</span></th><th class="headerClass" scope="col" ><span id="subview1:panelForm:addCargoTable1:cargoText02" class="outputText">Standardni opis tereta</span></th><th class="headerClass" scope="col" ><span id="subview1:panelForm:addCargoTable1:cargoText031" class="outputText">Br.ul. disp.</span></th><th class="headerClass" scope="col" ><span id="subview1:panelForm:addCargoTable1:cargoText03" class="outputText">Tip pakiranja</span></th><th class="headerClass" scope="col" ><span id="subview1:panelForm:addCargoTable1:cargoText04" class="outputText">Tip mjere</span></th><th class="headerClass" scope="col" ><span id="subview1:panelForm:addCargoTable1:cargoText041" class="outputText">Težina robe</span></th><th class="headerClass" scope="col" ><span id="subview1:panelForm:addCargoTable1:cargoText042" class="outputText">Volumen</span></th><th class="headerClass" scope="col" ><span id="subview1:panelForm:addCargoTable1:cargoText043" class="outputText">Komada</span></th><th class="headerClass" scope="col" ><img src="/ExtComConWeb/.ibmjsfres/img/1x1.gif" ></img></th></tr>
</thead><tbody >
<tr class="rowClass1" ><td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:0:cargoDynText01" class="outputText">72369</span></td>
<td class="columnClass" ><span class="outputText"></span></td>
<td class="columnClass" ><span class="outputText"></span></td>
<td class="columnClass" ><span class="outputText"></span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:0:cargoDynText02" class="outputText">Antracit</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:0:cargoDynText031" class="outputText">00007/06/2015</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:0:cargoDynText03" class="outputText">Nepakirani</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:0:cargoDynText04" class="outputText">Mjeren po volumenu</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:0:cargoDynText041" class="outputText">121,00</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:0:cargoDynText042" class="outputText">1.465,000</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:0:cargoDynText043" class="outputText">12</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:0:addCargoGroup1" class="buttonGroup"><a id="subview1:panelForm:addCargoTable1:0:saveCargoLink1" href="#" onclick="if(typeof jsfcljs == 'function') {jsfcljs(document.getElementById('subview1:panelForm'),{'subview1:panelForm:addCargoTable1:0:saveCargoLink1':'subview1:panelForm:addCargoTable1:0:saveCargoLink1','cargoId':'72369'},'');}return false" class="positive">Dodaj teret</a></span></td>
</tr>
<tr class="rowClass2" ><td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:1:cargoDynText01" class="outputText">72454</span></td>
<td class="columnClass" ><span class="outputText"></span></td>
<td class="columnClass" ><span class="outputText"></span></td>
<td class="columnClass" ><span class="outputText"></span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:1:cargoDynText02" class="outputText">Banane</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:1:cargoDynText031" class="outputText">00014/06/2015</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:1:cargoDynText03" class="outputText">Palete</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:1:cargoDynText04" class="outputText">Mjeren na komade</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:1:cargoDynText041" class="outputText">1.213,00</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:1:cargoDynText042" class="outputText">121,000</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:1:cargoDynText043" class="outputText">12</span></td>
<td class="columnClass" ><span id="subview1:panelForm:addCargoTable1:1:addCargoGroup1" class="buttonGroup"><a id="subview1:panelForm:addCargoTable1:1:saveCargoLink1" href="#" onclick="if(typeof jsfcljs == 'function') {jsfcljs(document.getElementById('subview1:panelForm'), {'subview1:panelForm:addCargoTable1:1:saveCargoLink1':'subview1:panelForm:add CargoTable1:1:saveCargoLink1','cargoId':'72454'},'');}return false" class="positive">Dodaj teret</a></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</span><span id="subview1:panelForm:addCargoGroup2" class="buttonGroup"> <input type="submit" value="Odustani" id="subview1:panelForm:buttonCancelCargoAdd" name="subview1:panelForm:buttonCancelCargoAdd" class="negative" /></span> </div></div><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id103:j_id105" /><script type="text/javascript">
hX_6.addComponent("subview1:panelForm:addCargoDialog", new hX_6.JSFDialog("no-keybindings:true", "onshow:openDialog()", "onhide:closeDialog()"));
hX_6.addBehavior("subview1:panelForm:buttonCancelCargoAdd", "onclick", new hX_6.JSFBehaviorGeneric("action:get;hide", "target:subview1:panelForm:helpBox2;subview1:panelForm:addCargoDialog"));
if(hX_6.getBehaviorById("subview1:panelForm:addCargoDialog", "ajaxsubmit", "onget"))hX_6.getBehaviorById("subview1:panelForm:addCargoDialog", "ajaxsubmit", "onget").setAttribute("href:/ExtComConWeb/pages/secure /disposition /dispositionDOTVC.faces?$$ajaxid=subview1:panelForm:addCargoDialog&$$ajaxmode =axfull");
</script>
The difference is that in case of selecting the cargos for the warehouse, after the one that is empty, I don't get rendered the result table ...
In other case, when first selecting warehouse which has cargos, it works fine ... I can't see the difference which would cause cargo list not rendering ...
Please help ...
[EDIT2]
Also I have noticed when printing pc_DispositionEditCargoDialog.incomingCargosByWarehouseNameAndCargoCompany list:
<h:outputText id="cargoText01" styleClass="outputText" value="# {pc_DispositionEditCargoDialog.incomingCargosByWarehouseNameAndCargoCompany}" ></h:outputText>
I get:
when warehouse has cargos: [hr.combis.comcon.persistency.hibernate.impl.crg.Cargo#71b78ef4, hr.combis.comcon.persistency.hibernate.impl.crg.Cargo#517ce92d]
[] when warehouse has cargos, but is clicked after warehouse that has no cargos. It's strange, because response has cargo list and I chceked server side function getIncomingCargosByWarehouseNameAndCargoCompany which also returnes not empty list. I can't see why this list is not rendering ...
[EDIT3]
I have noticed that when helpBox2 is removed from addCargoFromWarehouseDialog.jsp, then table of cargos renders normally in the dialog.
This is changed piece of code from addCargoFromWarehouseDialog.jsp (removed helpBox2 item):
<h:panelGroup id="addCargoGroup2" styleClass="buttonGroup">
<hx:commandExButton id="buttonCancelCargoAdd" immediate="true" styleClass="negative" value="#{msg.buttonCancel}"
action="#{pc_DispositionEditCargoDialog.clearCargos}" type="submit">
<hx:behavior event="onclick" behaviorAction="hide"
id="cargoBehavior2"
targetAction="subview1:panelForm:addCargoDialog">
</hx:behavior>
</hx:commandExButton>
But now, after I click Cancel button I get the whole page reloaded. Before, when helpBox2 was used, clicking Cancel button would do one more POST with ajax, so the hole page wasn't reloaded again.
Can anybody advise how to accomplish this affect without having to use this helpBox2 trick? Or how to change it in order not to interfering with cargos table rendering?
This is the response of that additional POST with ajax:
<table id="subview1:panelForm:helpBox2"><tr><td></td></tr></table> <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id104:j_id120" /><script type="text/javascript">
if(hX_6.getBehaviorById("subview1:panelForm:helpBox2", "ajaxsubmit", "onget"))hX_6.getBehaviorById("subview1:panelForm:helpBox2", "ajaxsubmit", "onget").setAttribute("href:/ExtComConWeb/pages/secure/disposition /dispositionDOTVC.faces?$$ajaxid=subview1:panelForm:helpBox2&$$ajaxmode=axfull");
</script>
Also I have noticed this is acting really strange.
If I do first empty warehouse - works, then full - works.
But full - works, empty - works, full - doesn't work.
I don't get it, what is a trick here?
Please help. Thanks!

Resources