Re: using CssResourceReference for css file that lives in webapp

2017-08-04 Thread Andrea Del Bene
At the moment I think Maxim's approach is the best possible. I will try to
find a way to improve the overall mechanism.

On Thu, Aug 3, 2017 at 9:49 AM, Andrea Del Bene 
wrote:

> I will try yo have a look at this today.
>
> Thank you!
>
> On Thu, Aug 3, 2017 at 9:45 AM, Maxim Solodovnik 
> wrote:
>
>> Currently using this approach:
>>
>> final String suffix = DEVELOPMENT ==
>> getApplication().getConfigurationType() ? "" : ".min";
>> response.render(CssHeaderItem.forUrl(String.format("css/theme%s.css",
>> suffix)));
>>
>>
>> On Thu, Aug 3, 2017 at 2:40 PM, lucast  wrote:
>>
>> > I'd like to second Maxim on this.
>> > I am loading font files from the css file, and using
>> > ContextRelativeResourceReference did not work.
>> >
>> > I did not post my findings since I presumed it must have been something
>> I
>> > did wrong, or that it didn't work due to lack of understanding on my
>> part.
>> >
>> > Kind regards,
>> > Lucas
>> >
>> > --
>> > View this message in context: http://apache-wicket.1842946.
>> > n4.nabble.com/using-CssResourceReference-for-css-
>> > file-that-lives-in-webapp-tp4678358p4678413.html
>> > Sent from the Users forum mailing list archive at Nabble.com.
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>>
>>
>> --
>> WBR
>> Maxim aka solomax
>>
>
>


Re: using CssResourceReference for css file that lives in webapp

2017-08-03 Thread Andrea Del Bene
I will try yo have a look at this today.

Thank you!

On Thu, Aug 3, 2017 at 9:45 AM, Maxim Solodovnik 
wrote:

> Currently using this approach:
>
> final String suffix = DEVELOPMENT ==
> getApplication().getConfigurationType() ? "" : ".min";
> response.render(CssHeaderItem.forUrl(String.format("css/theme%s.css",
> suffix)));
>
>
> On Thu, Aug 3, 2017 at 2:40 PM, lucast  wrote:
>
> > I'd like to second Maxim on this.
> > I am loading font files from the css file, and using
> > ContextRelativeResourceReference did not work.
> >
> > I did not post my findings since I presumed it must have been something I
> > did wrong, or that it didn't work due to lack of understanding on my
> part.
> >
> > Kind regards,
> > Lucas
> >
> > --
> > View this message in context: http://apache-wicket.1842946.
> > n4.nabble.com/using-CssResourceReference-for-css-
> > file-that-lives-in-webapp-tp4678358p4678413.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> WBR
> Maxim aka solomax
>


Re: using CssResourceReference for css file that lives in webapp

2017-08-03 Thread Maxim Solodovnik
Currently using this approach:

final String suffix = DEVELOPMENT ==
getApplication().getConfigurationType() ? "" : ".min";
response.render(CssHeaderItem.forUrl(String.format("css/theme%s.css",
suffix)));


On Thu, Aug 3, 2017 at 2:40 PM, lucast  wrote:

> I'd like to second Maxim on this.
> I am loading font files from the css file, and using
> ContextRelativeResourceReference did not work.
>
> I did not post my findings since I presumed it must have been something I
> did wrong, or that it didn't work due to lack of understanding on my part.
>
> Kind regards,
> Lucas
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/using-CssResourceReference-for-css-
> file-that-lives-in-webapp-tp4678358p4678413.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
WBR
Maxim aka solomax


Re: using CssResourceReference for css file that lives in webapp

2017-08-03 Thread lucast
I'd like to second Maxim on this.
I am loading font files from the css file, and using
ContextRelativeResourceReference did not work.

I did not post my findings since I presumed it must have been something I
did wrong, or that it didn't work due to lack of understanding on my part.

Kind regards,
Lucas

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-CssResourceReference-for-css-file-that-lives-in-webapp-tp4678358p4678413.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: using CssResourceReference for css file that lives in webapp

2017-08-02 Thread Maxim Solodovnik
Hello Andrea,

