overriding setResponsePage() to build breadcrumb - wicket

I 'm trying to build my own simple breadcrumb component that pushes a PageRefence onto a List for each and every Link in the application.
Unfortunately, setResponsePage() is final (I use wicket 6).
The only other option that comes to my mind is to add a parameter to my base page constructor. But this would require me to change every link in the app..
Are there any other options?

Since you already have a base page, it's easier to override onBeforeRender() in your base page to update the breadcrumbs list that you'd store in your Session object.
Or am I missing something?

To answer my own question:
In the end I realized, that I do not want to have the breadcrumb updated on each new page.
Therefore I created an object that holds a List of Pagereferences. When I navigate to a new Page, I take the list of the current page, make a copy of it an add the current page. The resulting list is pased onto the new page.
All this is handeld in the base page.
Keeping it in the page, avoids problems with multiple tabs / windows.
Thanks for the help.

Related

Ionic UI Router issue: 2nd level state views not loading

I can't wrap my head around this issue I've been experiencing, or perhaps I'm missing some crucial point here. I jotted down this sample app on ionic playground, it is of course a simplified version of my app.
Basically I have a tabbed layout with two views which share a common datasource of items (in my app it's a sqlite db table); the first view displays items in a certain state whereas the other tab display the remaining items (in my example I've used the TODO list metaphor).
Each tab has a child state which I refer to as 2nd-level state (assuming level 0 is the abstract tab state. These two 2nd-level states are defined separately but share a common controller and template.
I cannot for the life of me understand why these two states aren't being navigated to when I click on a list item from either of the two lists (1st-level state views).
NOTE: In the ionic playground no error is thrown in the console, but I can't quite tell what is going on in terms of state URLs. But when I test my actual app (where the problem is the same) in a browser I can see the URL changing to #/tab/tasks/xxxx or #/tab/completed/xxxx but template is not loading. Upon googling I came across several SO questions:
Ui-router URL changes, nested view not loading
In Angular ui-router nested state url changes,but template is not loading
UI-Router: URL changes, but view is not loaded
Angular Router - Url changes but view does not load
URL changes but view does not hcange
Angular UI-Router : URL changed but view isn't loaded
but the answers provided therein haven't worked for me (tried, as per the last one I listed, to add the # sign after the view name in the child states, but to no avail).
Kinda stuck, would really appreciate some input! Cheers.
Managed to get it working following this answer; I had previously tried simply appending the # character after the view name in nested states but it turns out the trick was to append #tab, where tab is the name of the top-level abstract state. I updated my fiddle on ionic playground. Cheers to you all.

AEM CQ5 How to modified a parent page and at meantime the child page get modiedly automatically

How to modified a parent page and at meantime the child page get modified automatically? without use the MSN livecopy , because we don't have the license.
anyone can help ? thank you very much.
For example, I want to change a text value in parent page, and meanwhile I want the same text in child page could be changed automatically.
Not sure if I understand you right, but I see two possibilities:
iparsys: This is an inheriting parsys. So any component placed within this will be inherited to child pages. You can break the inheritance on any level
Reference: There is a Reference component in the foundation where you can reference any component from another page by its path.
In both cases, if the original component gets changed, the inheriting or referencing page will get the update as well.

Creating reusable widgets

I`m using asp.net mvc 2.0 and trying to create reusable web site parts, that can be added at any page dynamically.
The problem I have is how to load a partial view with all related js and data? Ive tried the following ways to do that:
Use partial view and put all the js into it. In main view use render partial. But to initialize partial view I need to add model to current action method model to be able to make RenderPartial("MyPartialView", Model.PartialViewModel).
Also I do not have a place to put additional data I need to fill my form(like drop down lists values, some predefined values etc).
Use RenderAction, but it seems it have same problems as RenderPartial, except for I do not need to add anything to any other model.
Any other oprions are greatly appreciated.
As I understand it, RenderAction performs the full pipeline on the action, then renders the result - so what is rendered is the same as what you'd see if you'd browsed to the action.
I've used RenderAction to render 'widgets' throughout a site, but in my view they should be independent of the page rendering them, otherwise they're not really widgets and should be part of the rendering page's code instead. For instance, if there's a log in form, you will always take the user to a page that can process the information, no matter what page they are currently on, so this makes for a good widget. Other ways I've used it is to show a shopping basket or advertising. Neither of which are dependent on the page being shown.
Hope this helps a little!

How to view updated data on one property page updated by another property page without closing the properties in eclipse plugin?

I am facing a strange issue!!
I have a set of property page with same storage file.
The scenario is as follow..
For the first time opening the properties by right clicking on the project, list of property pages are viewed. I click on the first property page and make changes then apply the changes to the file.
Now I select the second page, it shows the changes that were applied from the first page.
But now without closing the properties i go back to first page and make changes then apply the changes.
Then again I go to second page it wont show the updated data. The changes that were applied are not viewed until I close the properties and reopen then by right clicking on the project.
My question is
"Is there any way to reflect changes on the pages without closing the properties??"
I appreciate your valuable time you will give for reading and replying..
Plz help
Your problem seems to just absent of reliable model which can notify problem.
If the properties are related IProject.
You should use ScopedPreferenceStore as model.
IScopeContenxt scope = new ProjectScope(myProject);
IPreferenceStore store =
new ScopedPreferenceStore(scope, "myProperties(qualifier)");
IPreferenceStore can manipulate primitive data, default value. And it support property change event. You can create multiple instances of IPreferenceStore, If they have same scope and qualifier then automatically synchronized. So individual page can retrive input model without coupling.

Zend Framework Navigation - dynamically adding parameters

I am experimenting with Zend_Navigation to build breadcrumb for a web site. I created an XML file which lists the hierarchy of pages. Things are working fine for the most part except for pages that have dynamic parameters.
For example, there is a group page which has the URL " www.../groups/gid/1001". The id 1001 is dynamic so it changes for different groups. Because of that I cannot put it in the XML file. In that case, ZF generates a link without including any parameters, which of course won't work.
One solution I found is dynamically injecting the parameters to the Zend_Navigation object. This is working fine except that I need to do it for each action or controller.
Is there a better way to handle it? Does ZF have any classes to do this work?
I will appreciate any feedback.
Thanks!
http://zend-framework-community.634137.n4.nabble.com/Creating-a-dynamic-database-based-Zend-Navigation-item-td660805.html
And/or start reading here: http://framework.zend.com/manual/en/zend.navigation.introduction.html
At which point do you know the group ID to use in the navigation?
If it's early enough, you could simply create your own bootstrap init method to insert the navigation item, just remember to call $this->bootstrap('navigation') at the top of your method, eg
protected function _initCustomNav()
{
$this->bootstrap('navigation');
$navigation = $this->getResource('navigation');
// add custom item
return $navigation;
}
Disclaimer: I'm pretty sure the navigation resource is just called 'navigation'