javascript - Expression Language - how to access whole array? -


i'm using following code:

<p:inputtext label="bezeichnung"      required="#{param['form_inhalt:artikeldatatable[0]:entfernen']==null}"           value="#{artikeldata.bezeichung}"></p:inputtext> 

i need access ids in 'artikeldatatable'. how i'm able this? should return false if button in table activated. works fine 1 button [0] need check buttons in id-array.

#param['form_inhalt:artikeldatatable:0:entfernen']==nullandparam['form_inhalt:artikeldatatable:1:entfernen']==null} 

is there way check whole array?

basically i'm searching wildcard * ids from

param['form_inhalt:artikeldatatable:0:entfernen']

to param['form_inhalt:artikeldatatable:99999:entfernen']

or have write java script function iterates array , returns true?

if so, how can access #{param... stuff via javascript?

thank much!

share|improve question
    
what kind of data structure form_inhalt:artikeldatatable[0]? – smutje dec 2 '14 @ 11:25
    
primefaces datatable, list (arraylist) in backing bean. "entfernen" id of commandbutton. – 98percentmonkey dec 2 '14 @ 12:29
    
is necessary access ui components? otherwise, access bound view bean object. – smutje dec 2 '14 @ 12:35
    
stackoverflow.com/questions/14335610/… was/is problem, instead of 1 button, have multiple buttons in every row of table, remove elements of table (where validation should not executed). – 98percentmonkey dec 2 '14 @ 12:41
    
why don't have buttons in table toggle single boolean variable? way check 1 variable in input text – kolossus dec 2 '14 @ 16:31
private boolean checkbuttonbeschaffung() {         boolean globalvalue = false;         facescontext facescontext = facescontext.getcurrentinstance();         map<string, string> parametermap = (map<string, string>) facescontext.getexternalcontext().getrequestparametermap();          (int = 0; < 50; i++) {             stringbuilder sb = new stringbuilder("form_inhalt:artikeldatatable:");             sb.append(i);             sb.append(":entfernen");             string param = parametermap.get(sb.tostring());             // wenn irgendeiner der entfernen buttons gedrueckt wurde, dann return = false             if (param == null) {                 globalvalue = true;             } else {                 globalvalue = false;                 break;             }         }         return globalvalue;     } 

i'm runing through requestparametermap , check buttons (ok till 50) if have been pressed.

share|improve answer

your answer

 
discard

posting answer, agree privacy policy , terms of service.

not answer you're looking for? browse other questions tagged or ask own question.

Comments