You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by SteamR <rs...@carrot.no> on 2008/04/01 07:10:27 UTC

Re: Mount causes strange effects on my web application

I have now searched the html files, and can't find any empty src attributes.
And it only happens when I add the 

mount("/pwa", PackageName.forClass(CategoryPage.class));

in my WebApplication class' init method. 

(I also have relocated the html files to the "src/main/webapp" folder, if
that has something to do with it.)

Well, I will try to strip down the code, to bare minimum and maybe post the
full code here thereafter.





SteamR wrote:
> 
> Hi,  I hope someone could help me with this...
> 
> I have 5 pages which are pretty standalone but stateful, and they have
> nothing to do with each other.
> 
> Now I thought of having bookmarks for each of these pages, and added a
> mount point to /pwa.
> 
> Now the problems started; my page's constructor was invoked three times
> before actual output occured (it has an empty constructor), and a form
> object loses its transient fields during a request-response cycle.
> 
> The transient field getting lost, is something I can fix, but invoking the
> constructor three times and why wicket does so, is very strange...?
> 
> Anyone know any answer to this...
> 
> Btw, I am running wicket 1.3.1
> 

-- 
View this message in context: http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16413621.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Mount causes strange effects on my web application

Posted by Igor Vaynberg <ig...@gmail.com>.
see ContextImage and how it generates the necessary ../../ prefix, do
the same for your javascript inside iheadercontributor.

-igor


