yasuro99
yasuro99
Explore posts from servers
RRefine
Created by absent-sapphire on 10/27/2024 in #ask-any-question
`redirect` useForm(@refinedev/antd) with nextjs-router doesn't work
Refine:
<Refine
routerProvider={routerProvider}
dataProvider={{
default: dataProvider(PIM_MS),
[PIM_MS]: dataProvider(PIM_MS),
}}

resources={[
{
name: "Category",
list: PRODUCT_CATEGORIES_PATH,
create: PRODUCT_CATEGORIES_PATH + "/create",
edit: PRODUCT_CATEGORIES_PATH + "/edit/:id",
show: PRODUCT_CATEGORIES_PATH + "/show/:id",
meta: {
canDelete: true,
},
},
]}
options={{
syncWithLocation: true,
warnWhenUnsavedChanges: true,
useNewQueryKeys: true,
}}>
</Refine>
<Refine
routerProvider={routerProvider}
dataProvider={{
default: dataProvider(PIM_MS),
[PIM_MS]: dataProvider(PIM_MS),
}}

resources={[
{
name: "Category",
list: PRODUCT_CATEGORIES_PATH,
create: PRODUCT_CATEGORIES_PATH + "/create",
edit: PRODUCT_CATEGORIES_PATH + "/edit/:id",
show: PRODUCT_CATEGORIES_PATH + "/show/:id",
meta: {
canDelete: true,
},
},
]}
options={{
syncWithLocation: true,
warnWhenUnsavedChanges: true,
useNewQueryKeys: true,
}}>
</Refine>
Create component
export default function CategoryCreate() {
const {formProps, saveButtonProps, form} = useForm({
resource: PRODUCT_CATEGORIES_RESOURCE,
dataProviderName: PIM_MS,
action: "create",
redirect: "list"
});

return (
<Create saveButtonProps={saveButtonProps}>
<Form {...formProps} layout="vertical">
</Form>
</Create>
);
}
export default function CategoryCreate() {
const {formProps, saveButtonProps, form} = useForm({
resource: PRODUCT_CATEGORIES_RESOURCE,
dataProviderName: PIM_MS,
action: "create",
redirect: "list"
});

return (
<Create saveButtonProps={saveButtonProps}>
<Form {...formProps} layout="vertical">
</Form>
</Create>
);
}
Routing
List: src/app/product-categories/page.tsx
Create: src/app/product-categories/create/page.tsx
List: src/app/product-categories/page.tsx
Create: src/app/product-categories/create/page.tsx
5 replies
ATApache TinkerPop
Created by yasuro99 on 7/20/2023 in #questions
User Defined Steps for orientDB Handlers (Server Plugins)
OrientDB has Handlers (Server Plugins). Handlers allow writing custom functions. For example, there is a step union in Gremlin. In OrientDB, I can write my own function called customUnion using the handlers. Question: How can I call the custom function of OrientDB (or step of Gremlin) in the Gremlin console? Also, I am using the Gremlin Java API, so I need to call the custom function customUnion in Gremlin Java API. I have created the same question on OrientDB: https://github.com/orientechnologies/orientdb/issues/10003 It seems I need to configure the Gremlin server somehow to use my customUnion function(step), and then I can write my custom traversals in Java to use it in the Java API. However, I cannot find any tutorial for this in TinkerPop3 or orientDB
5 replies