Giter Site home page Giter Site logo

Comments (9)

gamerson avatar gamerson commented on June 6, 2024

You can see that in liferay portlets many times stylesheets and scripts and css files are loaded dynamically by developer and they don't exist statically anywhere.

from eclipse-wtp-webresources.

gamerson avatar gamerson commented on June 6, 2024

Of course a workaround is to switch webresources validation levels to "INGORE" for this project. But I would like to investigate a more dynamic solution.

from eclipse-wtp-webresources.

angelozerr avatar angelozerr commented on June 6, 2024

I'm happy that you create this issue. I'm waiting for you create it in order we can discuss together :)

There is 2 solutions to support this :

  • extension point : provide an extension point to disable validation for some link of html file (not the whole).
  • IURIResolver : if you see my code, I use IURIResolver. Goal of this interface is to resolve path. Today it exists only DefaultURIResolver, but my idea is to provide an extension point to provide your own URIResolver. It will be very hard, but my idea is to provide a LiferayURIResolver which resolve <% PortalUtil.getStaticResourceURL(....

What do you think about this idea?

from eclipse-wtp-webresources.

gamerson avatar gamerson commented on June 6, 2024

Hey @angelozerr i just saw your message and I had already prepared a possible solution. The one I just pushed here: #15 it adds a default exclude rule for all jsps files for webresources. And then the "as you type" validation always checks that validation setting first before adding those errors to the source view.

Then for jsp developers if they want the feature in their jsp they can activate it per project or per workspace, by removing the default exclude rule and adding in a rule for jsp content type.

What do you think about this solution?

from eclipse-wtp-webresources.

gamerson avatar gamerson commented on June 6, 2024

however, if you don't want to go this route, then I'm find with an extension point that lets me "look" at the attribute value and and if it looks like a JSP expression I can tell webresources validation to 'ignore' it.

Either way works ok for me.

from eclipse-wtp-webresources.

angelozerr avatar angelozerr commented on June 6, 2024

however, if you don't want to go this route, then I'm find with an extension point that lets me "look" at the attribute value and and if it looks like a JSP expression I can tell webresources validation to 'ignore' it.

I don't want to decide, but I tell me that an extension point to ignore error should be better. We could provide a default implementation with JSP which ignore validation when it find some <%

With this mean you could have validation inside JSP for link which don't use <%

What do you think?

from eclipse-wtp-webresources.

gamerson avatar gamerson commented on June 6, 2024

I'm fine with this way, an extension point to allow most jsps to work but
they can be disabled by extension point would be good.

On Tue, Sep 30, 2014 at 8:25 PM, Angelo [email protected] wrote:

however, if you don't want to go this route, then I'm find with an
extension point that lets me "look" at the attribute value and and if it
looks like a JSP expression I can tell webresources validation to 'ignore'
it.

I don't want to decide, but I tell me that an extension point to ignore
error should be better. We could provide a default implementation with JSP
which ignore validation when it find some <%

With this mean you could have validation inside JSP for link which don't
use <%

What do you think?


Reply to this email directly or view it on GitHub
#14 (comment)
.

Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com

from eclipse-wtp-webresources.

gamerson avatar gamerson commented on June 6, 2024

Did you decide on a direction?

On Tue, Sep 30, 2014 at 10:11 PM, Greg Amerson [email protected]
wrote:

I'm fine with this way, an extension point to allow most jsps to work but
they can be disabled by extension point would be good.

On Tue, Sep 30, 2014 at 8:25 PM, Angelo [email protected] wrote:

however, if you don't want to go this route, then I'm find with an
extension point that lets me "look" at the attribute value and and if it
looks like a JSP expression I can tell webresources validation to 'ignore'
it.

I don't want to decide, but I tell me that an extension point to ignore
error should be better. We could provide a default implementation with JSP
which ignore validation when it find some <%

With this mean you could have validation inside JSP for link which don't
use <%

What do you think?


Reply to this email directly or view it on GitHub
#14 (comment)
.

Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com

Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com

from eclipse-wtp-webresources.

angelozerr avatar angelozerr commented on June 6, 2024

I would like to do an extension point for that, but I had no time to do it-(

from eclipse-wtp-webresources.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.