On Thu, Apr 3, 2008 at 11:22 PM, SteamR <rs...@carrot.no> wrote:
>
>  My project structure is as follows:
>
>  root
>   --> WEB-INF
>           --> classes
>           --> libs
>   --> css
>          -->css-files
>   --> js
>          -->javascript files.
>   --> images
>          -->image files.
>   -->
>     html files.
>
>
>  I have changed the default location of the resources, to reflect the
>  directory structure (by following the information on wiki:
>  (http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html).
>
>
>
>
>
>  igor.vaynberg wrote:
>  >
>  > where does your javascript live? context folder? package folder?
>  >
>  > -igor
>  >
>  >
>  > On Thu, Apr 3, 2008 at 2:22 AM, SteamR <rs...@carrot.no> wrote:
>  >>
>  >>  OK, it seems that image paths are filtered with correct path, and thus
>  >> leaves
>  >>  my javascript reference as is, since I add it myself. Is there somehow I
>  >> can
>  >>  find out what path is correct, since I am adding javascript reference in
>  >> my
>  >>  java code???
>  >>
>  >>
>  >>
>  >>
>  >>  SteamR wrote:
>  >>  >
>  >>  > I found out that it was a js sourcefile reference which were added in
>  >> code
>  >>  > (in a onRendered method), that when app was mounted, caused the
>  >> lookups to
>  >>  > be sent to the page instead... So that seems that relative paths are
>  >> nogos
>  >>  > when mounted???
>  >>  >
>  >>  > But strange is that images seems to work ok, they also use relative
>  >>  > path...
>  >>  >
>  >>  >
>  >>  > SteamR wrote:
>  >>  >>
>  >>  >> I have now searched the html files, and can't find any empty src
>  >>  >> attributes. And it only happens when I add the
>  >>  >>
>  >>  >> mount("/pwa", PackageName.forClass(CategoryPage.class));
>  >>  >>
>  >>  >> in my WebApplication class' init method.
>  >>  >>
>  >>  >> (I also have relocated the html files to the "src/main/webapp"
>  >> folder, if
>  >>  >> that has something to do with it.)
>  >>  >>
>  >>  >> Well, I will try to strip down the code, to bare minimum and maybe
>  >> post
>  >>  >> the full code here thereafter.
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >> SteamR wrote:
>  >>  >>>
>  >>  >>> Hi,  I hope someone could help me with this...
>  >>  >>>
>  >>  >>> I have 5 pages which are pretty standalone but stateful, and they
>  >> have
>  >>  >>> nothing to do with each other.
>  >>  >>>
>  >>  >>> Now I thought of having bookmarks for each of these pages, and added
>  >> a
>  >>  >>> mount point to /pwa.
>  >>  >>>
>  >>  >>> Now the problems started; my page's constructor was invoked three
>  >> times
>  >>  >>> before actual output occured (it has an empty constructor), and a
>  >> form
>  >>  >>> object loses its transient fields during a request-response cycle.
>  >>  >>>
>  >>  >>> The transient field getting lost, is something I can fix, but
>  >> invoking
>  >>  >>> the constructor three times and why wicket does so, is very
>  >> strange...?
>  >>  >>>
>  >>  >>> Anyone know any answer to this...
>  >>  >>>
>  >>  >>> Btw, I am running wicket 1.3.1
>  >>  >>>
>  >>  >>
>  >>  >>
>  >>  >
>  >>  >
>  >>
>  >>  --
>  >>  View this message in context:
>  >> http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16467343.html
>  >>
>  >>
>  >> Sent from the Wicket - User mailing list archive at Nabble.com.
>  >>
>  >>
>  >>  ---------------------------------------------------------------------
>  >>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  >>  For additional commands, e-mail: users-help@wicket.apache.org
>  >>
>  >>
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  > For additional commands, e-mail: users-help@wicket.apache.org
>  >
>  >
>  >
>
>  --
>  View this message in context: http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16485866.html
>
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Mount causes strange effects on my web application

Posted by SteamR <rs...@carrot.no>.
My project structure is as follows:

root
  --> WEB-INF
          --> classes
          --> libs
  --> css
         -->css-files
  --> js
         -->javascript files.
  --> images
         -->image files.
  --> 
    html files.


I have changed the default location of the resources, to reflect the
directory structure (by following the information on wiki:
(http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html). 



igor.vaynberg wrote:
> 
> where does your javascript live? context folder? package folder?
> 
> -igor
> 
> 
> On Thu, Apr 3, 2008 at 2:22 AM, SteamR <rs...@carrot.no> wrote:
>>
>>  OK, it seems that image paths are filtered with correct path, and thus
>> leaves
>>  my javascript reference as is, since I add it myself. Is there somehow I
>> can
>>  find out what path is correct, since I am adding javascript reference in
>> my
>>  java code???
>>
>>
>>
>>
>>  SteamR wrote:
>>  >
>>  > I found out that it was a js sourcefile reference which were added in
>> code
>>  > (in a onRendered method), that when app was mounted, caused the
>> lookups to
>>  > be sent to the page instead... So that seems that relative paths are
>> nogos
>>  > when mounted???
>>  >
>>  > But strange is that images seems to work ok, they also use relative
>>  > path...
>>  >
>>  >
>>  > SteamR wrote:
>>  >>
>>  >> I have now searched the html files, and can't find any empty src
>>  >> attributes. And it only happens when I add the
>>  >>
>>  >> mount("/pwa", PackageName.forClass(CategoryPage.class));
>>  >>
>>  >> in my WebApplication class' init method.
>>  >>
>>  >> (I also have relocated the html files to the "src/main/webapp"
>> folder, if
>>  >> that has something to do with it.)
>>  >>
>>  >> Well, I will try to strip down the code, to bare minimum and maybe
>> post
>>  >> the full code here thereafter.
>>  >>
>>  >>
>>  >>
>>  >>
>>  >>
>>  >> SteamR wrote:
>>  >>>
>>  >>> Hi,  I hope someone could help me with this...
>>  >>>
>>  >>> I have 5 pages which are pretty standalone but stateful, and they
>> have
>>  >>> nothing to do with each other.
>>  >>>
>>  >>> Now I thought of having bookmarks for each of these pages, and added
>> a
>>  >>> mount point to /pwa.
>>  >>>
>>  >>> Now the problems started; my page's constructor was invoked three
>> times
>>  >>> before actual output occured (it has an empty constructor), and a
>> form
>>  >>> object loses its transient fields during a request-response cycle.
>>  >>>
>>  >>> The transient field getting lost, is something I can fix, but
>> invoking
>>  >>> the constructor three times and why wicket does so, is very
>> strange...?
>>  >>>
>>  >>> Anyone know any answer to this...
>>  >>>
>>  >>> Btw, I am running wicket 1.3.1
>>  >>>
>>  >>
>>  >>
>>  >
>>  >
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16467343.html
>>
>>
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>  For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16485866.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Mount causes strange effects on my web application

Posted by Igor Vaynberg <ig...@gmail.com>.
where does your javascript live? context folder? package folder?

-igor


On Thu, Apr 3, 2008 at 2:22 AM, SteamR <rs...@carrot.no> wrote:
>
>  OK, it seems that image paths are filtered with correct path, and thus leaves
>  my javascript reference as is, since I add it myself. Is there somehow I can
>  find out what path is correct, since I am adding javascript reference in my
>  java code???
>
>
>
>
>  SteamR wrote:
>  >
>  > I found out that it was a js sourcefile reference which were added in code
>  > (in a onRendered method), that when app was mounted, caused the lookups to
>  > be sent to the page instead... So that seems that relative paths are nogos
>  > when mounted???
>  >
>  > But strange is that images seems to work ok, they also use relative
>  > path...
>  >
>  >
>  > SteamR wrote:
>  >>
>  >> I have now searched the html files, and can't find any empty src
>  >> attributes. And it only happens when I add the
>  >>
>  >> mount("/pwa", PackageName.forClass(CategoryPage.class));
>  >>
>  >> in my WebApplication class' init method.
>  >>
>  >> (I also have relocated the html files to the "src/main/webapp" folder, if
>  >> that has something to do with it.)
>  >>
>  >> Well, I will try to strip down the code, to bare minimum and maybe post
>  >> the full code here thereafter.
>  >>
>  >>
>  >>
>  >>
>  >>
>  >> SteamR wrote:
>  >>>
>  >>> Hi,  I hope someone could help me with this...
>  >>>
>  >>> I have 5 pages which are pretty standalone but stateful, and they have
>  >>> nothing to do with each other.
>  >>>
>  >>> Now I thought of having bookmarks for each of these pages, and added a
>  >>> mount point to /pwa.
>  >>>
>  >>> Now the problems started; my page's constructor was invoked three times
>  >>> before actual output occured (it has an empty constructor), and a form
>  >>> object loses its transient fields during a request-response cycle.
>  >>>
>  >>> The transient field getting lost, is something I can fix, but invoking
>  >>> the constructor three times and why wicket does so, is very strange...?
>  >>>
>  >>> Anyone know any answer to this...
>  >>>
>  >>> Btw, I am running wicket 1.3.1
>  >>>
>  >>
>  >>
>  >
>  >
>
>  --
>  View this message in context: http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16467343.html
>
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Mount causes strange effects on my web application

Posted by SteamR <rs...@carrot.no>.
OK, it seems that image paths are filtered with correct path, and thus leaves
my javascript reference as is, since I add it myself. Is there somehow I can
find out what path is correct, since I am adding javascript reference in my
java code???


SteamR wrote:
> 
> I found out that it was a js sourcefile reference which were added in code
> (in a onRendered method), that when app was mounted, caused the lookups to
> be sent to the page instead... So that seems that relative paths are nogos
> when mounted???
> 
> But strange is that images seems to work ok, they also use relative
> path...
> 
> 
> SteamR wrote:
>> 
>> I have now searched the html files, and can't find any empty src
>> attributes. And it only happens when I add the 
>> 
>> mount("/pwa", PackageName.forClass(CategoryPage.class));
>> 
>> in my WebApplication class' init method. 
>> 
>> (I also have relocated the html files to the "src/main/webapp" folder, if
>> that has something to do with it.)
>> 
>> Well, I will try to strip down the code, to bare minimum and maybe post
>> the full code here thereafter.
>> 
>> 
>> 
>> 
>> 
>> SteamR wrote:
>>> 
>>> Hi,  I hope someone could help me with this...
>>> 
>>> I have 5 pages which are pretty standalone but stateful, and they have
>>> nothing to do with each other.
>>> 
>>> Now I thought of having bookmarks for each of these pages, and added a
>>> mount point to /pwa.
>>> 
>>> Now the problems started; my page's constructor was invoked three times
>>> before actual output occured (it has an empty constructor), and a form
>>> object loses its transient fields during a request-response cycle.
>>> 
>>> The transient field getting lost, is something I can fix, but invoking
>>> the constructor three times and why wicket does so, is very strange...?
>>> 
>>> Anyone know any answer to this...
>>> 
>>> Btw, I am running wicket 1.3.1
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16467343.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Mount causes strange effects on my web application

Posted by SteamR <rs...@carrot.no>.
I found out that it was a js sourcefile reference which were added in code
(in a onRendered method), that when app was mounted, caused the lookups to
be sent to the page instead... So that seems that relative paths are nogos
when mounted???

But strange is that images seems to work ok, they also use relative path...


SteamR wrote:
> 
> I have now searched the html files, and can't find any empty src
> attributes. And it only happens when I add the 
> 
> mount("/pwa", PackageName.forClass(CategoryPage.class));
> 
> in my WebApplication class' init method. 
> 
> (I also have relocated the html files to the "src/main/webapp" folder, if
> that has something to do with it.)
> 
> Well, I will try to strip down the code, to bare minimum and maybe post
> the full code here thereafter.
> 
> 
> 
> 
> 
> SteamR wrote:
>> 
>> Hi,  I hope someone could help me with this...
>> 
>> I have 5 pages which are pretty standalone but stateful, and they have
>> nothing to do with each other.
>> 
>> Now I thought of having bookmarks for each of these pages, and added a
>> mount point to /pwa.
>> 
>> Now the problems started; my page's constructor was invoked three times
>> before actual output occured (it has an empty constructor), and a form
>> object loses its transient fields during a request-response cycle.
>> 
>> The transient field getting lost, is something I can fix, but invoking
>> the constructor three times and why wicket does so, is very strange...?
>> 
>> Anyone know any answer to this...
>> 
>> Btw, I am running wicket 1.3.1
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Mount-causes-strange-effects-on-my-web-application-tp16395309p16467340.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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