jsf - Get Values from a valueExpression JSF1.2 -
i trying value contained in value expression. need utilize validation. when set value look in htmloutput displayed on screen. please suggest doing wrong?
htmloutputtext output = new htmloutputtext(); ve = ef.createvalueexpression(elctx, "#{dynamicrow["+ + "]}", string.class); //i have tried options here came across. //either test1 , test2 , test3 should have value ve has, of them have value "". string test1 = (string)ve.getvalue(elctx); string test2 = (string)output.getvalue(); application app = fctx.getapplication( ); string test3 = (string) app.evaluateexpressionget(fctx, "#{dynamicrow["+ + "]}", string.class); output.setvalueexpression("value", ve); //the ve gets displayed in column right string values , not "" column.getchildren().add(output); // tried valuereference given in valueexpression: how base of operations object? valuereference valuereference = ve.getvaluereference(elctx); //an exception thrown here javax.el.propertynotfoundexception: target unreachable, identifier 'dynamicrow' resolved null object base of operations = valuereference.getbase(); object property = valuereference.getproperty();
where table has next code:
facescontext fctx = facescontext.getcurrentinstance(); elcontext elctx = fctx.getelcontext(); expressionfactory ef = fctx.getapplication().getexpressionfactory(); htmlextendeddatatable dynamicdatatable = new htmlextendeddatatable(); htmldatascroller datascroller = new htmldatascroller(); valueexpression ve = ef.createvalueexpression(elctx,"#{mycontroller.dynamiclist}", list.class); dynamicdatatable.setvalueexpression("value", ve); dynamicdatatable.setvar("dynamicrow");
the var
value dynamicrow
in scope when table places scope during processing. done various process*
methods on component.
see setrowindex(int)
documentation:
var
property not null, remove corresponding request scope attribute (if any). reset state info descendant components (as described below). if new rowindex value not -1: if var
property not null, phone call getrowdata() , expose resulting info object request scope attribute key var property value. reset state info descendant components (as described below). jsf el
No comments:
Post a Comment