Prettyfaces: Set a bean property to some constant value, on observing a specific url pattern

前端 未结 2 1108
庸人自扰
庸人自扰 2021-01-24 08:06

While writing the URL mapping rules for Prettyfaces in pretty-config.xml I would like to add a rule that whenever a particular pattern is observed in URL then set a

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-24 08:19

    as i am using prettyfaces annotations i dont know about pretty-config.xml if i got this condition then i will use it in annotations like this

     @URLAction(mappingId = "someMappingId", onPostback = false)
     public String setConstantValue() {
    
    // set your bean here
    return null;
    
    }
    

提交回复
热议问题