voyent
Messages posted by: lvqnm  XML
Profile for lvqnm -> Messages posted by lvqnm [18] Go to Page: 1, 2 Next 
Author Message
Thank you Philip. So i will wait for ICEfaces EE 3.4.

Best regards.
Can i use then ace:fileEntry and iceMobile simultaneously? The jira of your post is fixed in EE 3.3.0.GA...

I'm using ace components, ice components and ICEmobile in the same application:
Icefaces EE 3.3
IceMobile EE 1.3
Servlet 3.0

Do i have to do some especial configuration?

Thanks.
By the way, is there a jira issue opened for this conflict/dependency? I would like to know in order to follow it.

Thanks.
Hi artzambrano, thank you for your response. I tried your suggestion without success.

I wrote this code...

Code:
SortCriteria cr = criteria[0];
 log.debug("load::Criteria property name=" + cr.getPropertyName());
 log.debug("load::Criteria expression=" + cr.getExpression().getExpressionString());
 FacesContext facesContext = FacesContext.getCurrentInstance();
 Object value = facesContext.getApplication().evaluateExpressionGet(facesContext, cr.getExpression().getExpressionString(), Object.class);
 log.debug("load::Criteria value=" + value);
 


... and get this output

Code:
load::Criteria property name=fieldName
 load::Criteria expression=#{fb.fieldName}
 load::Criteria value=null
 


So i can´t get the fieldName which is sortering. I don't know if i'm getting the value expression properly.

Thank you for your response, Philip. I need to use the attribute action of mobi:commandButton. The lifecycle is executed but the action is not fired (without multipart-config enabled).

As additional information, with ICEfaces EE 3.2 and ICEmobile EE 3.2 it works.

Thanks.
Any suggestions, please?
Hi Arran, thank you for your response.

The xhtml is the following

Code:
<ace:dataTable id="tickets" value="#{testPortalManagedBean.incidentLazyModel}" var="incident" paginator="true" rows="5" paginatorPosition="bottom" rowsPerPageTemplate="5,10,15,20" paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" lazy="true" filterEvent="enter">
        <ace:ajax event="sort" execute="@this" render="@this" listener="#{testPortalViewAction.sortListener}"/>
        <ace:ajax event="filter" execute="@this" render="@this" listener="#{testPortalViewAction.filterListener}"/>
        <c:forEach items="#{testPortalManagedBean.columns}" var="fb">
               <ace:column id="#{fb.fieldName}" headerText="#{fb.translate}" sortBy="#{fb.fieldName}" filterBy="#{fb.fieldName}" filterMatchMode="contains">
                      <h:outputText value="#{incident.campos[fb.fieldName].txtValue}"/>
               </ace:column>
        </c:forEach>
        .....


The sortBy attribute of my columns are sortBy="#{fb.fieldName}". fb.fieldName contains the name of the column in the database: ID, STAUS, CREATION_DATE... or whatever.

The load code in LazyDataModel is the following:

