Skip navigation
pin7
Currently Being Moderated

ParsleyModuleDescriptor setup

Jan 3, 2011 9:39 AM

Hi,

 

Is there a way to set ParsleyModuleDescriptor url property dynamically? (I mean, not in context)

 

Thanks.

 
Replies
  • Currently Being Moderated
    Jan 7, 2011 1:44 AM   in reply to pin7

    Hi,

     

    Basically I never had a use case yet where I needed to actually update the url of a module descriptor dynamically outside of my context as I mostly use the context as an application configuration.

    However I do sometimes use in my context a binding expression for the url property for example to build a URL dynamically etc ... But from what I understand you want to change the URL dynamically from outside the context after it has been created, right ?

     

    Unfortunately the url property of the ParsleyModuleManager is private and therefore you will not be able to change it after injecting it from the context to your class. One solution would be to bypass the definition of the Module Descriptor in the context and create a new instance of ParsleyModuleManager in your class but this is kind of hacky and i'm not sure about how things are going to behave.

     

    I'm wondering why you need to dynamically change the url of a module outside of the context ? I would like to understand your usecase. If we find it is a valid use-case that we did not think about, I will create an enhancement request to add this feature into the lib

     

    Cheers!

    /yaniv

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points