Announcement Announcement Module
Collapse
No announcement yet.
Referencing beans in context in views.properties Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Referencing beans in context in views.properties

    I had read that i can place

    <viewname>.(ref)=<beanId>

    in my views.properties file.

    Am I mistaken on this, or am I just doing something wrong?

    Thanks.

  • #2
    Originally posted by dmfrey
    I had read that i can place

    <viewname>.(ref)=<beanId>

    in my views.properties file.

    Am I mistaken on this, or am I just doing something wrong?

    Thanks.
    I don't think you can create an alias to a bean. You *can* reference beans....

    If I have in -servlet.xml:
    Code:
    <bean id="myService" class="...">
    </bean>
    then in views.properties you can do:

    Code:
    myCustomView.myService(ref)=myService
    which will call setMyService(myService) on myCustomView....

    Check out http://static.springframework.org/sp...ionReader.html

    Comment


    • #3
      Thanks. That is just what i needed. I wasn't referencing a property in my views.properties.

      <viewName>.<beanName>(ref)=<beanName>

      Comment


      • #4
        Glad to help

        Comment

        Working...
        X