I want to display an ion-split-pane when the app is displayed on a desktop (or large screen)
And switch to an ion-tabswhen the app is displayed on a mobile.
Is this possible to do that ? I'm using Ionic on React
Here a non-perfect solution, because thes routes are duplicated.
I don't know how to fix this unfortunatly.
const Routes = () => <IonRouterOutlet id="main">
<Route path="/tabs" component={Tabs} exact={true} />
<Route path="/tab1" component={Tab1} exact={true} />
<Route path="/tab2" component={Tab2} exact={true} />
<Route path="/tab3" component={Tab3} />
<Route path="/" render={() => <Redirect to="/tab1" />} exact={true} />
</IonRouterOutlet>
const SplitPane = () => <IonSplitPane contentId="main">
<Menu />
<Routes />
</IonSplitPane>
const Tabs = () => <IonTabs>
<IonRouterOutlet id="main">
<Route path="/tabs" component={Tabs} exact={true} />
<Route path="/tab1" component={Tab1} exact={true} />
<Route path="/tab2" component={Tab2} exact={true} />
<Route path="/tab3" component={Tab3} />
<Route path="/" render={() => <Redirect to="/tab1" />} exact={true} />
</IonRouterOutlet>
<IonTabBar slot="bottom">
<IonTabButton tab="tab1" href="/tab1">
<IonIcon icon={triangle} />
<IonLabel>Tab 1</IonLabel>
</IonTabButton>
<IonTabButton tab="tab2" href="/tab2">
<IonIcon icon={ellipse} />
<IonLabel>Tab 2</IonLabel>
</IonTabButton>
</IonTabBar>
</IonTabs>
const App: React.FC = () => {
return (
<IonApp>
<IonReactRouter>
{isPlatform("mobileweb") && <Tabs />}
{isPlatform("desktop") && <SplitPane />}
</IonReactRouter>
</IonApp>
);
}
export default App;
Given #ionic/react restrictions this is what I came up with:
// Define routes as an array of components and add key prop
const routeComponents = [
<Redirect exact from="/" to={routes.dashboard} />,
<Route path={routes.dashboard} exact component={DashboardPage} />,
<Route path={routes.first} exact component={FirstPage} />,
<Route path={routes.second} exact component={SecondPage} />,
<Route component={NotFoundPage} />,
].map((Route, index) => ({ ...Route, key: index }))
const App: React.FC = () => {
const showSplitPane = useBreakpoint('lg')
return (
<IonApp>
<IonReactRouter>
{showSplitPane
?
<IonSplitPane contentId="main">
<Menu items={menuItems} />
<IonRouterOutlet id="main">
{routeComponents}
</IonRouterOutlet>
</IonSplitPane>
:
<TabsWrapper items={menuItems}>
<IonRouterOutlet id="main">
{routeComponents}
</IonRouterOutlet>
</TabsWrapper>
}
</IonReactRouter>
</IonApp>
)
}
I wish there was an easier way
Related
I'm using Ionic with React.
In my app, I've both side menu and the tabs together.
In the tabs only the default tab is working properly other tabs are showing a blank screen.
My code is as follows:
1. App.tsx looks as follows
const App: React.FC = () => (
<IonApp>
<IonReactRouter>
<IonSplitPane contentId="main">
<Menu />
<IonRouterOutlet id="main">
<Route path="/login" component={Login} exact />
<Route path="/tabs" component={Tabs} exact />
<Route path="/register" component={Register} exact />
<Route exact path="/" render={() => <Redirect to="/login" />} />
</IonRouterOutlet>
</IonSplitPane>
</IonReactRouter>
</IonApp>
);
export default App;
In this, the below Route opens a tabbed page
<Route path="/tabs" component={Tabs} exact />
2. Tabs.tsx looks as follows
function Tabs() {
return (
<IonTabs>
<IonRouterOutlet>
<Route path="/tabs/tab1" component={Tab1} exact={true} />
<Route path="/tabs/tab2" component={Tab2} exact={true} />
<Route path="/tabs/tab3" component={Tab3} exact={true}/>
<Route path="/tabs" render={() => <Redirect to="/tabs/tab1" />} exact={true} />
</IonRouterOutlet>
<IonTabBar slot="bottom">
<IonTabButton tab="calendar" href="/tabs/tab1">
<IonIcon icon={calendar} />
<IonLabel>Tab1</IonLabel>
</IonTabButton>
<IonTabButton tab="analysis" href="/tabs/tab2">
<IonIcon icon={barChart} />
<IonLabel>Tab2</IonLabel>
</IonTabButton>
<IonTabButton tab="timer" href="/tabs/tab3">
<IonIcon icon={timer} />
<IonLabel>Tab3</IonLabel>
</IonTabButton>
</IonTabBar>
</IonTabs>
);
};
export default Tabs;
3. Tab1.tsx looks like this
const Tab1 = () => {
return (
<IonPage>
<IonHeader>
<IonToolbar color="secondary">
<IonButtons slot="start">
<IonMenuButton />
</IonButtons>
<IonTitle>Timesheet</IonTitle>
</IonToolbar>
</IonHeader>
<IonHeader collapse="condense">
<IonToolbar>
<IonTitle size="large">Tab 1</IonTitle>
</IonToolbar>
</IonHeader>
<IonContent class="ion-padding">
Tab 1 Content
</IonContent>
</IonPage>
);
};
export default Tab1;
Other Tabs Tab2.tsx and Tab3.tsx look exactly the same.
I figured out the issue.
It was an issue with the Route into my App.tsx file.
I changed my Route as below. (removed exact)
<Route path="/tabs" component={Tabs} />
Earlier Route which was causing the error is below
<Route path="/tabs" component={Tabs} exact/>
I am building Ionic React application, and the version of ionic is 5. In my application, I have bottom navigation. I have mentioned the logic of bottom navigation in App.tsx.
I have an add button on the Dashboard page on clicking that button I want a page to open which will not contain the bottom navigation. I got many answers over the internet which is for Ionic-Angular. I am specifically looking for an answer Ionic-React.
App.tsx
<IonContent>
<IonReactRouter>
<IonTabs>
<IonRouterOutlet>
<Route path="/profile" component={Profile} exact={true} />
<Route path="/dashboard" component={Dashboard} exact={true} />
<Route path="/dashboard/addInfo" component={Info} exact={true} />
<Route path="/" render={() => <Redirect to="/dashboard" />} exact={true} />
</IonRouterOutlet>
<IonTabBar slot="bottom">
<IonTabButton tab="home" href="/home">
<IonIcon icon={home} />
<IonLabel>Home</IonLabel>
</IonTabButton>
<IonTabButton tab="profile" href="/profile">
<IonIcon icon={profile} />
<IonLabel>Profile</IonLabel>
</IonTabButton>
<IonTabButton tab="dashboard" href="/dashboard">
<IonIcon icon={grid} />
<IonLabel>Dashboard</IonLabel>
</IonTabButton>
</IonTabBar>
</IonTabs>
</IonReactRouter>
</IonContent>
This might be what #MostafaHarb was trying to explain. You can have nested IonRouterOutlets, so place your tabs within a TabContainer component off your main App.tsx (shown here as a render prop on the /tabs Route). You will likely need to provide a fallback route, in this case there's a redirect to the tabs Route when the path is "/"
<IonReactRouter>
<IonRouterOutlet>
<Route path="/notabs" render={() => <div>a page no tabs</div>} />
<Route
path="/tabs"
render={() => (
<IonTabs>
<IonRouterOutlet>
<Route
path="/tabs/tab1"
component={Tab1}
exact={true}
/>
<Route
path="/tabs/tab2"
component={Tab2}
exact={true}
/>
<Route
path="/tabs/tab3"
component={Tab3}
exact={true}
/>
</IonRouterOutlet>
<IonTabBar slot="bottom">
<IonTabButton tab="tab 1" href="/tabs/tab1">
<IonIcon icon={circle} />
<IonLabel>Tab1</IonLabel>
</IonTabButton>
<IonTabButton tab="tab 2" href="/tabs/tab2">
<IonIcon icon={square} />
<IonLabel>Tab2</IonLabel>
</IonTabButton>
<IonTabButton tab="tab 3" href="/tabs/tab3">
<IonIcon icon={triangle} />
<IonLabel>Tab3</IonLabel>
</IonTabButton>
</IonTabBar>
</IonTabs>
)}
/>
<Route
path="/"
render={() => <Redirect to="/tabs" />}
exact={true}
/>
</IonRouterOutlet>
</IonReactRouter>
</IonApp>
);
Good luck!
I did something like this and that worked for me. I created an id for the tabs and then manipulated that to show or hide
function showTab() {
const tabBar = document.getElementById('appTabBar');
if (tabBar !== null) {
console.log("enabled")
tabBar.style.display = 'flex';
}
}
function hideTab() {
const tabBar = document.getElementById('appTabBar');
if (tabBar !== null) {
tabBar.style.display = 'none';
}
}
<IonTabBar slot="bottom" id="appTabBar" >
<IonTabButton tab="account" href="/account">
<IonIcon icon={personCircleOutline}/>
<IonLabel>Profile</IonLabel>
</IonTabButton>
</IonTabBar>
I am trying to develop an application where I have to download and display an image from a website. THis is the code snippet which I have used:-
LoadImage(){
const transfer = new Transfer();
var url = "http://demo.observerjobs.lk/storage/public/uploads/vacancies/"+this.hash+"/"+this.attachment;
var uri = encodeURI(url);
var filepath = cordova.file.cacheDirectory+ '/' + this.vacancy.attachment;//("/"+this.vacancy.attachment);
transfer.download(uri, filepath, true ).then((entry) => {
console.log('download complete: ' + entry );
this.image = "<ion-img src= '"+ entry.toURL() + "'/>";
console.log(this.image);
}).catch(error => {
console.log(JSON.stringify(error));
});
}
I create the img tag in the following format:-
"<ion-img src= 'file:///data/user/0/package_name/cache/suo-01-29-012588-12x3-kbd.jpg'/>"
However, I am unable to retrieve this file to be displayed. What Have I done wrong, and what can I do to remedy this?
Edit:- Here is the config.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="OBSCURED FOR IDENTITY" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>OBSCURED</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi#ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html"/>
<access origin="*"/>
<allow-intent href="http://*/*"/>
<allow-intent href="https://*/*"/>
<allow-intent href="tel:*"/>
<allow-intent href="sms:*"/>
<allow-intent href="mailto:*"/>
<allow-intent href="geo:*"/>
<platform name="android">
<allow-intent href="market:*"/>
<icon src="resources\android\icon\drawable-ldpi-icon.png" density="ldpi"/>
<icon src="resources\android\icon\drawable-mdpi-icon.png" density="mdpi"/>
<icon src="resources\android\icon\drawable-hdpi-icon.png" density="hdpi"/>
<icon src="resources\android\icon\drawable-xhdpi-icon.png" density="xhdpi"/>
<icon src="resources\android\icon\drawable-xxhdpi-icon.png" density="xxhdpi"/>
<icon src="resources\android\icon\drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
<splash src="resources\android\splash\drawable-land-ldpi-screen.png" density="land-ldpi"/>
<splash src="resources\android\splash\drawable-land-mdpi-screen.png" density="land-mdpi"/>
<splash src="resources\android\splash\drawable-land-hdpi-screen.png" density="land-hdpi"/>
<splash src="resources\android\splash\drawable-port-ldpi-screen.png" density="port-ldpi"/>
<splash src="resources\android\splash\drawable-port-mdpi-screen.png" density="port-mdpi"/>
<splash src="resources\android\splash\drawable-port-hdpi-screen.png" density="port-hdpi"/>
</platform>
<platform name="ios">
<allow-intent href="itms:*"/>
<allow-intent href="itms-apps:*"/>
</platform>
<platform name="windows">
<preference name="windows-target-version" value="10.0"/>
</platform>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="16"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashMaintainAspectRatio" value="true"/>
<preference name="FadeSplashScreenDuration" value="300"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="3000"/>
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
<plugin name="cordova-plugin-whitelist" spec="1.3.1"/>
<plugin name="cordova-plugin-console" spec="1.0.5"/>
<plugin name="cordova-plugin-statusbar" spec="2.2.1"/>
<plugin name="cordova-plugin-device" spec="1.1.4"/>
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/>
<icon src="resources\android\icon\drawable-xhdpi-icon.png"/>
<allow-navigation href="http://192.168.1.3:8100"/>
<allow-navigation href="http://192.168.1.3:8101"/>
<allow-navigation href="http://192.168.1.2:8100"/>
<allow-navigation href="http://192.168.8.105:8100"/>
</widget>
Here is the http file of the relevant page:-
<!--
Generated template for the Vacancy page.
See http://ionicframework.com/docs/v2/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>Vacancy</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-list no-lines *ngIf="vacancy">
<ion-item >Contract Type : {{vacancy.value}}</ion-item>
<ion-item >Company : {{item.company_name}}</ion-item>
<ion-item >Deadline : {{ deadlinetime }}</ion-item>
<ion-item >Job ID : #JD{{ item.id }}</ion-item>
</ion-list>
<h2 *ngIf="vacancy" orientation="center">{{item.job_title}}</h2>
<div *ngIf="image" [innerHtml]="image"></div>
</ion-content>
I would try:
Component:
imageSrc:string//class variable
LoadImage(){
const transfer = new Transfer();
var url = "http://demo.observerjobs.lk/storage/public/uploads/vacancies/"+this.hash+"/"+this.attachment;
var uri = encodeURI(url);
var filepath = cordova.file.cacheDirectory+ '/' + this.vacancy.attachment;//("/"+this.vacancy.attachment);
transfer.download(uri, filepath, true ).then((entry) => {
console.log('download complete: ' + entry );
this.imageSrc = entry.toUrl();
console.log(this.imageSrc);
}).catch(error => {
console.log(JSON.stringify(error));
});
}
HTML:
<img *ngIf="imageSrc" [src]="imageSrc"></img>
I have a Navbar in my project (GWT, GWTBootstrap3, UiBinder), I would like to make vertical in UiBinder.
In HTML it is quite simple
<div class = "nav nav-pills nav-stacked col-sm-3">
<li> <a> Home </a> </li>
<li> <a> Settings</a> </li>
</div>
But it must be possible to do the same in UiBinder. As far as I understand it is only possible to set the position of the Navbar to FIXED_TOP, FIXED_BOTTON and one more.
My code looks like this
<g:HTMLPanel>
<g:ScrollPanel>
<b:Container >
<b:Navbar position="FIXED_TOP">
<b:Container>
<b:NavbarHeader>
<b:NavbarBrand targetHistoryToken="{nameTokens.getHome}" ui:field="brand" text="{resources.ProductName}" />
<b:NavbarCollapseButton dataTarget="#navbar-collapse" />
</b:NavbarHeader>
<b:NavbarCollapse b:id="navbar-collapse">
<b:NavbarNav>
<b:ListDropDown ui:field="admindropdown">
<b:AnchorButton dataToggle="DROPDOWN" text="{resources.CardHolder}" />
<b:DropDownMenu>
<b:AnchorListItem text="{resources.Employee}" targetHistoryToken="{nameTokens.getCardholderlist}" />
<b:AnchorListItem text="{resources.Guest}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.Vendor}" targetHistoryToken="{nameTokens.getHome}" />
</b:DropDownMenu>
</b:ListDropDown>
<b:ListDropDown>
<b:AnchorButton dataToggle="DROPDOWN" text="{resources.User}" />
<b:DropDownMenu>
<b:AnchorListItem text="{resources.Customer}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.Technician}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.Portal}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.Cloud}" targetHistoryToken="{nameTokens.getHome}" />
</b:DropDownMenu>
</b:ListDropDown>
<b:ListDropDown>
<b:AnchorButton dataToggle="DROPDOWN" text="{resources.Configuration}" />
<b:DropDownMenu>
<b:AnchorListItem text="{resources.Customer}" targetHistoryToken="{nameTokens.getCustomerlist}" />
<b:AnchorListItem text="{resources.Company}" targetHistoryToken="{nameTokens.getCompanylist}" />
<b:AnchorListItem text="{resources.Portal}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.ProductNameServer}" targetHistoryToken="{nameTokens.getCloudlist}" />
</b:DropDownMenu>
</b:ListDropDown>
</b:NavbarNav>
<b:NavbarNav pull="RIGHT">
<b:ListDropDown >
<b:AnchorButton text="{resources.SelectedLanguage}" dataToggle="DROPDOWN" />
<b:DropDownMenu >
<b:Image addStyleNames="btn {style.btnStyle}" ui:field="languageDK" url="/images/DK.png" />
<b:Image addStyleNames="btn {style.btnStyle}" ui:field="languageNO" url="/images/NO.png" />
<b:Image addStyleNames="btn {style.btnStyle}" ui:field="languageUK" url="/images/UK.png" />
</b:DropDownMenu>
</b:ListDropDown>
<b:ListDropDown ui:field="loginfield">
<b:AnchorButton dataToggle="DROPDOWN" ui:field="loginname" />
<b:DropDownMenu>
<b:AnchorListItem text="{resources.LogOut}" ui:field="logoutitem" />
</b:DropDownMenu>
</b:ListDropDown>
</b:NavbarNav>
</b:NavbarCollapse>
</b:Container>
</b:Navbar>
<b:Row>
<b:Column size="XS_12">
<g:SimplePanel ui:field="contentContainer" />
</b:Column>
</b:Row>
</b:Container>
</g:ScrollPanel>
</g:HTMLPanel>
It seems you are mistaking Navbar with Navs - your HTML example uses nav-pills, while the UiBinder one uses a Navbar (navbar, navbar-header, etc.). As far as I can tell (from the Bootstrap's and gwtbootstrap3's documentation) it is not possible to achieve a vertical ("stacked", as they call it in the docs) Navbar. But it is possible to get vertical/stacked NavPills:
<b:NavPills stacked="true">
<b:AnchorListItem active="true">Item 1</b:AnchorListItem>
<b:AnchorListItem>Item 2</b:AnchorListItem>
<b:AnchorListItem>Item 3</b:AnchorListItem>
</b:NavPills>
See the demo for more examples.
I took another approach to the problem, and made use of the grid system in bootstrap. So when we are at a desktop I show a side navigation bar, and when on a tablet/phone I show the Navbar. It needs to be tweaked a bit, but this is the essential part of the problem I had.
Here is my code for UiBinder
<b:Container>
<b:Row>
<b:Column size="XS_12,SM_12,MD_10,LG_10" visibleOn="XS_SM">
<b:Navbar position="FIXED_TOP">
<b:Container>
<b:NavbarHeader>
<b:NavbarBrand targetHistoryToken="{nameTokens.getHome}"
ui:field="brand" text="{resources.ProductName}" />
<b:NavbarCollapseButton dataTarget="#navbar-collapse" />
</b:NavbarHeader>
<b:NavbarCollapse b:id="navbar-collapse">
<b:NavbarNav>
<b:ListDropDown ui:field="admindropdown">
<b:AnchorButton dataToggle="DROPDOWN" text="{resources.CardHolder}" />
<b:DropDownMenu>
<b:AnchorListItem text="{resources.Employee}" targetHistoryToken="{nameTokens.getCardholderlist}" />
<b:AnchorListItem text="{resources.Guest}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.Vendor}" targetHistoryToken="{nameTokens.getHome}" />
</b:DropDownMenu>
</b:ListDropDown>
<b:ListDropDown>
<b:AnchorButton dataToggle="DROPDOWN" text="{resources.User}" />
<b:DropDownMenu>
<b:AnchorListItem text="{resources.Customer}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.Technician}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.Portal}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.Cloud}" targetHistoryToken="{nameTokens.getHome}" />
</b:DropDownMenu>
</b:ListDropDown>
<b:ListDropDown>
<b:AnchorButton dataToggle="DROPDOWN" text="{resources.Configuration}" />
<b:DropDownMenu>
<b:AnchorListItem text="{resources.Customer}" targetHistoryToken="{nameTokens.getCustomerlist}" />
<b:AnchorListItem text="{resources.Company}" targetHistoryToken="{nameTokens.getCompanylist}" />
<b:AnchorListItem text="{resources.Portal}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.ProductNameServer}" targetHistoryToken="{nameTokens.getCloudlist}" />
</b:DropDownMenu>
</b:ListDropDown>
</b:NavbarNav>
<b:NavbarNav pull="RIGHT">
<b:ListDropDown addStyleNames="{style.languageImageStyle}">
<b:Image url="{resources.SelectedLanguageURL}" />
</b:ListDropDown>
<b:ListDropDown>
<b:AnchorButton text="{resources.SelectedLanguage}" dataToggle="DROPDOWN" />
<b:DropDownMenu>
<b:Image addStyleNames="btn {style.btnStyle}" ui:field="languageDK" url="/images/DK.png" />
<b:Image addStyleNames="btn {style.btnStyle}" ui:field="languageNO" url="/images/NO.png" />
<b:Image addStyleNames="btn {style.btnStyle}" ui:field="languageUK" url="/images/UK.png" />
</b:DropDownMenu>
</b:ListDropDown>
<b:ListDropDown ui:field="loginfield">
<b:AnchorButton dataToggle="DROPDOWN" ui:field="loginname" />
<b:DropDownMenu>
<b:AnchorListItem text="{resources.LogOut}" ui:field="logoutitem" />
</b:DropDownMenu>
</b:ListDropDown>
</b:NavbarNav>
</b:NavbarCollapse>
</b:Container>
</b:Navbar>
</b:Column>
</b:Row>
<b:Row>
<b:Column size="MD_3,LG_3" visibleOn="MD_LG">
<b:Panel>
<b:PanelBody>
<b:PanelGroup b:id="accordion">
<b:Panel>
<b:PanelHeader>
<b:Heading size="H4">
<b:Anchor dataToggle="COLLAPSE" dataTarget="#collapseOne" text="{resources.CardHolder}"/>
</b:Heading>
</b:PanelHeader>
<b:PanelCollapse b:id="collapseOne" in="true" ui:field="collapseOne">
<b:PanelBody>
<b:AnchorListItem text="{resources.Employee}" targetHistoryToken="{nameTokens.getCardholderlist}" />
<b:AnchorListItem text="{resources.Guest}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.Vendor}" targetHistoryToken="{nameTokens.getHome}" />
</b:PanelBody>
</b:PanelCollapse>
</b:Panel>
<b:Panel>
<b:PanelHeader>
<b:Heading size="H4">
<b:Anchor dataToggle="COLLAPSE" dataTarget="#collapseTwo" text="{resources.User}"/>
</b:Heading>
</b:PanelHeader>
<b:PanelCollapse b:id="collapseTwo" in="true">
<b:PanelBody>
<b:AnchorListItem text="{resources.Customer}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.Technician}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.Portal}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.Cloud}" targetHistoryToken="{nameTokens.getHome}" />
</b:PanelBody>
</b:PanelCollapse>
</b:Panel>
<b:Panel>
<b:PanelHeader>
<b:Heading size="H4">
<b:Anchor dataToggle="COLLAPSE" dataTarget="#collapseThree" text="{resources.Configuration}"/>
</b:Heading>
</b:PanelHeader>
<b:PanelCollapse b:id="collapseThree" in="true">
<b:PanelBody>
<b:AnchorListItem text="{resources.Customer}" targetHistoryToken="{nameTokens.getCustomerlist}" />
<b:AnchorListItem text="{resources.Company}" targetHistoryToken="{nameTokens.getCompanylist}" />
<b:AnchorListItem text="{resources.Portal}" targetHistoryToken="{nameTokens.getHome}" />
<b:AnchorListItem text="{resources.ProductNameServer}" targetHistoryToken="{nameTokens.getCloudlist}" />
</b:PanelBody>
</b:PanelCollapse>
</b:Panel>
<b:Panel>
<b:PanelHeader>
<b:Heading size="H4">
<b:Anchor dataToggle="COLLAPSE" dataTarget="#collapseFour" text="Sprog"/>
</b:Heading>
</b:PanelHeader>
<b:PanelCollapse b:id="collapseFour" in="true">
<b:PanelBody>
<b:Image addStyleNames="btn" ui:field="languageDK2" url="/images/DK.png" />
<b:Image addStyleNames="btn" ui:field="languageNO2" url="/images/NO.png" />
<b:Image addStyleNames="btn" ui:field="languageUK2" url="/images/UK.png" />
</b:PanelBody>
</b:PanelCollapse>
</b:Panel>
<b:Panel>
<b:PanelHeader>
<b:Heading size="H4">
<b:Anchor dataToggle="COLLAPSE" dataTarget="#collapseFive" text="Login"/>
</b:Heading>
</b:PanelHeader>
<b:PanelCollapse b:id="collapseFive" in="true">
<b:PanelBody>
<b:AnchorListItem text="{resources.LogOut}" ui:field="logoutitem2" />
</b:PanelBody>
</b:PanelCollapse>
</b:Panel>
</b:PanelGroup>
</b:PanelBody>
</b:Panel>
</b:Column>
<b:Column size="XS_12,SM_12,MD_9,LG_9">
<g:SimplePanel ui:field="contentContainer" />
</b:Column>
</b:Row>
</b:Container>
i made a camel route in my application with spring dsl.I want to copy the exchange body with using multicast EIP.But when i use this, i can take the exchange bodyfrom one of my endpoint.In the second one (which is endpoint in multicast ) ,the exchange body is null.Why this is happening like this?
EDIT
This is my route:
<route errorHandlerRef="dlc1" id="mobitRoute1">
<from uri="cxf:bean:mobit-okuma?dataFormat=PAYLOAD" />
<wireTap uri="activemq:queue:anaMobitQueue" />
<to uri="velocity:response.vm" />
</route>
<route id="mobitRoute2" errorHandlerRef="dlc2">
<from uri="activemq:queue:anaMobitQueue" />
<unmarshal ref="myJaxb" />
<to uri="bean:timeChanging" />
<multicast>
<to uri="activemq:queue:mobitOkumaq" />
<to uri="activemq:queue:AysMobit" />
</multicast>
</route>
<route errorHandlerRef="dlc3" id="mobitRoute3">
<from uri="activemq:queue:AysMobit" />
<!-- <unmarshal ref="myJaxb" /> -->
<to uri="bean:fromPayload" />
<to uri="cxf:bean:ays-service?dataFormat=POJO" />
</route>
<route errorHandlerRef="dlc4" id="mobitRoute4">
<from uri="activemq:queue:mobitOkumaq" />
<to uri="cxf:bean:mobit-okumaReal?dataFormat=POJO" />
</route>
I found the solution by transforming xml when i put the exchange to the queue.This is why ? I don't know.
<route errorHandlerRef="dlc1" id="mobitRoute1">
<from uri="cxf:bean:mobit-okuma?dataFormat=PAYLOAD" />
<wireTap uri="activemq:queue:anaMobitQueue" />
<to uri="velocity:response.vm" />
</route>
<route errorHandlerRef="dlc1" id="mobitRoute2">
<from uri="activemq:queue:anaMobitQueue" />
<camel:pipeline>
<unmarshal ref="myJaxb" />
<to uri="bean:timeChanging" />
<!-- <to uri="direct:unmarshalled"/> -->
<marshal ref="myJaxb" />
<camel:multicast>
<to uri="activemq:queue:BegisMobit" />
<to uri="activemq:queue:AysMobit" />
</camel:multicast>
</camel:pipeline>
</route>
<route errorHandlerRef="dlc2" id="mobitRoute3">
<from uri="activemq:queue:AysMobit" />
<unmarshal ref="myJaxb" />
<to uri="bean:fromPayload" />
<to uri="cxf:bean:ays-service?dataFormat=POJO" />
</route>
<route errorHandlerRef="dlc3" id="mobitRoute4">
<from uri="activemq:queue:BegisMobit" />
<unmarshal ref="myJaxb" />
<to uri="cxf:bean:mobit-okumaReal?dataFormat=POJO" />
</route>