i just have tried to use ContextRelativeResourceReference
The CSS is being loaded with minification which is great
But unfortunately images located in css folder are not being found :(

example

/css/theme.css
   background-image:url(images/image1.png)
/css/images/image1.png

so it is not very useful right now :(

On Mon, Jul 31, 2017 at 7:48 PM, Andrea Del Bene 
wrote:

> I was about to suggest the same classes :-)
>
> On Mon, Jul 31, 2017 at 1:08 PM, Vit Rozkovec 
> wrote:
>
> > Hi,
> > have a look at those classes:
> >
> > ContextRelativeResource
> > ContextRelativeResourceReference
> >
> > Vit
> >
> >
> > On 07/31/2017 01:01 PM, lucast wrote:
> >
> >> Thank you, Maxim.
> >>
> >> Since I am managing all css files and js files form my java class, I was
> >> wondering if there is an equivalent to the HTML of  rel="stylesheet"
> >> href="css/style.css" ... that one could use from the java class.
> >>
> >> The only motivation is to try to manage as much as I can from the class,
> >> and
> >> keep the HMTL to a bare minimum.
> >>
> >> I can have a css file that lives alongside the java class, I just
> thought
> >> that it would be nice to have all css files under a single location,
> under
> >> webapp file. However, this is more of a Would-Like-To-Have than anything
> >> else.
> >>
> >> Thanks once more,
> >>
> >> --
> >> View this message in context: http://apache-wicket.1842946.n
> >> 4.nabble.com/using-CssResourceReference-for-css-file-that-
> >> lives-in-webapp-tp4678358p4678360.html
> >> Sent from the Users forum mailing list archive at Nabble.com.
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>



-- 
WBR
Maxim aka solomax


Re: using CssResourceReference for css file that lives in webapp

2017-07-31 Thread Andrea Del Bene
I was about to suggest the same classes :-)

On Mon, Jul 31, 2017 at 1:08 PM, Vit Rozkovec  wrote:

> Hi,
> have a look at those classes:
>
> ContextRelativeResource
> ContextRelativeResourceReference
>
> Vit
>
>
> On 07/31/2017 01:01 PM, lucast wrote:
>
>> Thank you, Maxim.
>>
>> Since I am managing all css files and js files form my java class, I was
>> wondering if there is an equivalent to the HTML of > href="css/style.css" ... that one could use from the java class.
>>
>> The only motivation is to try to manage as much as I can from the class,
>> and
>> keep the HMTL to a bare minimum.
>>
>> I can have a css file that lives alongside the java class, I just thought
>> that it would be nice to have all css files under a single location, under
>> webapp file. However, this is more of a Would-Like-To-Have than anything
>> else.
>>
>> Thanks once more,
>>
>> --
>> View this message in context: http://apache-wicket.1842946.n
>> 4.nabble.com/using-CssResourceReference-for-css-file-that-
>> lives-in-webapp-tp4678358p4678360.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: using CssResourceReference for css file that lives in webapp

2017-07-31 Thread Vit Rozkovec

Hi,
have a look at those classes:

ContextRelativeResource
ContextRelativeResourceReference

Vit

On 07/31/2017 01:01 PM, lucast wrote:

Thank you, Maxim.

Since I am managing all css files and js files form my java class, I was
wondering if there is an equivalent to the HTML of http://apache-wicket.1842946.n4.nabble.com/using-CssResourceReference-for-css-file-that-lives-in-webapp-tp4678358p4678360.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: using CssResourceReference for css file that lives in webapp

2017-07-31 Thread lucast
Thank you, Maxim.

Since I am managing all css files and js files form my java class, I was
wondering if there is an equivalent to the HTML of http://apache-wicket.1842946.n4.nabble.com/using-CssResourceReference-for-css-file-that-lives-in-webapp-tp4678358p4678360.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: using CssResourceReference for css file that lives in webapp

2017-07-31 Thread Maxim Solodovnik
You can include this css in markup instead of java

On Mon, Jul 31, 2017 at 4:39 PM, lucast  wrote:
> Dear Forum,
> I'm implementing a base wicket page where I load all of my CSS and
> javascript.
>
> I'm loading files from java class by using
>
>
>
> Is there a way to load a css file that lives under the webapp folder
> directly from the java class?
> At the moment, I'm using
>
> response_.render( CssHeaderItem.forReference(new
> CssResourceReference(WicketBasePage.class, "mcc-style.css" ) ) );
>
> where mcc-style.css lives alongside my java class, and inside of the
> mcc-style.css, I have placed a very long reference to the css file that
> lives under webapp:
>
>
>
> Thanks in advance,
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/using-CssResourceReference-for-css-file-that-lives-in-webapp-tp4678358.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
WBR
Maxim aka solomax

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



using CssResourceReference for css file that lives in webapp

2017-07-31 Thread lucast
Dear Forum,
I'm implementing a base wicket page where I load all of my CSS and
javascript.

I'm loading files from java class by using 



Is there a way to load a css file that lives under the webapp folder
directly from the java class?
At the moment, I'm using 

response_.render( CssHeaderItem.forReference(new
CssResourceReference(WicketBasePage.class, "mcc-style.css" ) ) );

where mcc-style.css lives alongside my java class, and inside of the
mcc-style.css, I have placed a very long reference to the css file that
lives under webapp:



Thanks in advance,



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/using-CssResourceReference-for-css-file-that-lives-in-webapp-tp4678358.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org