Code:
@Override
 public List<TestIncidentBean> load(int first, int pageSize, SortCriteria[] criteria, Map<String, String> filters) {
 	log.debug("load::");
 	if(criteria.length > 0){
 		SortCriteria cr = criteria[0];
 		log.debug("load::Criteria property name=" + cr.getPropertyName());
 	}
 ...
 


And the result is:

DEBUG TestLazyIncidentListBean:52 - load::Criteria property name=fieldName

My problem is the SortCriteria.getPropertyName() method is returning "fieldName" instead of "ID", "STAUS", "CREATION_DATE". So i can´t know by which column i have to order.

I hope I explained well. I need to identify the sortedBy column.

Any help would be appreciated.

Thanks.
Hi,
I have an ace:dataTable with dynamic columns (not predefined) and lazy loading. In the method LazyDataModel.load() i need to get the columns sorted and filtered but i can't get it from SortCriteria and filters parameters because the expressions dataTable.sortBy and dataTable.filterBy are not evaluated. For example, if dataTable.sortBy=#{fieldBean.columnName} then i get "columnName" instead of "ID", "NAME" or whatever.

I can achieve this if ....

I add the following ace events in the dataTable...
Code:
<ace:ajax event="sort" execute="@this" render="@this" listener="#{testPortalViewAction.sortListener}"/>
 <ace:ajax event="filter" execute="@this" render="@this" listener="#{testPortalViewAction.filterListener}"/>
 


... and the following methods in te bean..
Code:
public void filterListener(AjaxBehaviorEvent event){
 	debug("filterListener::");
 	DataTable dt = (DataTable) event.getComponent();
 		
         for (Column column : dt.getColumns()) {
             if (!UtilidadesString.isEmpty(column.getFilterValue())) {
         		debug("filterListener::field=" + column.getId() + ", filter=" + column.getFilterValue());
             }
         }
 }
 
 public void sortListener(AjaxBehaviorEvent event) {
 		FacesContext context = FacesContext.getCurrentInstance();
 		DataTable dt = (DataTable) event.getComponent();
 		
         Map<String,String> params = context.getExternalContext().getRequestParameterMap();
         String clientId = dt.getClientId(context);
         String sortDir = params.get(clientId + "_sortDirs");
         String orden = "DESC";
         if("true".equalsIgnoreCase(sortDir)){
         	orden = "ASC";
         }
         String sortKey = params.get(clientId + "_sortKeys");
         Column sortColumn = null;
         for (Column column : dt.getColumns()) {
             if (column.getClientId(context).equals(sortKey)) {
                 sortColumn = column;
                 break;
             }
         }
         if(sortColumn != null){
     		debug("sortListener::field=" + sortColumn.getId() + ", order=" + orden);
         	
         }
 }
 


I think maybe is a more easy and standard way to do this (accessing to the SortState of the dataTable, etc) but i have read the documentation and i did not find the way.

Please. could anyone help me with this?

Thanks.

Hi,

Icefaces EE 3.3
IceMobile EE 1.3
Servlet 3.0

I generated a web project with the icefaces pluggin for eclipse and I can't do work ICEfaces and ICEmobile at the same time.

If i configure the Faces Servlet with multipart-config then the ace:fileEntry does not work. You can see this in http://host:port/Test_Ice/ice/ace_file_entry.jsf

If i configure the Faces Servlet without multipart-config then the mobi:commandButton does not work. You can see this in http://host:port/Test_Ice/mobile/mobi_command.jsf

I attach a war file. You should change the web.xml file to reproduce the issues (multipart-config)

Any help would be appreciated.

Thanks.
I'm sorry, to reproduce the problem use this url: http://host:port/Test_Ice/ice/block_ui.jsf
Hi,

Icefaces EE 3.3
IceMobile EE 1.3
Tomcat 7
Servlet 3.0

If I configure blockUIOnSubmit=true then when the user inserts special characters (á, é...) in an ice:inputText with partialSubmit=true, the jsf lifecycle fires and the user can not write properly. It occurs with Firefox 22.

I attach a war file.

Any help would be appreciated.

Thanks.
I think the problem is solved. We were using ice:outputStyle instead of h:outputStylesheet.

Using h:outputStylesheet the app resources are loading after icefaces resources.
I'm glad my post helps you.

I hope someone will help with our issue in 3.3 version.
Hello. More information...

We were using Icefaces EE 3.2 before. If we replace the 3.3 jars with de 3.2 jars the application resources are appearing before than application resources in the head again.

If we include the 3.3 jars the application resources are appearing after than application resources in the head.

Please, do you know why it could be happening?

Thanks.
Hello Icefaces Team.

We are using icefaces EE 3.3. The issue we have is that application resources (css, js..) are loading before icefaces resources (theme.css...). So we are losing the application customization.

Is this the normal behaviour? Is there any configuration we can do to avoid this?

Thanks.
 
Profile for lvqnm -> Messages posted by lvqnm [18] Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team