1 Reply Latest reply on Apr 28, 2013 6:49 AM by sahar

    Set property by Value type

    sahar Newbie

      Hi,I'm newbie in modeshape.


      I have an email node with CC property ( Value[] type) that get multi  userNode's path (as String)

      in my Bean class i have a cc variable with Value[] type

      for set this variable I use this :

      EmailBean emailBean=new EmailBean();



      how can I set  value for the emailBean.CC Variable with VALUE type ?

      I will be appreciate if any body help me.

      Thank you

        • 1. Re: Set property by Value type
          sahar Newbie

          I could find the answer in http://forums.adobe.com/message/4885946http://


          Node pageNode=currentPage.getContentResource().adaptTo(Node.class);

          Value vs[]=new Value[0];

          List<Value> employeeIdList=new ArrayList<Value>();

          for(Value v : pageNode.getProperty("mytest").getValues()) {





          ValueFactory vFactory=pageNode.getSession().getValueFactory();

          Value newValue=vFactory.createValue("nextvalue");


          Value[] finalValues=(Value[])employeeIdList.toArray(vs);