3 Replies Latest reply on Jan 2, 2008 10:28 AM by Nick Belaevski

    Gradient

    Tim Evers Master

      Hi all...

      I was looking at the GradientA class and navigating around seeing what goes on....(which I'm still trying to work out :)

      currently gradients are basically preset by the skin in a form something like this

      url(/gekko-tje/web/a4j_3_1_1-SNAPSHOTorg.richfaces.renderkit.html.GradientA/DATB/eAF7emTy1lIvAA7XA7E_)


      And what I would like to know is how possible would it be to be able to generate gradients by doing something like
      url(/gekko-tje/web/a4j_3_1_1-SNAPSHOTorg.richfaces.renderkit.html.GradientA?height=10&width=10&basecolor=FFFFFF&gradientcolor=000000)

      etc... basically the params will be interpreted and I'll get back the gradient.

      This way gradients could be created easily and customised quickly

      How hard would this be to do?

        • 1. Re: Gradient
          Nick Belaevski Master

          It's not possible and I personally do not recommend to do such things as it's easy to make DOS attack by requesting 1 trillion size gradient. That's the reason why framework crypts parameters.

          • 2. Re: Gradient
            Tim Evers Master

            Well, I'm pretty sure you could stop DOS attacks with a little effort, I'm not concerned with them at all at the moment as I am behind a firewall and only the internal network has access to my application. So, I would still be interested in being able to achieve my goal. But you do have a valid point and I would definitly need to consider it before I ever published an application to the web.

            Thanks

            • 3. Re: Gradient
              Nick Belaevski Master

              I've checked over the code again. In principle, you can implement such functionality if it's needed. Check org.ajax4jsf.resource.ServletResourceContext, org.ajax4jsf.resource.FacesResourceContext, org.ajax4jsf.resource.Java2Dresource and related classes for more.