Ayuda Simple List Component Layout personalizado

16 Mar, 06:07 PM
5,894 Views
No Forum Badges

Buen dia necesito ayuda con este codigo,estoy usando un Simple List para visualizar información usando diferentes colores para diferenciar según el valor de un atributo, el código que estoy usando para personalizar el Component layout es el siguiente:

<c:set  mes = unit.selectSingleNode("layout:Attribute[@name='Meses']") %]

<c:when test="${ current.[%=getFieldName(mes["attribute"])%] is greater than equal to 0 and  current.[%= getFieldName(mes["attribute"])%] is less than 1 }">

<td class="[%=attr["type"]%]" background-color="red">

</c:when>      

<c:when test="${ current.[%=getFieldName(mes["attribute"])%] is greater than equal to 1 and  current.[%= getFieldName(mes["attribute"])%] is less than 2 }">

<td class="[%=attr["type"]%]" background-color="orange">

</c:when>

<c:when test="${ current.[%= getFieldName(mes["attribute"])%] is greater than equal to 2 and  current.[%= getFieldName(mes["attribute"])%] is less than equal to 3 }">

    <td class="[%=attr["type"]%]" background-color="yellow">

</c:when>

<c:otherwise"> 

  <td class="[%=attr["type"]%]" >

</c:otherwise>

 

Sin embargo, al generar me indica un error que dice que la propiedad "mes" no 

 
x 0
Follow
Answer Answer at this question and get points!
Forum Hero - Level 9

Hi Gabriela,

this error seems related to the wrong definition of "mes". In fact it should be defined as Groovy variable instead of JSTL.

Moreover the argument of getFieldName(mes["attribute"]) could also wrong.

It may be like this:

 

def mes = unit.selectSingleNode("layout:Attribute[@name='Meses']")

...

test="${ current.[%= getFieldName(mes)%] ge 1...}

 

You can find an example of getFiledName method here https://my.webratio.com/learn/learningobject/handling-blobs

Please check and fix sintax of the jstl tags and their uses.

 

I hope this will help you.

Regads

   
x 0
Answer at this question and get points!

Related questions

2 grids inside one/same cell result in non-selectable 2nd grid Access page variable in a page template add html Ajax is not working in own style project Ajax web app with javascript history object using the WebRatio Alimentar graficas con base de datos Alternate way to get current User Oid in layout template groovy script? Any way to localize the Tab Grid Template (Webratio Store)? Applicare un template ad un Web Project Bootstrap Style Button to go on another page Cambiare dimensioni bottoni - Change button size Can I inject html into custom unit template?! Change color template bootstrap style Change Style Changing the login page does not work ckeditor - change directory for the browser Colore Attributi index unit Dinamico - Index unit dynamic attribute color Como abrir una ventana en ajax desde una master page Como embeber un video subido desde archivo ? Como mostrar una imagen de portada arriba del menu? Como mostrar una imagen en una lista o en la componente detalles? Confirm Dialog Criptare dati sensibili nel database CSV Component with utf8 encoding Custom components Custom descriptors Customize layout mobile platform Custom Plug-in Custom Time Unit Custom Tooltip Position Custom Unit and AJAX / SOAP Custom Unit: Difficult example in Guide ... any suggestions? Data flow from a page which is not visible anymore Default error pages default login page Display contents of a URL Dynamic link labelling for Custom Unit Encoding Confirm Dialog Error in Excel Unit - Font size Export to a HTML/CSS/JS project Field as link soruce file analysis then update MySQL database File CSS non considerato in generazione Form element Form template Get date pattern Get home page from template Google map is not shown properly in the tab grid Google Map Unit Guardar Saltos de LINEA HelloWorld Unit sample code Hiding landmarks (or flows) when the user is logged in How can I add a credit card payment gateway or integrate paypal in my web app logic? How can i create pagemenu or landmarkmenu with multiple levels. How can I modified the htmls files to perform my style how can i open a pdf file using download dialog How complex can Custom Unit output be? How to add an image in a modal/pop-up window? How to include a template into other template? How to localize AJAX waiting dialog? How to localize the multi message unit in the notification layout How to modify template? How to modify the FertileEnviroment Default page How to remove default Linked Resources? How to run the example from Custom Unit Guide? How to use LandmarkMenu as AJAX navigation how to use the landmark menu as AJAX navigation integrate framework to webratio mobile Integrazione javascript Is there any custom unit store or repository? Do you create/sell custom units? java.lang.NullPointerException Javascript and html javascript history object Localize "Welcome..." and "Process details" logo webratio meaning of each tag in the XML code (Show XML/Show Layout XML) modify field html Modify html generated by wr:NavigationBar More Custom Unit questions: example of Content and Operation Unit? Need help with Landmark Overlays for Google Map Unit. Pages Problem After Project Generation pass template variable Personalizzazione del login component Problema Invocation Unit Problem Login Form only if user not logged Problem print Problems with Custom components: Can't get values from output parameters on ok flow. Problems with the page refresh (Tab Grid) Problem with adding templates query unit who to hide fields that are used in a link Recursive Hierarchical Index Unit Style Tree Redirect to the default module Remove default BPM css import for all templates Responsive Bootstrap Grid Responsive Layout Manager "Run Now" on a job scheduled to run later Selezione sul giorno "Events Planning" Set context parameter Simple Static Page Standard confirm dialog replacement Status ProcessInstance and activityInstance in spanish Stored procedure component Style hierarchical unit help!! Supoort for Mobile and Desktop display Target tabs in Tab Grid Control Tooltip on a field Too much layout parameters = no scroll in parameters config window Twitter Unit - Get Geo location of twitt Uppercase Usage of the Gantt Unit Use image as interaction flow ¿Visor de imágenes y reproductor de video para la versión 7.2? Image viewer and video player for version 7.2? Vista de diferentes Site Views Webratio Add-ons no permite login Webratio don't recognize JSON library WebRatio Platform 7.2 Community Cloud Edition wr-ajaxDivs break layout on ajax pages.